quiz 4 february 14 2008
play

Quiz 4 February 14, 2008 Nabil Mustafa 20 mins Q1. There are 100 - PDF document

Lahore University of Management Sciences Winter 07-08 CS 211a: Discrete Mathematics 1 Quiz 4 February 14, 2008 Nabil Mustafa 20 mins Q1. There are 100 students in some school, and some of them honest and some dishonest. Imagine yourself to


  1. Lahore University of Management Sciences Winter 07-08 CS 211a: Discrete Mathematics 1 Quiz 4 — February 14, 2008 Nabil Mustafa 20 mins Q1. There are 100 students in some school, and some of them honest and some dishonest. Imagine yourself to be a new student at that school, and you want to find out who is an honest student, and who is a dishonest student. All you are allowed to do is ask a student Y the question: “Is student Z honest?”. Based on that answer, you can ask other questions. You can ask a question about any student to any other student. The honest students always tell the correct answer, but the dishonest ones may or may not tell the correct answer. Assume that the majority of the students are honest. Question: Show that by asking at most 198 questions, you can find the honest/dishonest students. Anything more than 198 gets a zero. 5 points. The main goal is to find one honest student with at most 100 questions. Once we find him, with another 100 questions, we know about everyone. First, there are some properties of questions that I’ll state, but not prove since I hope everyone can do them: Claim 1 : If I ask student a about student b , and a says that b is dishonest, then at least one of a or b is dishonest. Claim 2 : If I ask student a about student b , and a says that b is honest, and I know that exactly one of a or b is honest, then it has to be b that is honest. We’ll find one honest student inductively, and get a recurrence for the total questions asked. So, say that we are given s 1 , . . . , s n to be n students, and we know that the majority are them are honest. We are now going to reduce them to at most n/ 2 students, where the majority is still honest. And in this reduction, we will ask only n/ 2 questions. So, how to reduce to n/ 2 students where the majority is still honest? There are two cases, depending on n being odd or even. Even is easier, so lets do that first. We are given s 1 , . . . , s n to be n students, where n is even. Pair the students in groups of two, say ( s 1 , s 2 ), ( s 3 , s 4 ) and so on. And in each pair, we ask s 2 i − 1 about s 2 i . If the answer is ”dishonest”, we throw this pair away. After going over all the pairs, we have asked n/ 2 questions, and now all the remaining pairs have said ”honest” about their partner. Claim 3 : In these (possibly) fewer than n/ 2 pairs, the majority are still honest. This follows from Claim 1 . In each remaining pair, throw away the first student, and keep the second. I.e., if s 2 i − 1 was asked about s 2 i , throw away s 2 i − 1 , and keep s 2 i . Since in each pair we throw away one student, the remaining students are at most n/ 2. Critical Claim 4 : The remaining students still have majority honest. Why? Divide all the remaining pairs (which had said ’honest’ about their partner) into three types: pairs in which both 1

  2. students are honest, pairs in which both are dishonest, and pairs in which one is honest, and the other dishonest. The mini-claim is that the number of pairs where both are honest is greater than the number of pairs where both are dishonest. This is because the third type has one honest/one dishonest, so in the honest-honest and dishonest-dishonest pairs, the majority must be honest. Finally, when we pick the second student in each pair, we get majority honest from the students picked from honest-honest, and dishonest-dishonest pairs. The last type will always give us an honest student (from Claim 2 ). So, from Claim 4 , we know that the majority is honest in the remaining n/ 2 students, and we inductively solve the problem. So, the total number of questions asked, T ( n ), are: T ( n ) ≤ T ( n/ 2) + n/ 2, which solves to n . We are given s 1 , . . . , s n to be n students, where n is odd. This is more tricky. First keep one student aside (but don’t throw away!), and make pairs as before. If there are any ”dishonest” answer in any pair, throw that pair away, just as before. The remaining pairs all say ’honest’. Total number of students present (including the student we had put aside) is still odd; say m students left. Now there are two more cases, depending on whether ⌈ m/ 2 ⌉ is even (e.g., number 27) or odd (e.g., number 25). Case where ⌈ m/ 2 ⌉ is odd: As before, take the second student in each pair, and keep the student we had put aside. The claim is that majority are honest. You should work out the proof on your own, I show it with one example. Say m = 25, then at least 13 honest, and at most 12 dishonest. The case where we had put aside an honest student is easier, so lets look at the other case, where we put aside a dishonest student. Then, the pairs have 13 − 11 honest/dishonest students. Then there is one pair of dishonest-honest student saying ’honest’, so we include one honest there, at least. The remaining 12 − 10 can give 6 honest, and 5 dishonest. Overall, adding in the dishonest student we had put aside, we get 6 + 1 honest students, and 5 + 1 dishonest students. You can do the above for the general case. Case where ⌈ m/ 2 ⌉ is even: As before, take the second student in each pair. But this time, throw away the student we had put aside. The claim is that majority are honest. You should work out the proof on your own, I show it with one example. Say m = 27, then at least 14 honest, and at most 13 dishonest. The case where we had put aside an dishonest student is easier (since we throw him away anyway), so lets look at the other case, where we throw away an honest student. Then, the pairs have 13 − 13 honest/dishonest students. Then there is one pair of dishonest-honest student saying ’honest’, so we include one honest there, at least. The remaining 12 − 12 can give 6 honest, and 6 dishonest. Overall, we get 6 + 1 honest students, and 6 dishonest students. You can do the above for the general case. Q2. For any 2-connected graph G , and for every pair of edges in G , there exists a cycle in G that contains them both. 5 points. Take this G , and lets say the two edges are e and f . And we know that G is 2-connected. Subdivide e (to get a new vertex z 1 ), and subdivide f (to get a new vertex z 2 ). The new graph, say G ′ , is 2

  3. still 2-connected. Therefore, z 1 and z 2 are part of a cycle in G ′ . This same cycle, when mapped to the graph G , contains both e and f . 3

Recommend


More recommend