Showing posts with label guess. Show all posts
Showing posts with label guess. Show all posts
Thursday, February 6, 2014
Searching on a chess board
Alice fills each cell of an $n \times n$ chess board with real numbers, such that there is exactly one zero somewhere on that board. The rest of the cells could be filled with positive or negative numbers, so that all numbers are distinct. Furthermore, she filled it such that each row is sorted from left to right and each column is sorted from top to bottom.
Now she asks Bob to find the location of the zero via a guessing game. Bob is told about the sortedness of the board and that all numbers are distinct, but he doesn't know the numbers themselves. He is allowed to make a series of guesses (of locations), and after each guess, he would be told the number on that cell. The game ends when Bob discovers the zero.
Show that Bob can devise a strategy that guarantees discovery after $2n-1$ guesses.
Show that there is no strategy that guarantees discovery with less than $2n-1$ guesses.
Labels:
array,
chess board,
Combinatorics,
guess,
linear time,
saddleback,
sorted
Friday, October 9, 2009
Room and Lights Game
This problem is identical to this one but reworded for better clarity.
Alice is playing a game against Bob and Charlie. In a room, there are 27 lights with individual switches, some of them could be turned on or off. Bob enters the room while Charlie waits outside. Alice will tell Bob a number from 1 to 27. Bob then is allowed to flip at most 3 switches if he wishes. Then Bob exits and Charlie enters the room. He has to, upon examining the lights, guess the number that Alice told Bob. Neither Bob nor Charlie knows the configuration of the lights before Bob entered the room.
How can Bob and Charlie agree on a strategy to win this game?
Harder version: 15 lights, but Alice tells Bob a number from 1 to 16, and Bob can only flip at most one switch.
Alice is playing a game against Bob and Charlie. In a room, there are 27 lights with individual switches, some of them could be turned on or off. Bob enters the room while Charlie waits outside. Alice will tell Bob a number from 1 to 27. Bob then is allowed to flip at most 3 switches if he wishes. Then Bob exits and Charlie enters the room. He has to, upon examining the lights, guess the number that Alice told Bob. Neither Bob nor Charlie knows the configuration of the lights before Bob entered the room.
How can Bob and Charlie agree on a strategy to win this game?
Harder version: 15 lights, but Alice tells Bob a number from 1 to 16, and Bob can only flip at most one switch.
Subscribe to:
Posts (Atom)