The New Language to Watch : Go

Google’s new language Go is invented to replace Java, hence free from Oracle’s threat of Java license in all Android Smartphones.

Go Language is invented by Ken Thompson, the father of Unix and B language, which was transformed into the famous C language by his Bell Lab’s teammate Dennis Ritchie.

Go impresses me of its concurrency best suitable for parallel programming, given today’s most hardware including smartphones are made of multi-core CPU, yet none of today’s languages is designed inherently to take advantage of it, even Java.

If we can say Cobol is for the 1st generation Mainframe computing, C the 2nd generation Unix-based Minicomputer computing, Java the 3rd generation Client-Server computing, then Go will be the 4th generation Mobile-Cloud computing.

Try the Go simulator here:
http://golang.org

Note 1: Do not confuse with another Agent-based language “Go! “, differs by “!” sign.

Note 2: Review of Go multicore concurrency feature:

Google Search Engine & Linear Algebra:
1) Let M(nxn) matrix of size n (say 1 billion) web pages:

$\begin{pmatrix} m_{11} & m_{12} & \ldots & m_{1n}\\ m_{21} & m_{22} & \ldots & m_{2n}\\ \vdots & \vdots & m_{jk} & \vdots\\ m_{n1} & m_{n2} &\ldots & m_{nn} \end{pmatrix}$

$m_{jk} = \begin{cases} 1, & \text{if Page }j \text{ linked to Page k} \\ 0, & \text{if } \text{ not} \end{cases}$

Note: This PageRank of 0 & 1 is over-simplied. The actual PageRank is a fuzzy number between 0 and 1, based on Larry Page’s patented PageRank formula, taking into accounts of the importance of the pages linked from and to, plus many other factors.

2) Let v(n) eigenvector of n webpages’ PageRank ak:
$\begin{pmatrix} a_1 \\ a_2 \\ \vdots\\ a_k \\ \vdots\\ a_n \end{pmatrix}$ $\displaystyle \implies a_k= \sum_{j}m_{jk}$
(all Page j pageRanks)
The page k pointed to by all pages j.

3) Let λ eigenvalue: M.v =λ.v

4) Iterate n times: $\boxed{(M^{n}).v = \lambda{^n}.v}$

=> page k is ranked more important if many important pages j point to it;
& pages j themselves pointed by other important pages, …(iterate n times).
=> highest ranked pages appear first in Search list.

1000 = 10³ = 2³ x 5³
= (2³)³³ x (5³)³³. (2×5)
= 2¹ºº x 5¹ºº

=> 100 flips (2) , 100 rotations of pentagons (5) = Google symmetries.

Google: “A page is good insofar as good pages link to it”
=> PageRank invented by Larry Page while a graduate Math student in Stanford University, under the supervision of Prof Tony Chan (now the President and Professor of Mathematics & Computer Science and Engineering of Hong Kong University of Science and Technology).

Below is a simplified 3 web pages of PageRanks x, y, z respectively.

(x=z)

(y= 1/2 x)

(z = 1/2 x + y)

All PageRank scores = 1 (Conservation Law of PageRank):
(x + y + z = 1)

Solve PageRank Simultaneous Equation:
x = z
y = 1/2 x
z = 1/2 x + y
x + y + z = 1

=> x = 2y = z
=> x = 2/5, y = 1/5, z = 2/5

Visually from below, you can see x and z pages have more links than y.

So the search result should return x,z pages in front of y page.

Using Linear Algebra to compute the eigenvalues and the eigenvectors of large matrix of billion variables, Google applies mathematics and the power of clustering 50,000 cheap CPU to search the Internet, making billion dollars.

Computers are powerful only when they are ‘told’ with great algorithm, which is based on Math. The other example is RSA Encryption with big prime number factorization.