CISC 235 Lecture Notes - Lecture 1: Autocomplete
Document Summary
Before getting into the subject at hand, i gave the class a problem to think about: This is a 2- player game using 3 coins. The coins will be used to generate a sequence of h (heads) and t (tails). After the players have chosen their sequences, the coins are tossed to create an initial sequence of length 3. If the initial sequence matches the sequence chosen by either player, that player wins the game. Otherwise, the first coin is tossed again and added to the end of the sequence. The player whose sequence comes up first is the winner. For example, suppose the players choose hht and tht, as above. The coins are tossed and the initial sequence is tth. This does not match either chosen sequence so the first coin (t) is tossed again. This is still not a match for either player, so the oldest coin (t) is removed and tossed again.