The Eve Before Calculus : Fermat




1. 秦汉:张苍&耿寿昌 编 《九章算术》, 3AD 东汉 刘徽 (注解)

2. 4AD 南北朝:祖冲之父子 圆周率π

3. 13-16世纪 元/明朝:珠算盘


只是Applied 应用, 没有 希腊Deductive Theory 理论。

Ideal in Ring

Historical Background:

Ideal (理想) was a by-product by mathematicians in the 350-year proof of the 17CE Fermat’s Last Theorem, wherein they found a violation of the existing “Fundemental Law of Arithmetic” (Unique Prime Factorization) . Since it is a Law, there must be an alternative ideal number to satisfy it, hence the birth of the “Ideal”.

Read here: the raison d’être of Ideal : What is an Ideal ?


Why Integer (Z) is called “Ring” (Dedekind coined it using the German word “Der Ring”) ? because
{1, 2, … , 11, 12 = 0} is clock number “Z/12Z” like a Ring-shaped Clock 🕜


The ancient “Chinese Remainder Theorem” (aka 韩信点兵 ) since 200 BCE is explained by 19CE Ideal Theory.

[Solve] : “The Problem of 6 Professors

Ideal = “Whatever inside multiplies outside, still comes back inside.”

Ring Examples:

  1. Integers Z
  2. Polynomial with coefficients in Real number , or Complex number, or Matrix (yes!)
  3. Infinite Ring
  4. Finite Ring (Z/nZ )
  5. Z/pZ = Field (p is prime)


33 short videos on the scariest Math subject in universities (France, USA, China, Singapore,… ) “Abstract Algebra” made simple by this charming lecturer.

What is Harmony OS? Huawei’s “Android rival” explained!

1. Harmony OS : Micro-Kernel for ‘1+8+N’ IoT devices

2. ARK Compiler for Android code compatibility (Java, C/C++, Kotlin, JS), yet 60% faster

3. AppGallery : confirmed ‘Yes’ for Facebook, WhatsApp, Insragram. Next ? will be Google Mobile Services (YouTube, Gmail, Google Map, Google Playstore )

4. HMS (Huawei Mobile Services) : $1 billion Apps development fund by Huawei

The Future of Programming is Dependent Types

Read the example in this excellent blog for explanation of Dependent Type (ie Type depends on its Value) :

Type ArrayOfOne with value ‘length’ of INT 1.

Type ArrayOfTwo with value ‘length’ of INT 2.

Type ArrayOfThree with value ‘length’ of INT 3.

Then compiler will know if correct (before run time error) :

ArrayOfThree = ArrayOfOne + ArrayOfTwo

or wrong if:

ArrayOfTwo = ArrayOfOne + ArrayOfThree

小算盘 大乾坤 Abacus

浙江临海市 国华珠算博物管主人 木匠 雷国华 收藏算盘20年,凭个人力量,保存中国算盘发源地的文化遗产,为此散尽钱财借债,免费开放给公众参观。说到家人因支持他而受苦,感慨激动不已。

中国的算盘上面2珠 (2×5),下面5珠(5), 共15,加1 = 16 进位。古代是16位 (Hexadecimal) 制, 半斤 八两 (= 1/2 斤 x 16 两 = 8 两)。

日本改良成10位制: 上面1珠 (1×5),下面4珠(4), 共9,加1 = 10 进位。

明朝万历年间的 “平民王子”朱载堉 (1536 AD – 1610 AD) 发明现代音乐的 十二平均律 (12-tone Equal Temperament) , 用81档的大算盘算出:先开立方根,后开平方根 2 次

\boxed { \displaystyle \sqrt[12] {2} = 2^{\frac {1}{12} }= 2^{{\frac {1}{3}}.{\frac {1}{2}}.{\frac {1}{2}}} = \sqrt {\sqrt {\sqrt[3]{2}}}}

Math for AI : Gradient Descent

Simplest explanation by Cheh Wu:

(4 Parts Video : auto-play after each part)

The Math Theory behind Gradient Descent: “Multi-Variable Calculus” invented by Augustin-Louis Cauchy (19 CE, France)

1. Revision: Dot Product of Vectors

2. Directional Derivative

3. Gradient Descent (opposite = Ascent)

Deeplearning with Gradient Descent:

