Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Parallel Computing Using Multithreading

  1. Not all jobs are suitable for parallel computing. The more comminication that threads has to make, the more dependent the jobs are and the less efficient the parallel computing is.

  2. Generally speaking, commercial softwares (Mathematica, MATLAB and Revolution R, etc.) have very good support on parallel computing.

Python

Please refer …

How Long Does It Take to Observe a Sequence?

There are many interesting while at the same time very tricky problems in statistics. One famous question is that how many steps (expected) does it take to observe a given sequence (e.g. THTH, TTHH), if we flip a balanced coin?

This problem can be solved using (delay) renewal theory …

A Bug in Mathematica

Mathematica is a very intelligent and powerful math software. I use it in my study and research a lot. Mathematica's ability to take derivative and to calculate limit is obvious powerful–way much beyond many mathematician's ability. Mathematica's ability to calculate integral is also powerful. There are many integrals than …

First 10-digit Prime in Consecutive Digits of Euler Constant?

One day my friend Ru He asked me a question.

What is the first 10-digit prime found in consecutive digits of e?

This is an easy problem with the help of Mathematica. The following is the Mathematica code I wrote to solve this question. It actually solves the general problem …

The Sum and Product Puzzle

I talked about an interesting problem in this post. I had onsite-inteviews from Wolfram at the end of April this year, and I decided to talk how to solve the problem using Mathematica. I did some research and realized that the problem is a well-known one which is called the …

Probability to Get a Complete Deck of Cards?

Suppose a poker games requires 4 decks of poker. After the game, the cards are put back into the 4 decks randomly. Now there is another game which requires only 1 deck of poker, so we want to open some decks of the poker and find a complete set of …