What better way to learn it than to teach it…? This section includes articles that are me trying to understand better the things I've read by teaching.

Binomial theorem

Given the math problem (a+b)^2. You are required to expand it to its terms. There's different ways to go about this. One way is to multiply (a+b) into (a+b). That would give us a(a) + a(b) + b(a) + b(b) which would result in a^2 + ab + ba + b^2 which essentially is a^2 + 2ab + b^2. But what if we replace the power 2 with some bigger number, say, 4. It becomes an impractical task solving this with rudimentary expansion.

What is a combination

In previous posts I defined a permutation and a factorial. A combination is somewhat similar to a permutation. With a permutation, the order of arrangements matters. Which isn't the case with combinations. A combination 121 is the same as the combination 211 and 112. But those are three different permutations.

In some problems , the order of elements in an arrangement makes sense while in others it does not. Permutations matter for passwords. But if we are dealing with food mixtures, meat, chicken and beans would make up the same mixture as chicken, meat and beans.

What is a permutation

In a previous post I wrote about what a factorial is. Its the number of ways n distinct positions can be filled. Or, the number of ways n distinct elements can be arranged in n distinct positions.

Now the permutation. The number of elements is more than the number of positions to be filled or vice versa. If given 6 distinct elements, we need to find out how many ways we can fill up 4 distinct positions, that is a permutation.

What is a factorial

You have 3 seats. Seat A, B and C. You need to find out how many ways you can arrange sitting order for your friends friend 1 through 3 given seats A, B and C. Let's say you choose a seat for a friend at a time. And you follow the order 1 through 3. Friend 1 has 3 seat choices. After you choose one of the 3, 2 are left. So friend 2 has 2 choices. Lastly, friend 3 has 1 choice.

What is a logarithm

This one will be simple. A logarithm is how many times you have to repeatedly divide some number by the denominator until the quotient is a one.

You have a number a that you divide by b and use the quotient as the next division operation's numerator. Carry on with the pattern till you get to a quotient which when divided by b you get one. The number of division operations is the logarithm to the base b of the number a.

Q6 BT: Burning Ropes

Q6 BT: Burning Ropes

Question 6 from the book “A Practical Guide to Quantitative Finance Interviews” by Zhou Xinfeg.

You have two ropes, each of which takes I hour to burn. But either rope has different densities at different points, so there’s no guarantee of consistency in the time it takes different sections within the rope to bum. How do you use these two ropes to measure 45 minutes?

Solution and explanation

Get one of the ropes and burn it at either end and the second one end. It will take 30 minutes to burn up the first one. At this instance the second will still be left with 30 minutes to burn out. Immediately burn the other end of the second rope. This will halve the 30 minutes left to 15. Add 15 for this last half of the second rope to 30 for burning the first rope and half one of the second rope and you have 45 minutes.

Q5 BT: Card Game

Q5 BT: Card Game

Question 5 from the book “A Practical Guide to Quantitative Finance Interviews” by Zhou Xinfeg.

Card Game Problem Statement

A casino offers a card game using a normal deck of 52 cards. The rule is that you turn over two cards each time. For each pair, if both are black, they go to the dealer’s pile; if both are red, they go to your pile; if one black and one red, they are discarded. The process is repeated until you two go through all 52 cards. If you have more cards in your pile, you win $100; otherwise (including ties) you get nothing. The casino allows you to negotiate the price you want to pay for the game. How much would you be willing to pay to play this game?

Q4 BT: Birthday Problem

Q4 BT: Birthday Problem

Question 4 from the book “A Practical Guide to Quantitative Finance Interviews” by Zhou Xinfeg.

You and your colleagues know that your boss A’s birthday is one of the following 10 dates: Mar 4, Mar 5, Mar 8, Jun 4, Jun 7, Sep 1, Sep 5, Dec 1, Dec 2, Dec 8. A told you only the month of his birthday, and told your colleague C only the day. After that, you first said: “I don’t know A’s birthday; C doesn’t know it either.” After hearing what you said, C replied: “I didn’t know A’s birthday, but now I know it.” You smiled and said: “Now I know it, too.” After looking at the 10 dates and hearing your comments, your administrative assistant wrote down A’s birthday without asking any questions. So what did the assistant write?

Q3 BT: River Crossing

Q3 BT: River Crossing

Question 3 from the book “A Practical Guide to Quantitative Finance Interviews” by Zhou Xinfeg.

Four people, A, B, C and D need to get across a river. The only way to cross the river is by an old bridge, which holds at most 2 people at a time. Being dark, they can’t cross the bridge without a torch, of which they only have one. So each pair can only walk at the speed of the slower person. They need to get all of them across to the other side as quickly as possible. A is the slowest and takes 10 minutes to cross; B takes 5 minutes; C takes 2 minutes; and D takes 1 minute. What is the minimum time to get all of them across to the other side?

Q2 BT: Tiger and Sheep

Q2 BT: Tiger and Sheep

Brain teaser number two from the book “A Practical Guide to Quantitative Finance Interviews” by Zhou Xinfeg.

Question statement

One hundred tigers and one sheep are put on a magic island that only has grass. Tigers can eat grass, but they would rather eat sheep. Assume: (A). Each time only one tiger can eat one sheep, and that tiger itself will become a sheep after it eat the sheep. (B). All tigers are smart and perfectly rational and they want to survive. So will the sheep be eaten?