70 likes | 161 Views
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS. Instructor: Dr. Gautam Das April 16, 2009 Notes - Mahadevkirthi M. Topics Probabilistic Recurrence: - Linear Algorithm for K th Largest Selection Problem. Probabilistic Complexity Classes: - Random Polynomial Class (RP)
E N D
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Instructor: Dr. Gautam Das April 16, 2009 Notes - Mahadevkirthi M
Topics Probabilistic Recurrence: - Linear Algorithm for Kth Largest Selection Problem. Probabilistic Complexity Classes: - Random Polynomial Class (RP) Ex: Monte Carlo, Min - Cut, What about Max – SAT? - Zero Error Probabilistic Polynomial Class (ZPP) Ex: Kth Largest Element Selection.
Linear Algorithm for Kth Largest Selection We can write the algorithm in probabilistic recurrence terms as: E[Tn] = 1+1/n-1[E[Tn-1]+E[Tn-2]+ ………. ] = 1+E[Tn/2] Let x be the random variable uniformly selected from [1,n-1]. So E[Tn] can now be written as E[Tn] = 1+E[E[Tx]] ………………….. eq1
Linear Algorithm for Kth Largest Selection We’ll guess the result and try if we can fit in it. Guess E[Tn] <= = O(log n) ………eq2 Assume that eq2 is the right upper bound for all m<n then we shall show it is also true for n. E[Tn] = 1+ E[E[Tx]] E[Tn] <= f(n). Expected running time is Linear. Hence it is very fast for a Las Vegas algorithm to calculate the Kth Largest element.
Random Polynomial Class(RP) The problem belongs to RP if all these conditions are met: - For an input instance, if a solution exists then MonteCarlo algorithm can accept it with probability 0<‘a’<1. - However if the instance does not have a solution, then the probability of the algorithm rejecting it is 1. - The algorithm runs in polynomial time. - RP is actually Monte Carlo algorithm with one sided errors. - Monte Carlo and Min- Cut problem belongs to RP class.
Does Max – SAT belong to RP? Max – SAT problem does not belong to RP class since it is still exponential in ‘n’ variables or ‘m’ clauses even for repeated execution.
Zero Error Probabilistic Polynomial Class(ZPP) The problem belongs to ZPP if all these conditions are met: - If it always accepts with probability = 1. - If it always rejects with probability = 1. - Running time is polynomial in an expected sense. - Kth Largest Selection Problem belongs to ZPP class.