RIP Sir Michael Atiyah

Singapore Maths Tuition

Rest in peace, Sir Michael Atiyah. Many scientists have called Atiyah the best mathematician in Britain since Isaac Newton.

Read also our previous posts:

Source: New York Times

Michael Atiyah, a British mathematician who united mathematics and physics during the 1960s in a way not seen since the days of Isaac Newton, died on Friday. He was 89.

The Royal Society in London, of which he was president in the 1990s, confirmed the death but gave no details. Dr. Atiyah, who was retired, had been an honorary professor in the School of Mathematics at the University of Edinburgh.

Dr. Atiyah, who spent many years at Oxford and Cambridge universities, revealed an unforeseen connection between mathematics and physics through a theorem he proved in collaboration with Isadore Singer, one of the most…

View original post 53 more words

The amazing power of word vectors

the morning paper

For today’s post, I’ve drawn material not just from one paper, but from five! The subject matter is ‘word2vec’ – the work of Mikolov et al. at Google on efficient vector representations of words (and what you can do with them). The papers are:

From the first of these papers (‘Efficient estimation…’) we get a description of the Continuous Bag-of-Words and Continuous Skip-gram models for learning word vectors (we’ll talk about what a word vector is in a moment…). From the second paper we get more illustrations of the…

View original post 1,685 more words

The Hardest H3 Math Question (Combinatorics)

Singapore Maths Tuition

I think this may be one of the hardest H3 Math Questions in history. It is taken from RI H3 Prelim 2018. It seems that even in top schools like RI, there are less than 50 people taking H3 Maths in any given year. Part (d) is extremely hard to get the formula for general r. In fact during the exam it is probably wise to skip such questions or give partial answers (e.g. the formula for r=3) as it is not worth the time for 3 marks.

See also our related blog posts:

View original post

H3 Mathematics Resource Page

Singapore Maths Tuition

H3 Mathematics is the pinnacle of the Junior College Mathematics syllabus in Singapore. It contains a glimpse of actual Math that Mathematicians do, and it requires true mathematical understanding and technique to do well. (H1/H2 math requires a lot of practice, but not true understanding. It is quite common for students to “apply the method” and get the correct answer without having any idea of what they are actually doing.)

Topics in H3 Mathematics include Functions, Sequence and Series, Combinatorics, and even Number Theory. Certain schools also include topics like Linear Algebra and Differential Equations. Certainly, the H3 Math questions have a Math Olympiad style to them.

Here are some practice questions for H3 Math (more will be added in the future), with some hints. Questions are adapted from actual H3 prelim papers.


Q1) The function $latex f$ is such that $latex f(x+2)=af(x+1)-f(x)$, for all real $latex x$ and…

View original post 379 more words

WiFi Password = Integral Answer

China 南京航空航天大学 Nanjing University of Aeronautics and Astronautics set the WiFi password as the answer of this integral (first 6 digits).

Can you solve it?

(If can’t, please revise GCE “A-level” / Baccalaureate / 高考 Calculus 微积分)

Answer : Break the integral (I) into 2 parts:

I = A(x) + B(x)

\displaystyle A(x) = \int_{-2 }^ {2} x^{3}. \cos \frac{x}{2}.\sqrt{4-x^2}dx

\displaystyle B(x) = \int_{-2 }^ {2} \frac{1}{2}\sqrt{4-x^2}dx

A(x) = – A(-x) => Odd function
=> A(x) = 0 since its area canceled out over [-2, 2]

B(x) = B(-x) => Even function
\displaystyle\implies B(x) = 2\int_{0 }^ {2} \frac{1}{2}\sqrt{4 - x^2}dx
\displaystyle\implies B(x) = \int_{0 }^ {2} \sqrt{4 - x^2}dx

Let x = 2 sin t => dx = 2 cos t. dt

x = 2 = 2 sin t => sin t = 1 => t = π / 2

x = 0 = 2 sin t => sin t = 0 => t = 0

\displaystyle B(x) = \int_{0 }^ {\pi/2} \sqrt{4 - 4.\sin^{2} {t} }. (2 \cos t. dt)

\displaystyle \implies B(x) = \int_{0 }^ {\pi/2} 2.\cos t. (2 \cos t. dt)

\displaystyle\implies B(x) = \int_{0 }^ {\pi/2} 4 \cos^{2} t. dt

