Let us solve some math/logic puzzles.

1. Given a number N, count the 2’s between 0 and N. You should count every occurrence of 2 (in any position in the number). For example, if N=8, answer = 1 (only 2). If N=24, answer = 8 (2, 12, 20, 21, 22, 23, 24), note each digit of 22, is counted.
2. In China Number 4 is considered unlucky, so they do not use it at all. They have their floor numbers without the digit 4. Their building floors go from 1,2,3,(skip 4), 5,6,7…13,15…23,25…33,35…39,50… Given a Chinese floor number C1239, what is the real floor number?
3. Given a time, say 3:15:00,
• What is the angle between the hours hand and the minutes hand?
• What is the angle between the hours hand and the seconds hand?
4. You are given a coin with two sides. One side has the number 1 and the other has number 2? If you flip the coin three times, what is the probability that the sum of the numbers on the landing side is greater than 4? and why?
5. Suppose you have a 3 liter jug and a 5 liter jug. You have an infinite water source, and a empty tank. How could you transfer exactly 4 liters of water using only those jugs and as much extra water as you need to the tank? Note: Minimize the number of transfers.
• Make all values from 1 liter to 20 liters.
• How will this work if this was a 3 minute sand timer and 5 minute sand timer and your goal was to cook vegetables for n minutes (where n is between 1 to 20)?
6. A mythical city contains 100,000 married couples but no children. Each family wishes to “continue the male line”, but they do not wish to over-populate. So, each family has one baby per annum until the arrival of the first boy. For example, if (at some future date) a family has five children, then it must be either that they are all girls, and another child is planned, or that there are four girls and one boy, and no more children are planned. Assume that children are equally likely to be born male or female. Let p(t) be the percentage of children that are male at the end of year t. How is this percentage expected to evolve through time?
7. A man has three daughters. A second, intelligent man, asked him the ages of his daughters. The first man told him that the product of his daughter’s ages was 36. After thinking the second man was unable to find the answer and asked for another clue. The first man replies the sum of his daughter’s ages is equal to his house door number. Still the second man was unable to answer and asked for another clue. The first man told him that his youngest daughter had blue eyes, and suddenly second man gave the correct answer. How? What are the ages?
8. Identify the defective “ball” using a simple balance scale (that shows which side is heavy). Generic problem statement: You are given “n” balls, one of them is either heaver or lighter. Find out which one is defective with the minimum number of weighings.
1. You are given 9 balls, you know one of them is lighter.
2. You are given 13 balls. The defective ball may be heavier or lighter. You are given additional supply of perfect balls.
3. How many defective balls can you resolve in N weighings? 1, 2, 3, 4?
9. You have a race with 25 horses, and you want to pick the fastest 3 horses.  The race track has only 5 slots, so each race can have only 5 horses. What is the minimum number of races required to find the 3 fastest horses without using a stopwatch? You cannot compare performance across races.
10. You have a room full of coins that has been randomly dumped, evenly spread with no overlaps. A robot picks up a random coin from floor. If it was a showing tails, it turns the coin over and sets it down as heads. If it was showing heads, it throws it in the air and lets it land on the floor. Assume no coin is on top of another coin ever. After the robot is doing this for millions of repetition, what would you expect the coins in the room to show? Will they ever converge?
• What if we had six-sided die instead of coin? If the face value is 1,2,3,4 or 5, the robot sets it down as value+1 (so 1 becomes 2, 2 becomes 3 …). If face value is 6, it tosses it up in the air.