Unformatted text preview:

Lecture 6 Enoch Cheung September 12 2013 1 2 people sit facing each other players I and II A third person secretly writes 2 consecutive natural numbers on 2 slips of paper and tapes each piece on the 2 players foreheads Player I can see the number on Player II s forehead and vice versa but neither can see their own but they know that the numbers are consecutive natural numbers On the first turn player I asks II if she knows her number If she says yes the game ends If not player I s turn ends and player II asks player I if he knows his number If he says yes the game ends If not it s player I s turn and the game proceeds exactly the same Assuming player I and player II are both perfect reasoners and nobody says yes unless they are absolutely certain about their number does the game ever end Go over the question as to whether the game mentioned above ends or not They will have an idea that it will always end and how but it ll probably need to be fleshed out After their conjecture ask them How can we write this as an inductive argument and What are we going to induct on The basic idea of the proof is Let n denote the lower of the 2 numbers this is what we are going to induct on and then prove the stronger claim that the game will end in no more than 2n moves They should be able to determine what is the base case what the inductive hypothesis should be and how to prove the inductive step how are we going to relate the situation in which the lower number is k 1 to the situation in which the lower number is k Base case If player I sees 1 then player I s number is 2 so the game ends in 1 turn If player I says no and player II sees 1 then player II s number is 2 so the game ends in 2 turns Inductive case Assume the game ends in 2n turns if the lowest number is n Consider the case where n 1 is the lowest number Then if the first two turns neither player says yes then we have eliminated 1 from the pool of possible numbers After the first two turns both players gain the information that 1 is eliminated from the pool of possible numbers So for the remaining game both players can subtract 1 from the number they see to obtain the original game as if neither player has information After subtracting 1 the lowest number becomes n so the game will now end in 2n turns Including the first 2 turns the total number of turns is at most 2n 2 Note that in this proof we not only answered the question but made an upper bound for the length of the game Why was this included in the proof 2 The Coin Removal Problem Let a string be a row of coins without gaps and without other coins beyond the ends We write a string as a list of Hs and T s When we remove an H we leave a gap marked by a dot and we flip all of the at most two coins next to it that remain Thus HHT becomes T H when we remove the H in the middle We then get T when we remove the new H Removing a coin from a string leaves two strings except when we remove the end We begin with a string of length n Examination of examples suggests that we can empty a string remove all its coins if and only if it has an odd number of Hs We prove this by strong induction on n Base case A string of length 1 with an odd number of Hs must be the string H which is emptied in 1 turn A string of length 1 with an even number of Hs must be the string T which cannot be emptied Inductive case Suppose all strings of length m n can be emptied if and only if there are an odd number of Hs Consider a string of length n with x the number of Hs If x 0 then the string cannot be emptied Otherwise remove the first H from the left The dot it creates partitions the sequence into two strings of length n where the left sequence has exactly 1 H and the right 1 sequence has either x or x 2 Hs depending on the what follows the H we remove T H H T T z z T T T zHT T xHs 1Hs x 2Hs T H T z T HH T T z T T T z xHs 1Hs x 2Hs thus if x is odd both the left sequence and the right sequence can be emptied by the inductive hypothesis So we empty the left one and then the right one without it affected each other since they are isolated by a dot and we have emptied the entire sequence Otherwise if x is even then if the first H removed is the left most one we get the right sequence from the above 2 cases meaning that there are x 2 Hs so there is an even number of Hs so by inductive hypothesis the remaining sequence cannot be emptied The case where the first H is the right most is the same If first H removed is in the middle there are four possible cases T HT H H T HH H T HHT T H HHH T T In the first case the number of Hs is x 1 in the next two cases the number of Hs is x 1 for the last case the number of Hs is x 3 Thus if x is even the total number of Hs is odd so split between two sequences one of the sequence must contain an even number of Hs so it cannot be emptied Thus the whole sequence cannot be emptied 2


View Full Document

CMU MSC 21127 - lec6

Documents in this Course
lec27

lec27

2 pages

lec26

lec26

2 pages

lec25

lec25

2 pages

lec24

lec24

2 pages

lec21

lec21

2 pages

lec20

lec20

2 pages

lec16

lec16

2 pages

lec14

lec14

2 pages

lec12

lec12

2 pages

lec11

lec11

2 pages

lec9

lec9

2 pages

Load more
Loading Unlocking...
Login

Join to view lec6 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lec6 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?