Riddle #678

logicmathprobability

The same birthday

What is the least number of people that need to be in a room such that there is greater than a 50% chance that at least two of the people have the same birthday?
Only 23 people need to be in the room. Our first observation in solving this problem is the following: (the probability that at least 2 people have the same birthday + the probability that nobody has the same birthday) = 1.0 What this means is that there is a 100% chance that EITHER everybody in the room has a different birthday, OR at least two people in the room have the same birthday (and these probabilities don't add up to more than 1.0 because they cover mutually exclusive situations). With some simple re-arranging of the formula, we get: the probability that at least 2 people have the same birthday = (1.0 - the probability that nobody has the same birthday) So now if we can find the probability that nobody in the room has the same birthday, we just subtract this value from 1.0 and we'll have our answer. The probability that nobody in the room has the same birthday is fairly straightforward to calculate. We can think of this as a "selection without replacement" problem, where each person "selects" a birthday at random, and we then have to figure out the probability that no two people select the same birthday. The first selection has a 365/365 chance of being different than the other birthdays (since none have been selected yet). The next selection has a 364/365 chance of being different than the 1 birthday that has been selected so far. The next selection has a 363/365 chance of being different than the 2 birthdays that have been selected so far. These probabilities are multiplied together since each is conditional on the previous. So for example, the probability that nobody in a room of 3 people have the same birthday is (365/365 * 364/365 * 363/365) =~ 0.9918 More generally, if there are n people in a room, then the probability that nobody has the same birthday is (365/365 * 364/365 * ... * (365-n+2)/365 * (365-n+1)/365) We can plug in values for n. For n=22, we get that the probability that nobody has the same birthday is 0.524, and thus the probabilty that at least two people have the same birthday is (1.0 - 0.524) = 0.476 = 47.6%. Then for n=23, we get that the probability that nobody has the same birthday is 0.493, and thus the probabilty that at least two people have the same birthday is 1.0 - 0.493) = 0.507 = 50.7%. Thus, once we get to 23 people we have reached the 50% threshold.
91.22 %
48 votes

Similar riddles

See also best riddles or new riddles.

logicmath

Appleland to Bananaville

You have been given the task of transporting 3,000 apples 1,000 miles from Appleland to Bananaville. Your truck can carry 1,000 apples at a time. Every time you travel a mile towards Bananaville you must pay a tax of 1 apple but you pay nothing when going in the other direction (towards Appleland). What is highest number of apples you can get to Bananaville?
833 apples. Step one: First you want to make 3 trips of 1,000 apples 333 miles. You will be left with 2,001 apples and 667 miles to go. Step two: Next you want to take 2 trips of 1,000 apples 500 miles. You will be left with 1,000 apples and 167 miles to go (you have to leave an apple behind). Step three: Finally, you travel the last 167 miles with one load of 1,000 apples and are left with 833 apples in Bananaville.
94.59 %
47 votes

logicmath

How long was he walking

Every day, Jack arrives at the train station from work at 5 pm. His wife leaves home in her car to meet him there at exactly 5 pm, and drives him home. One day, Jack gets to the station an hour early, and starts walking home, until his wife meets him on the road. They get home 30 minutes earlier than usual. How long was he walking? Distances are unspecified. Speeds are unspecified, but constant. Give a number which represents the answer in minutes.
The best way to think about this problem is to consider it from the perspective of the wife. Her round trip was decreased by 30 minutes, which means each leg of her trip was decreased by 15 minutes. Jack must have been walking for 45 minutes.
94.24 %
44 votes

logicprobability

Russian roulette choice

Your enemy challenges you to play Russian Roulette with a 6-cylinder pistol (meaning it has room for 6 bullets). He puts 2 bullets into the gun in consecutive slots, and leaves the next four slots blank. He spins the barrel and hands you the gun. You point the gun at yourself and pull the trigger. It doesn't go off. Your enemy tells you that you need to pull the trigger one more time, and that you can choose to either spin the barrel at random, or not, before pulling the trigger again. Spinning the barrel will position the barrel in a random position. Assuming you'd like to live, should you spin the barrel or not before pulling the trigger again?
You are better off shooting again without spinning the barrel. Given that the gun didn't fire the first time, it was pointing to one of the four empty slots. Because your enemy spun the cylinder randomly, it would have been pointing to any of these empty slots with equal probability. Three of these slots would not fire again after an additional trigger-pull, and one of them would. Thus, by not spinning the barrel, there is a 1/4 chance that pulling the trigger again would fire the gun. Alternatively, if you spin the barrel, it will point to each of the 6 slots with equal probability. Because 2 of these 6 slots have bullets in them, there would be a 2/6 = 1/3 chance that the gun would fire after spinning the barrel. Thus, you are better off not spinning the barrel.
94.11 %
43 votes

logicprobability

Red and blue marbles

