Categories
-
Recent Posts
Recent Comments
Tags
- a-ha moment
- algorithms
- anagrams
- binary trees
- birthday pairings
- Dynamic Programming
- finance
- geometric progressions
- graphs
- interview questions
- linked lists
- logarithms
- mathematics
- monte carlo
- numpy
- permutations
- prime numbers
- probability
- programming
- puzzle
- puzzles
- python
- quants
- recursion
- shortest path
- simulations
- stirling's approximation
- yield curves
- zero curves
Archives
Meta
Monthly Archives: April 2010
Birthday pairings
Here’s two classic birthday puzzles: How many people do you need in a room to have a better than 50% chance of finding at least one shared birthday among them? How many people do you need in a room with … Continue reading
Posted in puzzles
Tagged birthday pairings, logarithms, probability, stirling's approximation
1 Comment
A perfect hand, with some combinatorial tricks
Question: You deal the first 13 cards from a well shuffled, 52-card deck. What are the chances the 13 cards you deal are of the same suit? There’s a couple of ways to do this – both incorporate useful techniques … Continue reading
Puzzle – A safe place to drop an egg
This is a problem where it’s fairly easy to find the solution via trial and error, but not so easy to generalize. Question Let’s say you need to find out the highest floor in a 100 story building from which … Continue reading
Alternating coin toss – redux
I want to revisit a probability puzzle from a previous post: see Alternating coin toss game. You play a game where you alternate tossing a coin with a friend, and the first person to toss heads wins. But let’s make … Continue reading
Puzzle – Take your seats
Another problem that has an immediate intuitive answer, but can be tricky if you don’t have that insight. Question Let’s say there are 100 people, including you, waiting to board a fully booked flight, each with an assigned seat. The … Continue reading
Puzzle – Leaning Tower of Pisa
Let’s say you drop a ball from the Leaning Tower of Pisa, which is 179 ft high, and it bounces back 10% of the dropped height – 17.9 ft. Then on the second bounce it bounces up 10% again – … Continue reading
Puzzle – Break a stick to get a triangle
I read somewhere this is a Google interview question: Let’s say you drop a stick, breaking it randomly in 2 places, leaving you with 3 smaller sticks. What’s the probability you can make a triangle out of the 3 resulting … Continue reading