basics-of-graph-theory
basics-of-graph-theory
◼ What is a Graph?
◼ Applications of Graphs
◼ Categorization
◼ Terminology
What is a Graph?
A graph G=(V,E) consists of a finite
nonempty set V, the elements of which are
the vertices of G, and a finite set E of
unordered pairs of distinct elements of V
called edges.
G = ( V, E ) 1 3
Where, V - set of vertices
Vertex
E - set of edges Edge 2 (Node)
4
V = {1, 2, 3, 4, 5}
5
E = { (1,2), (1,3), (1,4), (2,3), (3,5), (4,5) }
Graph applications
◼ Graphs can be used for:
❑ Finding a route to drive from one city to another
❑ Finding connecting flights from one city to another
❑ Determining least-cost highway connections
❑ Designing optimal connections on a computer chip
❑ Implementing automata
❑ Implementing compilers
❑ Doing garbage collection
❑ Representing family histories
❑ Doing similarity testing (e.g. for a dating service)
❑ Pert charts
❑ Playing games
Graph applications
Computer
◼ Computer Networks
Resistor/Inductor/…
◼ Electrical Circuits
◼ Road Map
City
Graph Models
◼ Acquaintanceship Graphs – showing whether two people know each
other, that is, whether they are acquainted.
◼ Influence Graphs – showing whether a person can influence another
(e.g., a → b) by using a directed graph.
◼ The Bollywood Graph – showing whether the actors have worked
together in a movie.
◼ Round-Robin Tournaments – showing if team a beats team b (using
an edge (a, b)) via a directed graph.
◼ Collaboration Graphs – modeling joint authorship of academic papers
(an edge links two people if they have jointly written a paper).
◼ Call Graphs – modeling telephone calls made in a network (can use
either directed multigraphs or undirected ones, depending on the
interest)
◼ The Web Graph – representing hyperlinks between Web pages using a
directed graph. E.g., Web page a links to Web page b via an edge
pointing from a to b.
Structure of the Internet
SOURCE: CISCO SYSTEMS
NAP
Backbone 1 Europe
Japan
Backbone 4, 5, N
NAP Regional A
Backbone 2
NAP
NAP
Backbone 3 Australia
Regional B
50
1 3
40 30
20
2 40
4
30 5
Graph Terminology
1 3
a f e g e d
Handshaking Theorem
1 3 1,4,5,3 is a simple
path.
2
4 But 1,4,5,4 is not a
5 simple path.
Length
1 3
Length of the path
2
1,4,5,3 is 3
4
5
Circuit
1 3
The path 3,2,1,4,5,3
2 is a circuit.
4
5
Cycle