Wednesday, 31 December 2014

Free Coursera Cryptography Course by Stanford Starting Soon


This free online course on the interesting subject of Cryptography is starting next week, January 5 2015. Do give it a try if you are interested in the subject of Cryptography!

The class duration is 6 weeks, and will cover topics like symmetric key cryptography and public-key cryptography.

The only prerequisite is a bit of Discrete Probability:

The course instructor is Dan Boneh of Stanford University. Hope you find this course interesting!

Tuesday, 30 December 2014

The Significance of 8888: MH17+MH370+QZ8501

According to Yahoo, the missing plane QZ8501 may be found at the bottom of the Java Sea. It is not 100% confirmed though. We sincerely hope there are some survivors who may have swum to a nearby island.

“I am absolutely devastated," said AirAsia Group CEO Tony Fernandes. "This is a very difficult moment for all of us at AirAsia as we await further developments of the search and rescue operations but our first priority now is the wellbeing of the family members of those onboard QZ8501."

The Significance of 8888

This is a continuation of our earlier analysis on the probability of 3 random numbers (in the range 1-9999) adding up to 8888. (See

The probability of 3 random numbers adding up to 8888 by chance is merely 0.0039497%, or around 1 in 25,000. This is pretty low, considering it is easier to win the top lottery prize of 4D (around 1 in 10,000 chance).

 Other events linked to "8888" or "8" in general

The 8888 Uprising is a series of riots in Myanmar, that occured on 8 August 1988. During this uprising, Aung San Suu Kyi emerged as a national hero.

The Sichuan earthquake occurred in 2008 May 12 (12/5). 1+2+5=8
It is also known as the Wenchuan earthquake, named after Wenchuan County.

In January 25, 2008, a massive snowstorm affected China in cities like Wuhan, Changsha, Nanjing, and many others. The costs to the economy amounted to more than 100 billion yuan. (See also

In March 14, 2008, there was a serious riot in Tibet, where Tibetans targeted Han Chinese, and their businesses, including setting fire and looting.

More details (in Chinese) can be found at this website:

Readers should note that it is easy to add up to 8, and hence the news should be taken with a pinch of salt. But as we calculated earlier, adding up to 8888 is not a common event.


Annual Report 2014 for my blog


The report for my blog at is out! See:

WordPress creates a nice annual report, detailing crucial statistics about my blog. My blog received up to 200,000 views in 2014! Hoping to hit a million views soon. :P

Predictably, the most popular post turns out to be Free Exam Papers. Shows how useful doing past year papers is!

Sunday seems to be the day which I post the most. Most of the Sundays, I only teach one student after church, hence I have more time to post.

The O Level Formula List post turns out to be the second most popular post in 2014, beating the post about JC Cut Off Points. 3 of my most popular posts were actually written before 2014! Hence, the report claims that those posts have "staying power", and I should consider writing more about them!

It has been a wonderful year and blogging, originally a means to advertise my Maths tuition service, has turned into a hobby for me. I am now letting my WordPress blog self-run on its own for a moment, while building up my Blogger website, hoping that my Adsense application will be finally approved! My final goal is to be active on WordPress, Blogger, and YouTube, publicizing Mathematics!

Wish all viewers a happy 2015 year of the Goat.

Monday, 29 December 2014

Math Comics

Some of my favorite Math Comics include Spiked Math.

Latest Spiked Math comic (as of 30 Dec 2014):
Spiked Math Comic - Saturday Night

Their comics are fun, humorous, and include Math!

More Math Comics

Includes some classic comics from the famous Peanuts series, featuring Charlie Brown, Snoopy, and friends! There are many comics on the theme of Mathematics there!

Shows how 3D Cartoons for instance those at Pixar are made. Includes a sample video about an old man playing chess with himself!

Includes some fun and quirky Math cartoons, explaining serious Math concepts!

Count Number of Each Letter in a Paragraph

This is a Javascript application that I wrote a long time ago. It can help to count which are the most common letters in any language,even Chinese!
For instance, try typing "四是四,十是十,十四是十四,四十是四十。 莫把四字说成十,休将十字说成四。 若要分清四十和十四,经常练说十和四。" into the textbox, and press "Generate Report". You will see that the word "四" is being mentioned 11 times!

Enter text here:


Singapore Math Questions

Singapore Math Questions

The following are a list of typical questions from the Singapore Math syllabus. Most are taken from my blog at

Singapore Math (Elementary School)

A list of questions on angles, a popular Singapore Math question for grade 6.

Need some practice on Chicken and Rabbit questions? Try out these questions generated by a Chicken and Rabbit Question generator.

Singapore Math (High School)

Very useful helpsheet for Singapore Math (High School). Comes in two versions, the more basic Elementary Maths, and the more advance Additional Maths.

A number pattern question that may prove to be quite puzzling...

How to factorize $a^3-b^3$? Comes with a YouTube video!

Check out how to solve this challenging probability question on choosing balls from a bag.

Frequently make careless mistakes for your exams? This article may help you out.

Check out this very challenging logarithm question designed to challenge high school students.

Sunday, 28 December 2014

Math of QZ8501 (Sum of 3 numbers that add up to 8888)

Let's hope the missing plane QZ8501 can be found soon. According to CNN, the plane is most likely at the bottom of the sea. Hopefully there can be some survivors, and our prayers are with them.

Something very mysterious about the recent flight disappearances is that their numbers add up to "8888", a very significant number in Chinese culture. (see our earlier post at:
MH17, MH370, QZ8501

What are the chances of 3 numbers (taken from the range 1-9999) adding up to 8888?

We will calculate the probability of 3 numbers (between 1 to 9999, since most aeroplane flight numbers are up to four digits) adding up to 8888.

We will first do an analytic theoretical calculation, and then follow up with a numerical simulation to double confirm our calculations.

Theoretical Calculation

Firstly, there are 9999 numbers from 1 to 9999. Hence, in total, there are $9999^3=999700029999$ ways of selecting 3 numbers from the range 1-9999. Repeats are allowed, for example 17, 17, 17, since they could be from different airlines e.g. MH17, QZ17, SQ17, just to illustrate the point.

Next, we need to consider how many positive integer solutions there are to $x_1+x_2+x_3=8888$. One of them would be 17, 370, 8501; but there are many more like 1, 1, 8886.

The technique to solve this type of question is to use a Stars and bars (combinatorics) method.
We can write 8888 stars, and to separate them into 3 "bins" we need 2 bars. Hence, out of 8887 possible gaps, we need to choose two gaps to put the bars. Hence, the total number of ways is ${8887 \choose 2}=39484941$.

Hence, the final probability, the chance of 3 random numbers adding up to 8888 is $$\frac{39484941}{999700029999}=0.0039497\%$$, or around 1 in  25,000.
(WolframAlpha Calculation)

For comparison, this is rarer than winning the top prize in 4D (a popular guess the correct 4 digit number lottery in Singapore), which has a probability of 0.01%, or 1 in 10,000.

It is more common than winning the Jackpot in Lottery, which has a probability of 1 in 14 million.

Computer Verification

We write a simple Python code to verify our calculations. (We verify a simpler case: probability of 3 numbers (range 1-99) adding up to 88.
 for x in range(1,100):  
   for y in range (1,100):  
     for z in range (1,100):  
       if x+y+z==88:  
 print (total)  
 print (counter)  
 print (counter/total*100.0)  
(total ways) 970299
(ways of adding up to 88) 3741
(probability) 0.3855512579112212

This indeed tallies with our calculations since $$\frac{87 \choose 2}{99^3}]\times 100\%\approx 0.38555$$.

(see WolframAlpha calculation)

Missing AirAsia flight QZ8501

My sincerest condolences to all the passengers and families of those taking QZ8501. It is really a tragedy, to have so many air disasters in a short time. As I also travel yearly, I can empathize with all the passengers, the crew, and finally the family and friends of those who took the flight. God bless them, and may they rest in peace.

Eerie Coincidence of Missing Flight Numbers (Math)

Source: Hardwarezone

Someone from Hardwarezone did a calculation of the flight numbers of the missing flights recently (MH17 + MH370 + QZ8501)

17+370+8501=8888 !!

For Westerners who may not know the significance of 8888, it is one of the most auspicious 4 dight numbers for Chinese, because "8" rhymes with 发 ("fa", "huat", which means prosper). Any car license plate "8888" must have cost a bomb for the owner.

But why does the flight numbers add up to "8888", such an eerie coincidence. Nobody knows...

Math equation could help find missing Malaysian plane

Math, specifically Bayesian Search Theory, could help find the missing Malaysian plane. Hopefully it can be applied with success like in the case of Air France Flight 447.

Saturday, 27 December 2014

IB HL Math

IB HL Math Resources

Here are some useful websites on IB HL Maths syllabus:

This site by ACS(I) offers an introductory guide to the syllabus of the IB HL Maths course.

This wiki page describes a summary of IB SL and HL Maths

A recent (2014) detailed syllabus of the IB HL Math

Hope it helps!

New Job Opening for Mathematician

Source: Spiked Math
Spiked Math Comic - Careers in Mathematics

North Pole: Career Opportunities (Mathematician)


  • Knowledge and ability to implement heuristics solutions of a dynamic travelling salesman problem. (subtle math joke here: Travelling Salesman Problem is a problem in Graph Theory)
  • A cheerful demeanor and ability to excel in a team oriented environment (need to work well with reindeer)
  • Must be able to meet strict deadlines (deliver presents before Christmas)
  • Working knowledge of regulatory compliance
  • Trustworthy and be able to work with sensitive data
  • Point ears is a plus (LOL)
Do you get the joke? Any idea who is the employer?? :P

Math of Smaug the Dragon!

The Math of The Hobbit

Source: Forbes

This is a pretty old link but it is the first time I saw it. Someone actually calculated the value of Smaug the dragon!

For those who are not familiar with Smaug, it is the dragon foe that the Hobbit and his friends are trying to defeat to retrieve back their Arkenstone, a wondrous gem once owned by the Dwarves.

Here is a funny trailer about Smaug:

Back to the total net worth of Smaug, it is estimated to be $8.6 billion.
Check out their Math calculations at:

To keep the math relatively simple and to avoid complications like integrating the partial volume of a sphere, we can approximate Smaug’s bed of gold and silver to be a cone, with a radius of 9.6 feet (1/2 the diameter) and a height of 7 feet (assuming the weight of the dragon will smush down the point of the cone by about a foot).

Thursday, 25 December 2014

The Math of Star Wars



J. J. Abrams is making Star Wars Episode 7. He rented three speeder bikes which was 700 imperial credits to start. He must pay 100 imperial credits (EACH) to keep his speeder bikes daily. If he does not pay daily, Prince Xizor and other Black Sun members will kidnap J. J. Abrams, bring him to Mustafar, and sacrifice him.
J. J. Abrams is also paying 5 bounty hunters to keep separatist spies out. That costs 200 imperial credits (EACH) to start, then 50 imperial credits for each bounty hunter every time they capture a spy. The Separatists send 2 spies every day.
In how many days does J. J. Abrams spend the same amount of imperial credits on speeders and bounty hunters?
A kid named Cody decided to set a Math question based on Star Wars, a rather complicated one it seems. J. J. Abrams, the famous director, decided to answer his question (see below)! Very impressive! See, even directors need to use some Math!
Lets try to verify JJ Abrams' answer (2.5 days)! (The question is a bit confusing to be honest, since it does not clearly specify 700 imperial credits is for total or individual speeder bikes. I have added the words (EACH) to make it more clear. But it is a very good job considering it is a small kid!)
Let x be the amount of imperial credits spent on speeders.
Let y be the amount of imperial credits spent on bounty hunters.
x=700+300d, where d is the number of days after the initial day
Hence, d=300/200=1.5
Adding the initial day, 1+1.5=2.5 days.
Wow, a tough one indeed!
Challenge: Solve the question posed by JJ Abrams!

Singapore Tuition

Looking for Tutors in Singapore

Maths Tutor

Mr Wu is a patient and dedicated Maths tutor, who has many years of tuition experience. He has tutored students of various levels, ranging from upper primary, secondary, JC, and even university undergraduates.

Mr Wu is a Pure Math Major, having completed his undergraduate studies at NUS and graduating with a First Class Honours.

Chinese Tutor

Check out for Chinese Tuition.

Other Subjects Tuition

For tuition in English, Science, Physics, Chemistry, Biology, Economics, or GP (and many others): 
Check out Startutor!

Startutor is Singapore’s most popular online agency, providing tutors to your home. There are no extra costs for making a request. The tutors' certificates are carefully checked by Startutor.

(Please use the full link above directly, thanks!)

JavaScript App to calculate Birth Month based on first four digits of NRIC

*** Disclaimer: Works best for people born around 1970-1990!

First 4 Digits of NRIC:

The theory is based on the following formula found here:

How to write Math Formulas on Blogspot / Blogger


Blogger also has a way to typeset Math Formulas!

To type Formulas in LaTeX format, simply follow the instructions on the following website:

In case the above website goes down, here is how to do it:

Basically, go to your blogspot website while signed in. On the top right hand corner, click on "Design". Click on "Edit HTML", and paste the following code right after the <head> in the HTML.

<script src='' type='text/javascript'>    
        HTML: ["input/TeX","output/HTML-CSS"],
        TeX:extensions: ["AMSmath.js","AMSsymbols.js"], 
               equationNumbers: { autoNumber: "AMS" } },
        extensions: ["tex2jax.js"],
        jax: ["input/TeX","output/HTML-CSS"],
        tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ],
                   displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
                   processEscapes: true },
        "HTML-CSS": { availableFonts: ["TeX"],
                      linebreaks: { automatic: true } }

