Brain Teasers & Puzzles
-
Consider a game that you play against an opponent. In front of you are an even number of coins of possibly different denominations. The coins are arranged in a line. You and your opponent take turns selecting coins. Each player takes one coin per turn and must take it from an end of the line, that is, the current leftmost coin or the current rightmost coin. When all coins have been removed, add the value of the coins collected by each player. It is possible that you and your opponent end up with the same value (for example, if all coins have the same denomination). Develop a strategy where you take the first turn and where your final value is at least that of your opponent (that is, don’t let your opponent end up with coins worth more than your coins).
Submit Solution- 1,576.5K views
- 0 answers
- 0 votes
-
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.
Submit Solution- 1,576.9K views
- 0 answers
- 0 votes
-
Consider the following array operations. Init(N,d) initializes an array of N elements so that each element has value d. Once Init has been called, the following two operations can be applied: For any i such that 0 <= i < N, Get(i) returns the array element at position i and Set(i,v) sets the array element at position i to the value v.
Given any amount of memory you want, implement the three operations so that each operation has an O(1) time complexity.
Submit Solution- 1,576.6K views
- 0 answers
- 0 votes
-
100 prisoners agree on a strategy before playing the following game: One at a time (in some unspecified order), each of the prisoners is taken to a courtyard where there is a line of 100 boxes. The prisoner gets to make choices to open 50 of the boxes. When a box is opened, it reveals the name of a prisoner (the prisoners have distinct names). The names written in the boxes are in 1-to-1 correspondence with the prisoners; that is, each name is found in exactly one box. If after opening 50 boxes, the prisoner has not found his own name, the game is over and all the prisoners lose. But if the prisoner does find the box that contains his name among the 50 boxes he opens, then the prisoner is taken to the other side of the courtyard where he cannot communicate with the others, the boxes are once again closed, and the next prisoner is brought out into the courtyard. If all prisoners make it to the other side of the courtyard, they win.
One possible strategy is for each prisoner to randomly select 50 boxes and open them. This gives the prisoners 1 chance out of 2100 to win–a slim chance, indeed. But the prisoners can do better, using a strategy that for a random configuration of the boxes will give them a larger chance of winning. How good a strategy can you develop?
Submit Solution- 1,576.4K views
- 0 answers
- 0 votes
-
A park contains paths that intersect at various places. The intersections all have the properties that they are 3-way intersections and that, with one exception, they are indistinguishable from each other. The one exception is an intersection where there is a restaurant. The restaurant is reachable from everywhere in the park. Your task is to find your way to the restaurant.
The park has strict littering regulations, so you are not allowed to modify the paths or intersections (for example, you are not allowed to leave a note an intersection saying you have been there). However, you are allowed to do some bookkeeping on a pad of paper that you bring with you at all times (in the computer-science parlance, you are allowed some state). How can you find the restaurant?
You may assume that once you enter an intersection, you can continue to the left, continue to the right, or return to where you just came from.
Submit Solution- 1,576.4K views
- 0 answers
- 0 votes
-
Given is a (possibly enormous) rectangular chocolate bar, divided into small squares in the usual way. The chocolate holds a high quality standard, except for the square in the lower left-hand corner, which is poisonous. Two players take turns eating from the chocolate in the following manner: The player whose turn it is points to any one of the remaining squares, and then eats the selected square and all squares positioned above the selected square, to the right of the selected square, or both above and to the right of the selected square. Note, although the board starts off rectangular, it may take on non-rectangular shapes during game play. The object of the game is to avoid the poisonous square. Assuming the initial chocolate bar is larger than 1×1, prove that the player who starts has a winning strategy.
Hint: To my knowledge, no efficient strategy for winning the game is known. That is, to decide on the best next move, a player may need to consider all possible continuations of the game. Thus, you probably want to find a non-constructive proof. That is, to prove that the player who starts has a winning strategy, prove just the existence of such a strategy; in particular, steer away from proofs that would construct a winning strategy for the initial player.
Submit Solution- 1,576.8K views
- 0 answers
- 0 votes
-
You are given an irreflexive symmetric (but not necessarily transitive) “enemies” relation on a set of people. In other words, if person A is an enemy of a person B, then B is also an enemy of A. How can you divide up the people into two houses in such a way that every person has at least as many enemies in the other house as in their own house?
Hint: Planar configuration of straight connecting lines puzzle may provide a hint to solving this puzzle.
Submit Solution- 1,576.6K views
- 0 answers
- 0 votes
-
Given an even number of points in general positions on the plane (that is, no three points co-linear), can you partition the points into pairs and connect the two points of each pair with a single straight line such that the straight lines do not overlap?
Submit Solution- 1,576.7K views
- 0 answers
- 0 votes
-
Someone picks, at their will, two cards from a deck of cards. The cards have different numbers, so one is higher than the other. (In other words, the person picks two distinct numbers in the inclusive range 1 through 13.) The cards are placed face down on a table in front of you. You get to choose one of the cards and turn it face up. Now, you will select one of the two cards (one of whose face you can see, the other one you can’t). If you select the highest card, you win. Design a card-selection strategy for which your chance of winning is strictly greater than 50%.
Submit Solution- 1,576.3K views
- 0 answers
- 0 votes
-
Fill in the clues to reveal the hidden message, in this holiday and cold weather puzzle, from us to you.
Using the clues given, fill in the grid boxes with the answers. In the grid, each horizontal row is one clue and the clues should be entered from the top down. So the first horizontal row goes with clue 1, the second horizontal row goes with clue 2, etc. When the grid is complete, read the highlighted boxes from top to bottom for the hidden message.
HINT: Some of the clues are one word, some are two. Don’t leave spaces between the words when entering a two word answer.
- The Coldest Season of the Year
- Spicy, hot drink to ward off chills
- For kissing your beau under
- A hot stone for your feet & a horse to pull you through the snow
- Zipping down the mountain trails, diamond back to bunny hill
- Warmers for your hands
- Tasty drink that’s good with brandy & nutmeg added
- These sparkling beauties are nature made
- Green trailing plant
- The cookie that makes a house
- Festive greens for your front door
- Red & white sticks of pure pleasure
- No two alike they mantle the ground in cold weather
- Pretty plants with red leaves that form the flower
- Something for the fireplace
- Father Time and Baby _____ ________
- Long tailed headgear with a pompom on the end
- Waltzing around the icy pond
- Gaily wrapped with a bright red bow
- This cake like dessert can be made using the real fruit
- This plant has sharp green leaves and little red berries
- String these on the trees – inside and out
- Three balls of snow, a felt hat and a carrot nose
- The horses prance while wearing these
- An Eskimo’s house
- Down the hill on the snow – whee!
- Sing a merry song to your neighbors
- If you go to one you should bring a gift for the hostess
Submit Solution- 1,576.8K views
- 0 answers
- 0 votes
More puzzles to try-
can’t read sign
Christina is outside a shop. She cant read the signs but she knows she needs to go in to make ...Read More »Cut the chain riddle
What is the least number of links you can cut in a chain of 21 links to be able to ...Read More »Face and two hands but no arms or legs
What has a face and two hands but no arms or legs?Read More »Ask Owl and reach to WonderLand
Mr. PK was all set to go to the village of WonderLand to meet his friend. So, he packed his ...Read More »Time Zones
Client Dempsey living in one of the East Coast states of the U.S. was talking to Landon Donovan, who was ...Read More »Puzzle fry Derby
After the local Puzzle fry Derby, some friends were telling everyone who had won. Unfortunately, the friends were having problems ...Read More »Dog bite
Male: Does your dog bite? Female: No All of a sudden the dog bites the male on his leg. Yet ...Read More »Tree’s Doubling
A tree doubled in height each year until it reached its maximum height over the course of ten years. How ...Read More »Find the Mobile lost in the Rug
Can you find the hidden mobile that is lost in the rug?Read More »Can you deduce the password from that?
In a secret society, a buried chamber can be accessed only via a secret password. The password is seven characters ...Read More »Typical Mathematics Expression
You are given with six numbers – 1, 2, 3, 4, 5 and 6. You can arrange them in any ...Read More »What happened?
A man is found dead in a phone booth in a pool of blood. The glass on either end of ...Read More »What did he lose?
A man goes into a barbershop and gets a $15 haircut. He pays the barber with a $20 bill, but ...Read More »Solve the Table Riddle
Find The Missing Number, 99% of People Fail To Solve This Table, Can You?Read More »Arrange the Chairs
Me, You, Marry, and Will eat together, how do you arrange the chairs so that it would become a sentence?Read More »Always in front of you riddle
What is always in front of you but can’t be seen?Read More »One have five riddle
This is what you use to write But it is not a pen One of these has five fingers And ...Read More »Odd even riddle
If, Even numbers are Red and odd numbers are Black… …what colour is Black + Black?Read More »A PING-PONG BALL IN A HOLE
Your last good ping-pong ball fell down into a narrow metal pipe imbedded in concrete one foot deep. How can ...Read More »Enemy Challenge
Our enemy challenges you to play Russian Roulette with a 6-cylinder pistol (meaning it has room for 6 bullets). He ...Read More »