\displaystyle \cos ^{2} t = \frac {1 + \cos 2t} {2 }

\displaystyle\implies B(x) = \int_{0 }^ {\pi/2} (2 + 2\cos 2t) . dt

\displaystyle\implies B(x) = (2 t) \Bigr|_{0 }^ {\pi/2} + (2. \frac{1}{2} \sin 2t) \Bigr|_{0 }^ {\pi/2}

\displaystyle\implies B(x) = (\pi ) + \sin \pi = \pi

\boxed{ I = \pi = 3.14159}

A smarter method using Analytic Geometry: A circle of radius 2 is

x^2 + y^2 = 4 \implies y = \sqrt {4 -x^2}

Machine Learning is Fun! – Adam Geitgey – Medium

(中文) :

Unsupervised learning is the future ML (Machine Learning) – of which AI is a branch – with the latest algorithm Deeplearning showing only 5% of its potential (more yet to be invented).

Singapore has recently launched an AI program to educate 10,000 students & workers. (Partnership with Microsoft and IBM, a 3-hour free lesson).

The world’s 4 AI gurus :

  1. (UK/Canada) Prof Geoffrey Hinton (*) , the inventor of DeepLearning, and
  2. his post-doctorate associate (France) Prof Yann Lecun ,
  3. The ex-Google & ex-Baidu AI Chief Prof Andrew NG 吴恩达,
  4. The AlphaGo creator Demis Hassabis

Andrew and Demis both studied in Singapore secondary schools (NG in Raffles Institution) before pursuing university in Stanford and Cambridge, respectively.

Note (*) : Prof Geoffrey Hinton was involved in the 80s Expert Systems where rule-based knowledge engine was the AI (2.0) . This AI failed because of fixed rules knowledge base under “supervised learning” from human domain experts, who each differed from another in opinions, to give an un-biased “weights” (rule probabilities from 0 to 1). Prof Hinton continued the AI research by moving from UK to Canada, where he developed the Deeplearning algorithm with unsupervised learning from Big Data Training feed to calculate the “Costs” (ie deviations of AI result versus actual result, using Cauchy’s Calculus eg. “Gradient Descent”, etc).

Category Theory III for Programmers (Part 1 & 2)

The most interesting “Category Theory” (范畴论) for Programmers course III by Dr. Bartosz Milewski , a follow-up of last year’s course II.


  1. Fundamental of Category Theory: Functor, Natural Transformation, etc. (Course II Series)
  2. (Nice to have) : Basic Haskell Functional Programming Language. (Quick Haskell Tutorial)

1.1: Overview Part 1

Category Theory (CT) = Summary of ALL Mathematics

Functional Programming = Application of CT

Philosophical Background:

  • Math originated 3,000 years ago in Geometry by Greek Euclid with Axioms and deductive (演译) Proof-driven Logic.
  • Geometry = Geo (Earth) + Metry (Measurement).
  • Math evolved from 2-dimensional Euclidean Geometry through 17 CE French Descartes’s Cartesian Geometry using the 13CE Arabic invention “Algebra” in Equations of n dimensions: (x_1, x_2,..., x_n) , (y_1, y_2,..., y_n)
  • Use of Algebra: 1) Evaluation of algebraic equations (in CT: “Functor”) ; 2) Manipulation. eg. Substitution (in CT : “Monad” ), Container (in CT: “Endo-Functor” ), Algebraic Operations (in CT: “Pure, Return, Binding” ).
  • Lawvere Theories: unified all definitions of Monoids (from Set to CT)
  • Free Monoid = “List” (in Programming). Eg. Concatenation of Lists = new List (Composition, Associative Law) ; Empty List (Unit Law).
  • Advance of Math in 21CE comes back to Geometry in new Math branches like Algebraic Geometry, Algebraic Topology, etc.

Note: The only 2 existing human Languages invented were derived from forms & shapes (images) of the mother Earth & Nature:

  1. Ancient Greek Geometry (3000 years) ;
  2. Ancient Chinese Pictogram Characters (象形汉字, 3000 years 商朝. 甲骨文 ) .

1.1: Overview Part 2