Then, you can type formulas enclosed in dollar signs "$", in the usual LaTeX manner.

For instance $e^{i \pi}+1=0$.

In my opinion, this method is even superior to WordPress' LaTeX capabilities, which require a "$latex" which is more cumbersome to write.

Some other fancy formulae using the Displaystyle (Double Dollar signs "$$")
$$a^p \equiv a \pmod p$$
$$\int_0^\frac{\pi}{2} \sin x\ dx=1$$

Singapore is 3rd in amount of time spent on Homework


We really need to salute our Singaporean children for working hard in terms of homework. Singaporeans rank number 3 in terms of the most time spent on homework. 15-year-olds (around Secondary 3 level) clock around 9.4 hours of homework a week, above the global average of 5 hours.

Based on personal experience, students from top elite schools definitely spend much more time on homework. For example, based on my experience as a student and a teacher, it is not abnormal to spend up to 2 hours a day on homework, leading to 14 hours a week of homework.

Students in South Korea actually spend fewer than 3 hours on homework each week, but this is highly suspicious, because the Hagwon culture (cram school) culture in South Korea is very widespread. Hence, though they don't spend much time on homework, they do spend a lot of time on other academic pursuits (tuition, enrichment, etc).

The problem with excessive homework is when students have to sacrifice sleeping time to complete their homework, leading to sleep deprivation, which is very bad for teenagers and even adults in general.

