You are on page 1of 9

Google’s Mechanism for Ranking Web-Pages

AIM:
TO understanding the mathematics behind the most successful search engine i.e.
Google by using a simplified version of the Random Surfer Algorithm

PROBLEM STATEMENT:
Understanding the mathematics behind ranking the web-page for better search
results.

METHODOLOGY:
PageRank is a function that assigns a real number to each page in the Web. The
intent is that the higher the PageRank of a page, the more “important” it is.

PHYSICAL BACKGROUND:
PageRank vector provides the importance criteria of the web-pages. The concept
of Eigen vectors can be used in solving real life time problems associated with big
data.

MATHEMATICAL BACKGROUND:
Writing the rank matrix and finding its eigenvector to calculate the importance of
the web-pages. consider a web consisting of 𝑛𝑛-pages and let us denote the
importance (PageRank) of 𝑖𝑖-th page by 𝑥𝑥𝑖𝑖 where 1 ≤ 𝑖𝑖 ≤ 𝑛𝑛. In the simplified
random surfer model, with dampening factor (𝑑𝑑) = 1, the importance of 𝑖𝑖-th
page is calculated by the equation:
𝑥𝑥𝑗𝑗
𝑥𝑥𝑖𝑖 = ∑ 𝑗𝑗
𝑛𝑛 𝑗𝑗
(1)
when 𝑗𝑗-th page contains 𝑛𝑛𝑗𝑗 outbound links, one of which links to the i-th page.
MATLAB CODE:
close all;
clear vars;
a=input('matrix')
[V, D] = eig(a);
u = V(:,1)
x = u/sum(u) % here x is the PageRank vector
Exercise Problems:
Write the transition matrix for the webs shown below and arrange the pages in the
order of their importance
1)

SOLUTION:
A= 0X1+1/3X2+1X3+1/3X4+0X5
B=1/2X1+0X2+0X3+0X4+0X5
C=0X1+1/3X2+0X3+1/3X4+1X5
D=1/2X1+0X2+0X3+0X4+0X5
E=0X1+1/3X2+0X3+1/3X4+0X5
>> untitled
matrix[0 1/3 1 1/3 0;1/2 0 0 0 0;0 1/3 0 1/3 1;1/2 0 0
0 0;0 1/3 0 1/3 0]
a =
0 0.3333 1.0000 0.3333 0
0.5000 0 0 0 0
0 0.3333 0 0.3333 1.0000
0.5000 0 0 0 0
0 0.3333 0 0.3333 0
u =
-0.6975
-0.3487
-0.4650
-0.3487
-0.2325
x =
0.3333
0.1667
0.2222
0.1667
0.1111
>>
2)

SOLUTION:
A=0X1+0X2+0X3+1/4X4+1X5+1/3X6
B=1/3X1+0X2+0X3+0X4+0X5+1/3X6
C=1/3X1+1/4X2+0X3+1/4X4+0X5+0X6
D=0X1+1/4X2+1/2X3+0X4+0X5+0X6
E=0X1+1/4X2+1/2X3+1/4X4+0X5+1/3X6
F=1/3X1+1/4X2+0X3+1/4X4+0X5+0X6
>> google
matrix[0 0 0 1/4 1 1/3;1/3 0 0 0 0 1/3;1/3 1/4 0 1/4 0 0;0 1/4 1/2 0 0
0;0 1/4 1/2 1/4 0 1/3;1/3 1/4 0 1/4 0 0]
a =
0 0 0 0.2500 1.0000 0.3333
0.3333 0 0 0 0 0.3333
0.3333 0.2500 0 0.2500 0 0
0 0.2500 0.5000 0 0 0
0 0.2500 0.5000 0.2500 0 0.3333
0.3333 0.2500 0 0.2500 0 0
u =
0.6215
0.3247
0.3527
0.2575
0.4395
0.3527
x =
0.2646
0.1383
0.1502
0.1097
0.1871
0.1502
>>

APPLICATION IN ENGINEERING:
The application of eigenvalues and eigenvectors is useful for decoupling three-
phase systems through symmetrical component transformation.

EXAMPLE:
For the system x ′ = x − y , y ′ = 2x + 4y make a linear change of coordinates which
decouples the system; verify by direct substitution that the system becomes
decoupled.
MATLAB CODE:
a=[1 -1;2 4]
p=poly(a)
[E,V]=eig(a)
D=E^-1%gives the co-ordinates which decouples the
system
ix
X

iA

,,[ v-9'
v,
COMMAND WINDOW:
>> Untitled3
a=
1 -1
2 4
p=
1 -5 6
E=
-0.7071 0.4472
0.7071 -0.8944
V=
2 0
0 3
D=
-2.8284 -1.4142
-2.2361 -2.2361
>>
Scanned by CamScanner
Scanned by CamScanner

You might also like