Keypoints: (just a ‘helicopter’ view of the whole course syllabus)

  • Calculus: infinite Product, infinite Sum (co-Product), End, co-End.
  • Kan-extensions
  • Geometry in “Abstract” aka Topology: “Topos”
  • Enriched Category : (2-category) Analogy : complex number makes Trigonometry easy; same does Enriched Category.
  • Groupoid => “HTT” : Homotopic Type Theory

2.1 String Diagrams (Part 1)

Composing Natural Transformations (Vertical & Horizontal): \alpha \; \beta (assumed naturality)

2.2 Monad & Adjunction


1. Download BM’s book “Category Theory for Programmers” :

困扰了人类358年 费马大定理 Fermat’s Last Theorem


  1. Fermat’s Last Theorem (FLT): \boxed {x^{n} +y^{n} = z^{n} \; \; \forall n >2 }
  2. Pierre de Fermat (France 1637 AD): FLT Conjecture or Prank ?
  3. Euler (n= 3)
  4. Taniyama(谷山)-Shimura(志村)-(André) Weil Conjecture (now Theorem)
    Modular Form = Elliptic Curve
  5. Galois Group Symmetry
  6. Andrew Wiles (UK Cambridge 1994):
    (Modular Form = Elliptic Curve) <=> FLT (q.e.d.)


1. Do not confuse Prof Andrew Wiles (proved FLT) with (French/American) Prof André Weil (Founder of Bourbaki School of Modern Math in POST-WW2 universities worldwide).

2. When Shimura heard that FLT was proved finally by Andrew Wiles using his Conjecture (Theorem), he was very calm, said, “I told you so”.

3. There is another “Fermat’s Little Theorem” used in computer cryptography.

4. The journey of proving FLT in 358 years by all great mathematicians worldwide had created many new math tools and Number theories (eg. “Ideals” in Ring Theory, etc).

Quora : How likely is it that a mathematics student can’t solve IMO problems?

How likely is it that a mathematics student can’t solve IMO problems?

Is there a fear of embarrassment in being a math Ph.D. who can’t solve problems that high-school students can? by Cornelius Goh

School System Video (Do not make a fish climb trees)

Singapore Maths Tuition

Singapore is being mentioned around 4:54. Very nice video. The truth is that the classroom of today is still nearly the same as the classroom of 150 years ago. There needs to be a “Educational Revolution” parallel to that of the Industrial Revolution. Many children cannot fit into the single classroom model, leading to growth in diagnosis of behavioral “problems” such as ADHD in developed nations.

Americans who are tired of “Common Core” may want to check out Singapore Math for their kids, which is highly acclaimed in the educational realm.

View original post

Population Differential Equations and Laplace Transform

Singapore Maths Tuition

Malthus Model
$latex displaystyle frac{dN}{dt}=BN-DN=kN$

$latex N$: Total population

$latex B$: Birth-rate per capita

$latex D$: Death-rate per capita

$latex k=B-D$

Solution to D.E.:
$latex displaystyle boxed{N(t)=widehat{N}e^{kt}},$

where $latex widehat{N}=N(0)$.

Logistic Equation
$latex begin{aligned}

Logistic Case 1: Increasing population ($latex widehat{N}<N_infty$)
$latex begin{aligned}

The second expression can be derived from the first: divide by $latex s$ in both the numerator and denominator.

Logistic Case 2: Decreasing population ($latex widehat{N}>N_infty$)
$latex begin{aligned}

Logistic Case 3: Constant population ($latex widehat{N}=N_infty$)
$latex displaystyle N(t)=N_infty$

Basic Harvesting Model: $latex displaystyle boxed{frac{dN}{dt}=(B-sN)N-E}.$

$latex E$: Harvest rate (Amount harvested per unit time)

Maximum harvest rate without causing extinction: $latex boxed{dfrac{B^2}{4s}}$.

$latex displaystyle boxed{beta_1,beta_2=frac{Bmpsqrt{B^2-4Es}}{2s}}.$

$latex beta_1$: Unstable equilibrium population

$latex beta_2$: Stable equilibrium population

Extinction Time: $latex displaystyle boxed{T=int_{widehat{N}}^0frac{dN}{N(B-sN)-E}}.$

Laplace transform of $latex f$
$latex displaystyle F(s)=L(f)=int_0^infty e^{-st}f(t),dt$

Tip: Use this equation when the questions…

View original post 202 more words