In conclusion, a balance on the amount of time spent on homework is definitely needed.

Theorem of Friends and Strangers

What is the Theorem of Friends and Strangers?

This is a mysterious theorem related to the topic of Ramsey theory, a subtopic in Graph Theory.

Read more (and watch a nice video on it) at:

O Level Formula List for Mathematics and Additional Mathematics

If you are looking for a handy Formula List for O Level E Maths or A Maths, you have come to the right place!

Check out:

Free Exam Papers

Many people are searching for Free Exam Papers, especially during the exam period.

A good place to search for exam papers in Math is at:

Also, learning how to search for exam papers is a useful skill which will help a lot while looking for test papers for practice.

Anyway, good luck for your exams!

The Math of Computer Memory and How to Solve Blue Screen of Death using Glary Utilities

In Math, we are taught how to use the following prefixes:
kilo: meaning thousand or 10^3
mega: meaning 10^6
giga: meaning 10^9

Hence, theoretically, a kilobyte is 1000 bytes, a megabyte is 10^6 bytes, and a gigabyte is 10^9 bytes.

Now, most computers nowadays have a few gigabytes of memory, most notably 2MB, 4MB or 8MB. However, sometimes this isn't enough, for instance when a user is multitasking or playing some graphic intensive games. This will lead to the dreaded Blue Screen of Death (BSOD), with strange errors such as "Page fault in nonpaged area" which makes no sense to normal users.

