30
Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Embed Size (px)

Citation preview

Page 1: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Week 1 – Introduction to Graph Theory I

Dr. Anthony BonatoRyerson University

AM8002Fall 2014

Page 2: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

21st Century Graph Theory:Complex Networks

• web graph, social networks, biological networks, internet networks, …

Page 3: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

• a graph G=(V(G),E(G))=(V,E) consists of a nonempty set of vertices or nodes V, and a set of edges E, which is a symmetric binary relation on V

nodesedges

• in directed graphs (digraphs) E need not be symmetric

Page 4: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

A directed graph

Page 5: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

• number of nodes: order, |V|

• number of edges: size, |E|

• Note:

2

||||

VE

Page 6: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

The web graph

• nodes: web pages

• edges: links

• over 1 trillion nodes, with billions of nodes added each day

Page 7: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Ryerson

GreenlandTourism

Frommer’s

Four SeasonsHotel

City of Toronto

Nuit Blanche

small world property

Page 8: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

On-line Social Networks (OSNs)Facebook, Twitter, LinkedIn…

Page 9: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014
Page 10: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Biological networks: proteomics

nodes: proteins

edges:

biochemical interactions

Yeast: 2401 nodes11000 edges

Page 11: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Complex networks

• the web graph, OSNs, and protein interaction networks are examples of complex networks:– large scale– small world property– power law degree distributions

Page 12: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Degrees• the degree of a node x, written

deg(x)

is the number of edges incident with x

Theorem 1.1 - First Theorem of Graph Theory:

Exercise: what is the analogous theorem for digraphs?

V(G)x

|E(G)|2deg(x)

Page 13: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Corollary 1.2: In every graph, there are an even number of odd degree nodes.

• for example, there is no order 19 graphwhere each vertex has order 9 (i.e. 9-regular)

Page 14: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Discussion

Show that a graph cannot have each vertex of different degree.

Page 15: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Subgraphs

• let G be a graph, and S a subset of V(G)– the subgraph induced by S in G has vertices

S, and edges those of G with both endpoints in S

– written <S>G

• a subgraph is a subset of the vertices and edges of G

• a spanning subgraph is a subgraph H with V(H)=V(G)

Page 16: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

S<S>G

Page 17: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

a spanning subgraph (tree)

Page 18: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Isomorphisms

• let G and H be graphs, and let f: V(G)→V(H) be a function

• f is a homomorphism if whenever xy is an edge in G, then f(x)f(y) is an edge in H;– write: G → H

• f is an embedding if it is injective, and xy is an edge in G iff f(x)f(y) is an edge in H– write: G ≤ H

• f is an isomorphism iff it is a surjective embedding– Write:

• NOTE: isomorphic graphs are viewed as the “same”HG

Page 19: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

isomorphic graphs

Page 20: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

non-isomorphic graphs

Page 21: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Special graphs

• cliques (complete graphs): Kn

– n nodes– all distinct nodes are joined

• cocliques (independent sets): Kn

– n nodes– no edges– complement of a clique

(will define later)

Page 22: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

• cycles Cn

-n nodes on a circle

• paths Pn

-n nodes on a line

-length is n-1

Page 23: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

• bipartite cliques (bicliques, complete bipartite graphs)

Ki,j: a set X of vertices of cardinality i, and one Y of cardinality j, such that all edges are present between X and Y, and these are the only edges

Page 24: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

• hypercubes Qn

-vertices are n-bit binary strings; two strings adjacent if they differ in exactly one bit

Exercise: Qn is n-regular, and is isomorphic to the following graph: vertices are subsets of an n-element set; two vertices are adjacent if they differ by exactly one element

Page 25: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Petersen graph

Page 26: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Connected graphs

• a graph is connected if every pair of distinct vertices is joined by at least one path

• otherwise, a graph is disconnected

• connected components: maximal (with respect to inclusion) connected induced subgraphs

Page 27: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Examples of connected components

Page 28: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Graph complements

• the complement of a graph G, written G,

has the same vertices as G, with two distinct vertices joined if and only they are not joined in G

• examples:

Page 29: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Trees

• a graph is a tree if it is connected and contains no cycles (that is, is acyclic)

Page 30: Week 1 – Introduction to Graph Theory I Dr. Anthony Bonato Ryerson University AM8002 Fall 2014

Theorem 1.3: The following are equivalent

1. The graph G is a tree.

2. The graph G is connected and has size exactly |V(G)|-1.

3. Every pair of vertices in G is connected by a unique path.