Your friend shows you two jars, one with 100 red marbles in it, the other with 100 blue marbles in it. He proposes a game. He'll put the two jars behind his back and tell you to pick one of them at random. You'll then close your eyes, he'll hand you the jar you picked, and you'll pick a random marble from that jar. You win if the marble you pick is blue, and you lose otherwise. To give you the best shot at winning, your friend gives you the two jars before the game starts and says you can move the marbles around however you'd like, as long as all 200 marbles are in the 2 jars (that is, you can't throw any marbles away). How should you move the marbles around to give yourself the best chance of picking a blue marble?
Put one blue marble in one jar, and put the rest of the marbles in the other jar. This will give you just about a 75% chance of picking a blue marble.
94.11 %
43 votes

logicmath

A grandfather's clock

A grandfather's clock chimes the appropriate number of times to indicate the hour, as well as chiming once at each quarter hour. If you were in another room and hear the clock chime just once, what would be the longest period of time you would have to wait in order to be certain of the correct time?
You would have to wait 90 minutes between 12:15 and 1:45. Once you had heard seven single chimes, you would know that the next chime would be two chimes for 2 o'clock.
93.98 %
42 votes

logicmath

A fly in between trains

Two trains are traveling toward each other on the same track, each at 60 miles per hour. When they are exactly 120 miles apart, a fly takes off from the front of one of the trains, flying toward the other train at a constant rate of 100 miles per hour. When the fly reaches the other train, it instantly changes directions and starts flying toward the other train, still at 100 miles per hour. It keeps doing this back and forth until the trains finally collide. If you add up all the distances back and forth that the fly has travelled, how much total distance has the fly travelled when the trains finally collide?
The fly has travelled exactly 100 miles. We can figure this out using some simple math. Becuase the trains are 120 miles apart when the fly takes off, and are travelling at 60 mph each, they will collide in exactly 1 hour. This gives the fly exactly 1 hour of flying time, going at a speed of 100 miles per hour. Thus, the fly will travel 100 miles in this hour.
93.98 %
42 votes

logicmath

Land of Brainopia

In the land of Brainopia, there are three races of people: Mikkos, who tell the truth all the time, Kikkos, who always tell lies, and Zikkos, who tell alternate false and true statements, in which the order is not known (i.e. true, false, true or false, true, false). When interviewing three Brainopians, a foreigner received the following statements: Person 1: I am a Mikko. Person 2: I am a Kikko. Person 3: a. They are both lying. b. I am a Zikko. Can you help the very confused foreigner determine who is who, assuming each person represents a different race?
Person 1 is a Miko. Person 2 is a Ziko. Person 3 is a Kikko.
93.98 %
42 votes

logicmath

In a bank

A women walks into a bank to cash out her check. By mistake the bank teller gives her rupee amount in change, and her paise amount in rupees. On the way home she spends 5 paise, and then suddenly she notices that she has twice the amount of her check. How much was her check amount ?
The check was for Rupees 31.63. The bank teller gave her Rupees 63.31 She spent .05, and then she had Rupees 63.26, which is twice the check. Let x be the rupees of the check, and y be the paise. The check was for 100x + y paise He was given 100y + x paise Also 100y + x - 5 = 2(100x + y) Expanding this out and rearranging, we find: 98y = 199x + 5 or 199x ≡ -5 (mod 98) or 98*2*x + 3x ≡ -5 (mod 98) 3x ≡ -5 ≡ 93 (mod 98) this quickly leads to x = 31
93.84 %
41 votes

animallogicmath

Ants on a Board

There are 100 ants on a board that is 1 meter long, each facing either left or right and walking at a pace of 1 meter per minute. The board is so narrow that the ants cannot pass each other; when two ants walk into each other, they each instantly turn around and continue walking in the opposite direction. When an ant reaches the end of the board, it falls off the edge. From the moment the ants start walking, what is the longest amount of time that could pass before all the ants have fallen off the plank? You can assume that each ant has infinitely small length.
The longest amount of time that could pass would be 1 minute. If you were looking at the board from the side and could only see the silhouettes of the board and the ants, then when two ants walked into each other and turned around, it would look to you as if the ants had walked right by each other. In fact, the effect of two ants walking into each other and then turning around is essentially the same as two ants walking past one another: we just have two ants at that point walking in opposite directions. So we can treat the board as if the ants are walking past each other. In this case, the longest any ant can be on the board is 1 minute (since the board is 1 meter long and the ants walk at 1 meter per minute). Thus, after 1 minute, all the ants will be off the board.
93.84 %
41 votes

logicmath

Moochers

A man who lives in Middletown has two girlfriends, one in Northtown and one in Southtown. Trains from the Middletown train station leave for Northtown once every hour. Separate trains from the station also leave for Southtown once every hour. No trains go to both Northtown and Southtown. Each day he gets to the Middletown train station at a completely random time and gets onto the first train that is going to either Northtown or Southtown, whichever comes first. After a few months, he realizes that he spends 80% of his days with his girlfriend from Northtown, and only 20% of his days with his girlfriend from Southtown. How could this be?
The train to Northtown leaves every hour, on the hour (9:00AM, 10:00AM, etc...). The train to Southtown leaves at 12 after the hour (9:12AM, 10:12AM, etc...). So there is only a 12/60 (1/5) chance that he will end up on the train to Southtown each day, since he will usually get to the station during the 48 minutes of each hour when the train to Northtown will be the next to come.
93.84 %
41 votes