Вы находитесь на странице: 1из 1

Tutorial 5

PNC
September 19, 2017

1 Instructions
1. The tutorial will be discussed in the class next week. The exact date will be mailed to you.

2. In case of any doubt or clarification wrt any question, please open a thread on the google
group pnc@iitrpr.ac.in and initiate a discussion.

2 Questions
1. In the polynomial verification problem we have done in class, we chose a random number
from the range {1, 2, ...., 106 d}. The variable was chosen with replacement. Obtain the error
bound for the problem if this random variable is chosen without replacement. (Rating **)
2. Explain how the polynomial verification algorithm discussed in the class can be used to test
if there is a perfect matching in the given bipartite graph. Hint : Determinant of adjacency
matrix of a bipartite graph having a perfect matching is non zero. (Rating ***)
3. Given two functions, F : {1, ..., n − 1} → {1, ..., m − 1}. Given that for 0 ≤ x, y ≤ n − 1,
F ((x + y)modn) = (F (x) + F (y))modm. The values of F are stored in a database. One
of the administrator of the database mistakenly changes 1/3 of the entries in the database
(database holding the values of F ). Describe a simple randomized algorithm, which when
given z determines F (z) correctly with a probability at least 1/2. How can you improve
the performance of your method, if you are allowed to use your initial algorithm 5 times?
(Rating ***)
4. We are aware with the coalescing process in Karger’s algorithm for finding min cut. Assume
that the graph is having only one min cut. You take one edge at a time uniformly at random
and coalesce it. You keep doing it till the time only two vertices are left in the graph. What
is the probability that you end up getting a min cut. (Rating ***)
5. If we repeat the process described in question 3, λ times, and choose the min cut amongst
all the solutions, what is the probability that we end up getting a min cut. (Rating **)

6. Consider the stupid sort algorithm below. What is its time complexity?

void stupidSort(int [ ]array){


while (!sorted(array)){
shuffle(array)
}}

(Rating **)
7. If the numbers in the array that is to be sorted are distributed uniformly at random from a
range, how can you make your binary search algorithm smarter? (Rating *)

Вам также может понравиться