How to Solve Blue Screen of Death

Recently, I discovered a way to solve the Blue Screen of Death. Ever since using this method, I have not experienced another Blue Screen of Death on my 4 year old laptop! Hence, I wish to share it with anyone!

(Disclaimer: We shall not be liable for any loss or damage of whatever nature (direct, indirect, consequential, or other) whether arising in contract, tort or otherwise, which may arise as a result of your use of (or inability to use) this website, or from your use of (or failure to use) the information on this site.)

Rule of Thumb: If it ain't broke, don't fix it. If your computer is free of errors, no need to do anything!

Step 1: Download Glary Utilities (Free)

Download it at and follow the instructions to install it. Pretty straightforward installation. The Free version is good enough.

Step 2: Advanced Tools --> Free up Memory

Click on "Free up Memory" under "Advanced Tools --> System Tweaks".

Step 3: Leave the "Free up memory" open and Select "Load automatically on Windows Setup"

Step 4: Good luck and hope it solves the BSOD (Blue Screen of Death)!

If you configured everything correctly, the "Free up Memory" application should appear in your taskbar as follows.

Singapore Math High School Logarithm Question

This video shows how to solve a challenging Singapore Math (High School Level) Logarithm Question.
Try out the question on your own before looking at the answer! You can do this by pausing the video. If you like reading, you can read the transcript at:

Thanks for watching!

Wednesday, 24 December 2014

The Math of Santa

Check out the following awesome video on the Math of Santa Claus!

The authors of the video calculated using Math about the vital statistics of Santa Claus -- if he existed!

So, do you think Santa exists? :)