Let’s talk about Zipf’s Law

University Mathematics

Zipf’s law /ˈzɪf/, an empirical law formulated using mathematical statistics, refers to the fact that many types of data studied in the physical and social sciences can be approximated with a Zipfian distribution, one of a family of related discrete power law probability distributions. The law is named after the American linguist George Kingsley Zipf (1902–1950), who popularized it and sought to explain it (Zipf 1935, 1949), though he did not claim to have originated it.

Pascal’s Triangle

JC Mathematics, University Mathematics

This is a really good video that introduces students to Pascal Triangle’s. A-levels Students should be able to relate to the binomial expansion coefficients that are found in the triangle! There are much more uses to Pascal Triangle’s. I will share more when the A-levels end.

Why we need to be close to zero?

JC Mathematics, University Mathematics

Many students have asked me why it is important to for x to be close to zero for the Maclaurin’s expansion to be a good approximation. So here, I plot it in the 4 curves:
y =e^x which is our actual curve.
y = 1+x which is the estimation of e^x, up to and including x.
y = 1+x+\frac{x^2}{w!} which is the estimation of e^x, up to and including x^2.
y = 1+x+\frac{x^2}{2!}+\frac{x^3}{3!} which is the estimation of e^x, up to and including x^3.

Curves and its estimation
Curves and its estimation

We can observe from the graphs, that as we increase the degree of order, the estimated curves become more like that of e^x, although it still tend to deviate a lot. The idea of maclaurin’s is that it provides us a way to interpolate and write the humble e^x equation out in a polynomial that actually never ends. So as we continue to consider more terms, our estimation will get close and closer to the actual curve.

And clearly, we see that when x=0, we found the actual value. This is simply because the maclaurin’s expansion is centred about zero. 🙂

Mathematical Computing #1

University Mathematics

With regards to a recent post, I shall share further on Mathematical Computing and how we can start on it.

So to assist me in not over-simplifying the journey, I’ve personally signed up for an online course with Coursera to learn Python. I have prior experience with Python, C++, Matlab, R & Stata. So yes, I might not struggle in the course much but I can refresh on the basics and hopefully recall my struggles and share here.

Not the Snake! Credits: python.org
Not the Snake! Credits: python.org

Firstly, I recommend Python as a beginner mathematical computing language. It is also the language that is being taught to Year 1’s in NUS (NTU teaches Matlab instead). I think Python is more straight forward and easy to understand. Furthermore, it sets the foundations straight for future endeavours into other language too. I also recommended the Python Course to a fellow educator whose son wants to learn a bit.

Does your math need to be strong to do mathematical computing? Not really since this is altogether a different thing. Math focuses on problem solving, so the implantation of a algorithm simply hasten the process.

Prime Numbers and their uses

University Mathematics

Prime Numbers are numbers that are only divisible by itself and 1. However, you will be amazed that the pursuit of prime numbers has gifted us a number that is 17 million digits long. So what is this big hoo-ha over it. I meant its just a number and mathematicians around the world are still constantly trying to find them.

First up, using a simple code, ”
g_intensity = ((((y << 32) | x))^((x << 32) | y))) * 15731 + 1376312589) % 256″

Credits: Stackexchange
Credits: Stackexchange

This code is based on prime numbers whereby the intensity of green color is found using a function, where x and y are a pixel coordinates in screen space, stored in a 64bit integer variables.

So that was fun stuff, more importantly, modern cryptography rely a lot on the use of prime numbers. Here, we use large primes to encode information that is sent wirelessly when making transactions on our debit cards, credit cards, computers, etc in order to keep our information safe. For those who watch The Imitation Game, you can relate it a little. In the movie, war information was encrypted and transmitted through cryptography. Here, our valuable credit card information is protected the same way! If you’re keen to read, you can start reading on RSA Algorithm.

Other applications include predator – prey modelling in Biology and even Music, just to name a few. 🙂

How many chess games are possible?

JC Mathematics, Secondary Math, University Mathematics

The Shannon number, named after Claude Shannon, is an estimated lower bound on the game-tree complexity of chess of 10120, based on about 103 initial moves for White and Black and a typical game lasting about 40 pairs of moves.

Did you also know there are over 9 million different possible positions after three moves each. There are over 288 billion different possible positions after four moves each. The number of distinct 40-move games is far greater than the number of electrons in the observable universe.

Patterns in prime numbers

Patterns in prime numbers

University Mathematics

So you still think prime numbers are random?

Take a look at this really cool project, it kinda reminds me of the sieve of Eratosthenes: El Patrón de los Números Primos: Prime Number Patterns – Jason Davies

You can examine more on divisor plot as well.

Prime numbers has mystified mathematicians for centuries, there seems to be a pattern but mathematicians aren’t able to find a method to predict the next sequence or understand what exact cause prime numbers to be the sequence it currently is.

The Klein Bottle

JC Mathematics, University Mathematics

Carlo Séquin on his search for the elusive “fourth type of Klein bottle”.

So what’s a Klein bottle?

In mathematics, the Klein bottle is an example of a non-orientable surface; it is a two-dimensional manifold against which a system for determining a normal vector cannot be consistently defined.