170 likes | 303 Vues
This resource delves into the intricacies of average case analysis in computing, exploring concepts such as worst-case versus average-case scenarios, real-world data randomness, and specific algorithms like Quicksort and the Assignment Problem. It highlights the significance of understanding average runtime complexities, utilizing polynomial time algorithms for approximations, and investigates the properties of random graphs and their implications for computing. Ideal for students and professionals seeking to grasp the nuances of performance analysis in data structures.
E N D
Great Ideas in ComputingAverage Case Analysis Richard Anderson University of Washington IUCEE: Data Structures Activities
What happens “on the average” IUCEE: Data Structures Activities
Worst case versus average case • T(n) = max {T(I) | I is a problem instance of size n} • T(n) = ave {T(I) | I is a problem instance of size n} = sum {p(I) T(I) | I is a problem instance of size n} IUCEE: Data Structures Activities
Is real world data random? • Is real world data worst case? IUCEE: Data Structures Activities
Average case analysis max := A[0] for i := 1 to n-1 if A[ i ] > max max := A[ i ] * How many times is line * executed IUCEE: Data Structures Activities
Quicksort • Worst case runtime is n2 • Average case is n log n IUCEE: Data Structures Activities
Random Trees IUCEE: Data Structures Activities
Euclidean TSP IUCEE: Data Structures Activities
Asymmetric TSP • Random Asymmetric TSP • n n matrix with random entries in [0, 1] • Theorem • There is a polynomial time algorithm that gives a very good approximation for a random ATSP IUCEE: Data Structures Activities
Assignment Problem • Minimum weight perfect matching in a complete, bipartite graph • Solvable in polynomial time • How is the assignment problem related to the ATSP? IUCEE: Data Structures Activities
ATSP Algorithm • Solve relaxed version with Assignment Problem • Splice together cycles • Solution to the Assignment problem is a random permutation • Random permutations have a small number of cycles IUCEE: Data Structures Activities
Random Graphs • What is a random graph? IUCEE: Data Structures Activities
Standard model • Each edge is present with probability p • Expected degree of a vertex is pn IUCEE: Data Structures Activities
Does a random graph have a Hamiltonian circuit IUCEE: Data Structures Activities
Hamiltonian Circuit Algorithm IUCEE: Data Structures Activities
What does the Web Graph look like? IUCEE: Data Structures Activities
Degree distribution in the web graph IUCEE: Data Structures Activities