function v = pagerank2()
D = [1 0 0 0 0 0 0; 
    0 1 0 0 0 0 0; 
    0 0 2 0 0 0 0; 
    0 0 0 3 0 0 0; 
    0 0 0 0 2 0 0; 
    0 0 0 0 0 1 0; 
    0 0 0 0 0 0 2]
A= [0 0 1 0 0 0 0; 
    1 0 0 0 0 0 0; 
    0 1 0 1 0 0 0; 
    0 0 1 0 0 0 1; 
    0 0 0 1 0 1 0; 
    0 0 0 0 1 0 1; 
    0 0 0 1 1 0 0]
G = A*inv(D)
[eigvec, eigval] = eig(G);
v = eigvec(:,1);
v = v/sum(v);