Catching a spy
1,447.7K Views
A spy is located on a one-dimensional line. At time 0, the spy is at location A. With each time interval, the spy moves B units to the right (if B is negative, the spy is moving left). A and B are fixed integers, but they are unknown to you. You are to catch the spy. The means by which you can attempt to do that is: at each time interval (starting at time 0), you can choose a location on the line and ask whether or not the spy is currently at that location. That is, you will ask a question like “Is the spy currently at location 27?” and you will get a yes/no answer. Devise an algorithm that will eventually find the spy.
Your Answer
More puzzles to try-
Apply your Logic
Given that (78)^9 = 6 And (69)^4 = 11 Can you find out (99)^2 =? (Note: This is Logical not ...Read More »Game of Chess
In the Chess Board picture below white army is arranged. You need to add a black army on the board ...Read More »A Girl with Her Large Family
There’s a girl who has a large family. She has an equal amount of brothers and sisters, but each brother ...Read More »Reducing nearby enemies
You are given an irreflexive symmetric (but not necessarily transitive) “enemies” relation on a set of people. In other words, ...Read More »The Deadly Dish
Two men went into a restaurant. They both ordered the same dish from the menu. After they tasted it, one ...Read More »Ek Gali Mein Bachay Khel Rahay Thae riddle
Only 1 hindi word fits all the Blanks, What is that word ? Hindi in English- Ek Gali Mein _____ ...Read More »House Distance Riddle
In a town, there are four houses located at different distances from each other. Following are the distances: The third ...Read More »Eight brothers Riddle
We are a group of eight brothers. We consider the weak, yet we protect the king in every battle. If ...Read More »Chance of Winning Lottery
The chance of Mr John winning the lottery is 10%. All participants lined up and Mr John is 4th in ...Read More »Fire and ice
Waking up I see a smile as warm as fire. Sleeping I see a gaze as cold as iceRead More »Career Choice
One day a little boy went over to his parents and said that he wanted to shoot people and blow ...Read More »How did he know?
One absentminded ancient philosopher forgot to wind up his only clock in the house. He had no radio, TV, telephone, ...Read More »What was the president of the United State’s name in 1980?
What was the president of the United State’s name in 1980?Read More »Boolean Enlightenment
The path to enlightenment lies behind one of two doors. In front of each door stands a guard who knows ...Read More »Tree Plantation Method puzzle
Emma has bought ten trees for her garden. She wants to plant these trees in five rows, with four trees ...Read More »Not for reading or writing
Which type of paper can not be used whether for reading or for writing ?Read More »A man and not a man Saw and did not see riddle
There is a story that a man and not a man Saw and did not see a bird and not ...Read More »Arrange the queens
Queens can move horizontally, vertically and diagonally any number of spaces as illustrated. One piece ‘attacks’ another if it moves ...Read More »Dog amongst Pandas
Can you find the dog hidden in a group of pandas?Read More »What is greater than God puzzle
What is greater than God, more evil than the devil, the poor have it, the rich need it, and if ...Read More »
Accenture Interview PuzzlesAdobe Interview PuzzlesAge RiddleAkbar Birbal PuzzlesAlgorithm PuzzlesAlphabet riddleAmazon Interview PuzzlesAnalytical MathematicsAptitude PuzzleBank PuzzlesBetting PuzzlesBrain TeasersCalendar PuzzlesCards PuzzlesChess Board PuzzleChess PuzzlesChristmas Puzzlecipher PuzzleCivil Services PuzzleClock time puzzleCognizant Interview PuzzlesCoins PuzzleComputational PuzzleconundrumCoronavirus PuzzleCoupondunia Interview PuzzleCritical Thinking Puzzledata analyticsData Structure Interview QuestionsDecode PuzzleDetective PuzzlesDice PuzzleDictionary Riddlesdifficult riddleEasy Math puzzlesEasy puzzlesEinstein puzzleEnglish RiddleFamily Tree Puzzlefamous puzzleFill in the blanks riddlesFinding Killer RiddlesFlipkart interview puzzlesFunny RiddlesGeneral KnowledgeGeographical PuzzleGoogle Code Jam 2014Google Interview PuzzlesGRE PuzzleHard Puzzle