# Tag Archives: Google

# Big Picture: Linear Algebra

**The Big Picture of Linear Algebra 线性代数 (***MIT Open-Courseware by the famous Prof Gilbert Strang)*

**A.X = B**

**A(m, n) ** is a matrix of **m** rows, **n** columns

4 sub-Vector Spaces:

Column Space , dim = **r = rank** (A)

Row Space , dim = **r = rank** (A)

Nullspace , dim = **n – r**

Left Nullspace , dim = **m – r**

Abstract Vector Spaces 向量空间

Any object satisfying these 8 axioms belong to the algebraic structure of Vector Space: eg. Vectors, Polynomials, Functions, …

**Note**: “Vector Space” + “Linear Map” = “Category”

**Eigenvalues & Eigenvectors** (*valeurs propres et vecteurs propres*) 特征值/特征向量

[ Note: “*Eigen*-” is German for *Characteristic* 特征.]

**Important Trick**: (see Monkeys & Coconuts Problem)

If a transformation A is linear, and the “**before**” state and “**after**” state of the “vector” **v** remain the same (keep the status-quo) , then : **Eigenvalue **

Try to compute:

is more difficult than this diagonalized equivalent matrix:

**Note**: This is the secret of the Google computation of diagonalized matrix of billion columns & billion rows, where all the **b**jk are the “PageRanks” (web links coming into a particular webpage and links going out from that webpage).

**The Essence of Determinant (*)**: (行列式)

(*) Determinant was invented by the ancient Chinese Algebraists 李冶 / 朱世杰 /秦九韶 in 13th century (金 / 南宋 / 元) in《天元术》.The Japanese “和算” mathematician 关孝和 spread it further to Europe before the German mathematician Leibniz named it the “Determinant” in 18th century. The world, however, had to wait till the 19th century to discover the theory of **Matrix** 矩阵 by JJ Sylvester (Statistical Math private Tutor of Florence Nightingale, the world’s first nurse) closely linked to the application of **Determinant**.

[**NOTE**] 金庸 武侠小说 《神雕侠女》里 元朝初年的 黄蓉 破解 大理国王妃 瑛姑 苦思不解的 “行列式”, 大概是求 eigenvalues & eigenvectors ? 🙂

# Google PageRanking Algorithm

Google Illustration:

The following Webpages (1) to (n=6) are linked in a network below:

eg.

Page (1) points to (4),

(2) & (3) points to (1)…

Let

= Probability (**PageRank ***) from Page ( i ) linked to Page (j).

(*) **PageRank**: a measure of how relevant the page’s content to the topic of your query. This value is computed by the proprietary formula designed by the 2 Google Founders Larry Page & Sergey Brin, whose Stanford Math Thesis mentor was Prof Tony Chan (who knows the ‘secret ‘ to put his name always on Google 1st search list.)

The **Markov Transition Matrix** (A) is :

Assume we start surfing from Page (1).

We define** PageRank Vector** x

**x** = (1 0 0 0…0), the Probability of reaching from Page (1) to itself is 1, to other pages is 0.

__First Iteration__:

**x**.A = (1 0 0 0…0).

__2nd Iteration__:

or,

.

.

__ nth Iteration__:

When n is large,

converges to a **steady-state vector**, ie

That is,

“Cancel off” both sides by (technically multiply both sides by

So we get,

We say that x is a **Left EigenVector** of A if

By **Perron’s Theorem:**

Every real square matrix with entries that are all positive has

■ a ** unique** eigenvector “

**x**” with all positive entries;

■ the

**x**‘s corresponding eigenvalue ”

**λ**” has only

**associated eigenvector, and**

*one*■ this eigenvalue “

**λ**” is the

**of the eigenvalues.**

*largest*Applying to A (square matrix with positive real numbers),

=> **one and only one** (left) eigenvector x which satisfies x.A = x

=> x is unique and has all positive entries (PageRank values).

It guarantees that no matter how much the Web changes or what set of Web pages Google indexes, the PageRank vector (**x**) can always be found and will be **unique** !

**Example in the above Illustration**:

If the unique PageRank vector x is computed after n iterations as follow:

Then Google will list the search result in this order:

1st: Page 3 (0.63)

2nd: Page 6 (0.47)

3rd: Page 2 (0.35)

4th: Page 1 (0.25)

5th: Page 5 (0.12)

6th: Page 4 (0.05)

Knowing this trick, some hackers in 2003 initiated a “Google Bomb” attack on President George W. Bush, associated him with Google query “** miserable failure**“.

**Revision**:

Linear Algebra (Left & Right Eigenvectors and eigenvalues).

**Ref**:

《Math Bytes》by Tim Charter

Princeton University Press

[NLB #510 CHA]

**Google Patents**:

https://www.google.com/patents/US6285999

# Google Project Soli : 弹指神功

# 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:

http://mobile.eweek.com/developer/google-go-lets-developers-work-more-with-multicore-parallel-computing

# Google Linear Algebra

Google Search Engine & Linear Algebra:

1) Let M(nxn) matrix of size n (say 1 billion) web pages:

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:

(all Page j pageRanks)

The page k pointed to by all pages j.

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

4) Iterate n times:

=> 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.

# Google Symmetries

Google = 10 ^ 100

1000 = 10³ = 2³ x 5³

10^google = (10³)³³. 10

= (2³)³³ x (5³)³³. (2×5)

= 2¹ºº x 5¹ºº

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