Ben Chuanlong Du's Blog

And let it direct your passion with reason.

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 …

Randomly Select an Integer?!

I found this "probability" problem when I read a person's blog.

What's probability that two randomly chosen nature numbers are relatively prime?

It is claimed that there is a very elegant solution for this problem. This problem reminds me another one. Some people asked for an example of a 0-probability …

Fix Microphone Problem of Skype in Debian

Install Pulseaudio if you only have ALSA. ALSA alone does NOT work with skype whatever people on the #Debian channel might think and tell you.

sudo apt-get install pulseaudio

Install pulseaudio volume control

sudo apt-get install pavucontrol

Run Skype.

Go to the Sound devices sections. Click on the Open PulseAudio …

Culture of My Summer Intern Team

I work as a student intern in the Credit Portfolio Risk Analysis group in a bank this summer. One Friday afternoon, Jimmy, the manager of my manager, asked me to his office and talked about our team cultures.

  1. Ownership
    Whenever you have a project, you are the ownner. Be proud …

Java Programming Style

Good Writing Style

  1. It is recommend to always use {} if even there is only one statement inside it. The reason is that you never know whether you are going to add more statements into it or not. And it will make the code more readable.

  2. Feel free to declare the …