Ov er vie w

advertisement
TDDB57 DALG – Lecture 15: Summary
Page 1
J. Maluszynski, IDA, Linköpings Universitet, 2004.
TDDB57 DALG – Lecture 15: Summary
Page 2
Complexity: Material to Know
Order Notation:
Overview
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Page 4
Compare all notions of tree discussed in the course.
J. Maluszynski, IDA, Linköpings Universitet, 2004.
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Traversals:
Preorder, Postorder, (Inorder), Levelorder (4.3)
Implementations of traversals ( 4.5, except: “Scanning in Constant Space”)
Representations:
natural (of bintrees (108-109)), of ordered trees (109-110)
implicit (of complete bintrees (110-112))
Basics:
Definitions (4.1),
Special Kinds of trees (4.2)
ADT Tree (p.103)
Trees
TDDB57 DALG – Lecture 15: Summary
Analysis of concrete algorithms
Section 2.2, Tutorial 2 Problems 1-4
finding time complexity of iterative algorithms
describing time complexity of rec. algorithms by recurrence relations
cases: worst, expected, amortized analysis
what complexity estimation tells us (e.g. Problem 4, Tutorial 2)
Recurrence relations:
p.25-26,(solving techniques not required)
Definitions and Intuition
p.21 -24, Tutorial 1
Complexity Analysis
Lists
Trees
Dictionaries
Priority Queues
Union-Find
Sorting
Graphs and Graph Algorithms
Page 3
Algorithm Paradigms
TDDB57 DALG – Lecture 15: Summary
Lists
Chapter 3
Lists:
ADT List
representations: in contiguous memory and in linked memory
Stacks:
ADT Stack
representations: in contiguous memory and in linked memory
application of stack for recursion; tail recursion
Queues:
ADT Queue
representations: in contiguous memory and in linked memory
Which of the algorithms discussed in the course use queues/stacks?
TDDB57 DALG – Lecture 15: Summary
Page 5
J. Maluszynski, IDA, Linköpings Universitet, 2004.
TDDB57 DALG – Lecture 15: Summary
Dictionaries cont.
Page 6
Binary search trees (6.4)
Dictionaries
ADT Dictionary (6.1)
2-3 trees (229-235)
digital sorting
Page 8
lower bound for comparison based sorting
quick sort
selection sort and heap sort
insertion sort and shell sort
merge sort
All material in 11.1-11.6 and Merge Sort p.29
Sorting
TDDB57 DALG – Lecture 15: Summary
J. Maluszynski, IDA, Linköpings Universitet, 2004.
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Be able to demonstrate execution of dictionary operations on examples:
of BST’s AVL trees, 2-3 trees and splay trees.
Splay trees (7.3)
(a,b)-Trees only the idea (238-239);
AVL Trees (7.1)
List-based dictionaries (177-178, 181-184)
Important: binary search
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Hashing (8.3)
Chaining: separate, coalesced
Open Addressing: sequential probing, double hashing
Hashing by Division, hashing by multiplication (284-288)
Page 7
Hash functions(284-288)
TDDB57 DALG – Lecture 15: Summary
Priority Queues and Union-Find
Priority Queues
ADT Priority Queue (298-299)
Heap (299-304)
Do you know some variants of heap?
Leftist trees (304-307)
Disjoint Sets
ADT Union-Find (307-308)
Up-Trees (308-311)
Be able to demonstrate examples of operations on these data structures .
TDDB57 DALG – Lecture 15: Summary
Sorting cont.
Be able:
Page 9
J. Maluszynski, IDA, Linköpings Universitet, 2004.
to compare the algorithms wrt to complexity and aspects of 11.1
TDDB57 DALG – Lecture 15: Summary
Graph Algorithms
Page 10
Basics (424-426, 429-430)
Graph representations:
adj. lists, adj. matrices (427-428)
Single Source Least Cost Paths:
Dijkstra’s Algorithm (447-450)
Minimum Spanning Trees:
Kruskal’s Algorithm(442-446)
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Searching (12.2)
Breadth first
Depth first, DFS Tree
Applications of DFS: shortest path, topological sort, biconnectivity
to demonstrate examples of sorting by these algorithms
J. Maluszynski, IDA, Linköpings Universitet, 2004.
Trees, tree characterization (430-432)
Page 11
to show example decision trees for comparison based sorting algorithms
TDDB57 DALG – Lecture 15: Summary
Graph Algorithms cont.
How the representation chosen influences complexity.
Be able to demonstrate the algorithms on examples.
Understand tree characterization theorem.
Understand correctness proofs.
Download