Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adjacency Matrices and PageRank

Similar presentations


Presentation on theme: "Adjacency Matrices and PageRank"— Presentation transcript:

1 Adjacency Matrices and PageRank
Miniconference on the Mathematics of Computation MTH 210 Adjacency Matrices and PageRank Dr. Anthony Bonato Ryerson University

2 Adjacency matrix given a simple graph of order n, with vertices 1,2,3, …, n-1,n, then: place a 1 in the (i,j) entry if ij is an edge place a 0 in the (i,j) entry if ij is a non-edge

3 Examples

4 Things to notice about the adjacency matrix
it is symmetric: interchange rows and columns (ie transpose) remains the same it is binary: every entry is 0 or 1 diagonal (i,i) entries are all 0: no loops

5 Multi-graphs and loops
replace “1” by the number of parallel edges between i and j note: not necessarily a binary matrix loops add +1 on diagonal

6 Directed graphs no longer symmetric

7 Key facts If G is a graph: row or column sums are degrees.
If G is a digraph: Row sum is out-degree. Column sum is in-degree.

8 PageRank Used by Google to rank pages Idea:
When surfing the web, you typically follow links You get bored occasionally and go to a random page

9 PageRank PageRank is the probability a random web surfer lands on
your page the higher the PageRank the more “popular” the web page

10 PageRank matrix G connected graph of order n C a real number in (0,1)
If ij is an edge, (i,j) entry is: C/deg(i) + (1-C)/n If ij is not an edge, then the (i,j) entry is (1-C)/n

11 Notes on PageRank matrix
derived from an n x n matrix the constant C is given beforehand entries depend on C and n, but also on deg(i) entries in matrix are rational numbers (not necessarily integers)

12 Exercises

13 Miniconference on the Mathematics of Computation
MTH 210 Isomorphisms Dr. Anthony Bonato Ryerson University

14 “these graphs are the same”
we’ll make precise: “these graphs are the same” If they are the same, they should share all the same properties/invariants. same will be “isomorphic”

15 Informal ideas: if graphs are isomorphic, you can redraw one to look like the other if graphs are non-isomorphic, then there is some property holding in one but not the other

16 isomorphic graphs

17 non-isomorphic graphs

18 One-to-one functions a function f: X → Y is one-to-one if distinct elements of X map to distinct elements of Y that is: For all u,v in X, if u ≠ v, then f(u) ≠ f(v) Idea: one-to-one functions “separate points” in X

19 Examples

20 Isomorphisms let G and H be graphs, and let f: V(G)→V(H) be a function
f is an isomorphism if: G and H have the same order f is one-to-one and for all vertices u and v in G: uv is an edge in G if and only if f(u)f(v) is an edge in H

21 Note my definition is a little different looking (but the equivalent!) to the book’s in real “graph theory,” you don’t define two mappings like the book does for an isomorphism...

22 Key fact if G and H have different orders or sizes, they are not isomorphic Check their subgraphs, kinds and number of cycles, number of leaves, degrees of vertices … to see if they are the same can you redraw G to look like H?

23 Exercises


Download ppt "Adjacency Matrices and PageRank"

Similar presentations


Ads by Google