Professional Documents
Culture Documents
Question 1 50 points
Lets say there is village. You enter that village knowing that there are One hundred people there, and some of them are Sachay and some Munafiq. And you want to know who is who? All you are allowed to do is ask a person Y the following type of question: Is Person Z Sacha?" Based on that answer, you can ask other People and so on. You can ask a question about any person to any other person.
The only information is that the majority of the people is Sachay.
Question: What is the maximum number of questions after which you'll know for sure which the Sachay are, and which are the Munafiqs? The lower is your no of questions, the more points you'll get (if you ask x questions, you get (300/x)*100 points). You get full 100 points if you can show that it can be done in at most 300 questions. Bonus: If you solve it less then x < 300 questions you will get (300-x)/3 extra-points.
Question 2
a) Prove that log(n!) = (nlogn).
(10+10+10+10+10)
ii)
for(int i=1;i<N;i*=2) { for(int j=1;j<i; j+=1) { for(int k=0;k<1000;k++) { } }
____________________________________________________________
iii) Solve the following recurrences and give its lower and upper bound
T(n) = 2T(n-1)+1 iv) Solve the following recurrences and give its lower and upper bound T(n) = 2T(n-1)+n v) Solve the recurrence and bound it: T(n) = T(n1/2) + n
Question 3:
(15+15)
Every nonzero rational number can be expressed as a product of two irrational numbers. (Hint use any irrational number in the proof). Prove that finding minimum from the array will take at least n-1 comparisons.
Question 4:
(15)
We know that there are infinitely many primes. If p and p + 2 both are prime (e.g. 17 and 19) then we call (p, p + 2) a Twin Prime pair. If p, p + 2 and p + 4 are primes then we call (p, p + 2, p + 4) a Thrin Prime triplets. Is there a finite number of Thrin Prime Triplets? Side Remark: The infinitude of Twin Prime pairs remains one of the oldest unsolved problem till date
(Twin Prime Conjecture).
Question 5
(10+15+15)
i=1ki*2i =(nlogn) Where k= logn But now if I changed the summation to be:
i=1ki*2k- i =(n)
Show that if f(x) = anxn + an-1xn-1 + + a1x + a0, where a0, a1, , an-1 and an are real numbers and an 0, then f(x) is (xn).