learngraphtheory.org

Guest User

Using app without sign in

Cover of the book Graph Theory Through Problems

Practice book

Graph Theory Through Problems

300 Exercises with Hints, Worked Algorithms and Complete Solutions

By Mohammed Islam Hadjoudj

Learn graph theory by solving problems: 300 exercises, from routine checks to challenging proofs, each with a complete solution.

Available inKindlePaperback

13 chapters

Also by the authorGraph Algorithms for Coding Interviews100 solved interview problems with visual explanations and Python solutions.View on Amazon
Algorithm Selection

Select an algorithm and generate steps to begin visualization

PageRank Calculator

How important is each vertex? Its links decide

Ranks the vertices of a directed graph by how many important vertices link to them

Time: O(k(V + E)) for k iterations
Space: O(V)
Use Case: Web search ranking, influencers, citation analysis
Showing the example graph for this algorithm.
Algorithm Execution

Select an algorithm and generate steps to begin visualization

About PageRank

PageRank measures how important each vertex of a directed graph is from its links alone. Developed by Larry Page and Sergey Brin to rank web pages for Google, it treats a link from page u to page v as a vote for v, where votes from important pages count more and a page's vote is split among all of its links.

How it works

PageRank models a random surfer who, with probability d = 0.85, follows a random link of the current page and otherwise jumps to a random page. A page's rank is the long-run share of time the surfer spends there. The algorithm starts every rank at 1/N and repeatedly recomputes each rank from the pages linking to it, (1 - d)/N plus d times the sum of PR(u)/out(u), until the values stop changing. Pages without links spread their rank evenly. Each iteration costs O(V + E), and the error shrinks by about the factor d every time.

Applications

Beyond web search, PageRank and its variants rank papers by citations, find influential accounts in social networks, recommend products, highlight key proteins in biological networks and prioritise accounts in fraud detection. It is the standard example of eigenvector centrality and of the power method in linear algebra courses, and interviewers like it as a graph problem with a numerical twist.

Related algorithms: Tarjan's SCC Algorithm, Breadth-First Search, Depth-First Search

Interactive Controls

Zoom Controls

50%
Nodes: 6
Edges: 10