Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Basketball Player

Suppose a basketball player make \(N\) shots, and we know that in the first \(n(\le N)\) shots he sinked \(m(\le n)\) shots. If from the \((n+1)^{th}\) shot, his ratio of sink a shot is his accumulative ratio before the shot, e.g., suppose he sinked 40 …

How Many People Stay in the Same Position?

There are 100 seats on a plane. If each of the 100 passengers randomly take a seat, how many people will have his/her own seat on average?

There is a classic way to solve this problem, which is to decompose a (complicated) random variable into a sum of simple …

Creative Use of Keepassx -- Odd Skills?

I had to schedule an event on Doodle. I wanted to fill in all possible regular meeting times (starting at 8:00 am with 30 minutes interval). I am such a lazy guy who never want to repeat the same thing for more than 3 times. Typing all these time …

Inverse of a Special Class of Matrices with High Dimensions

One day, my officemate Tieming asked me about a problem that she met in her research. Suppose \(\boldsymbol{B}\) is a symmetric matrix of huge dimension and \(\boldsymbol{D}\) is a diagonal matrix with nonnegative diagonal elements. The inverse of \(\boldsymbol{B}\) is already known, how can we calculate the …

Which One Is the Best Strategy? (continued)

Suppose we flip a coin which has probability 0.7 to be head again and again and two people choose two different sequences of length 3 (e.g., THH). The people whose sequence appears first wins. If you are allowed to choose first, which sequence will you choose?

I discussed …

Expected Gain of Tossing a Dice

Suppose you toss a symmetric dice. You are allowed to quit the game and get money which equals the total points you get at any time if 6 has never showed up. Whenever 6 shows up, the game is over and you get nothing. For example, if the first three …