SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Graph Theory
Introduction
 What is a graph G?
 It is a pair G = (V, E),
where
 V = V(G) = set of vertices
 E = E(G) = set of edges
 Example:
 V = {s, u, v, w, x, y, z}
 E = {(x,s), (x,v)1, (x,v)2, (x,u),
(v,w), (s,v), (s,u), (s,w), (s,y),
(w,y), (u,y), (u,z),(y,z)}
Edges
 An edge may be labeled by a pair of vertices, for
instance e = (v,w).
 e is said to be incident on v and w.
 Isolated vertex = a vertex without incident
edges.
Special edges
 Parallel edges
 Two or more edges
joining a pair of vertices
 in the example, a and b
are joined by two parallel
edges
 Loops
 An edge that starts and
ends at the same vertex
 In the example, vertex d
has a loop
Special graphs
 Simple graph
 A graph without loops
or parallel edges.
 Weighted graph
 A graph where each
edge is assigned a
numerical label or
“weight”.
Directed graphs (digraphs)
G is a directed graph or
digraph if each edge
has been associated
with an ordered pair
of vertices, i.e. each
edge has a direction
Complete graph K n
 Let n > 3
 The complete graph Kn is
the graph with n vertices
and every pair of vertices
is joined by an edge.
 The figure represents K5
Connected graphs
 A graph is connected if
every pair of vertices
can be connected by a
path
 Each connected
subgraph of a non-
connected graph G is
called a component of G
Adjacency Matrices
Incidence matrix
 Incidence matrix
 Label rows with vertices
 Label columns with edges
 1 if an edge is incident to
a vertex, 0 otherwise
e f g h j
v 1 1 0 0 0
w 1 0 1 0 1
x 0 0 0 1 1
y 0 1 1 1 0
Try yourself
 Draw a graph with
the adjacency
matrix
Paths and cycles
 A path of length n is a
sequence of n + 1
vertices and n
consecutive edges
 A cycle is a path that
begins and ends at
the same vertex
Euler cycles
 An Euler cycle in a graph G is a
simple cycle that passes through
every edge of G only once.
Degree of a vertex
 The degree of a vertex
v, denoted by δ(v), is
the number of edges
incident on v
 Example:
 δ(a) = 4, δ(b) = 3,
 δ(c) = 4, δ(d) = 6,
 δ(e) = 4, δ(f) = 4,
 δ(g) = 3.
Sum of the degrees of a graph
Theorem: If G is a graph with m edges and n
vertices v1, v2,…, vn, then
n
Σ δ(vi) = 2m
i = 1
In particular, the sum of the degrees of all the
vertices of a graph is even.
6.3 Hamiltonian cycles
 Traveling salesperson
problem
 To visit every vertex of a
graph G only once by a
simple cycle.
 Such a cycle is called a
Hamiltonian cycle.
 If a connected graph G has
a Hamiltonian cycle, G is
called a Hamiltonian graph.
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Graph theory
Graph theoryGraph theory
Graph theory
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Graph theory
Graph theory Graph theory
Graph theory
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Trees
Trees Trees
Trees
 
Generating function
Generating functionGenerating function
Generating function
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
 
Planar graph
Planar graphPlanar graph
Planar graph
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
LinearAlgebra.ppt
LinearAlgebra.pptLinearAlgebra.ppt
LinearAlgebra.ppt
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
 
Introduction to Functions of Several Variables
Introduction to Functions of Several VariablesIntroduction to Functions of Several Variables
Introduction to Functions of Several Variables
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network system
 
Ode powerpoint presentation1
Ode powerpoint presentation1Ode powerpoint presentation1
Ode powerpoint presentation1
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - Samy
 

Ähnlich wie Graphs - Discrete Math

Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptishan743441
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryRai University
 
Graph theory introduction
Graph theory introductionGraph theory introduction
Graph theory introductionSagar Khairnar
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptxswapnilbs2728
 
Graph Representation, DFS and BFS Presentation.pptx
Graph Representation, DFS and BFS Presentation.pptxGraph Representation, DFS and BFS Presentation.pptx
Graph Representation, DFS and BFS Presentation.pptxbashirabdullah789
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8ITNet
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)zunaira saleem
 
Skew Products on Directed Graphs
Skew Products on Directed GraphsSkew Products on Directed Graphs
Skew Products on Directed GraphsCaridad Arroyo
 

Ähnlich wie Graphs - Discrete Math (20)

graph.ppt
graph.pptgraph.ppt
graph.ppt
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theoryBCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory
 
DIGITAL TEXT BOOK
DIGITAL TEXT BOOKDIGITAL TEXT BOOK
DIGITAL TEXT BOOK
 
DATA STRUCTURE PRESENTATION.pptx
DATA STRUCTURE  PRESENTATION.pptxDATA STRUCTURE  PRESENTATION.pptx
DATA STRUCTURE PRESENTATION.pptx
 
Graph theory introduction
Graph theory introductionGraph theory introduction
Graph theory introduction
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
lec6.pptx
lec6.pptxlec6.pptx
lec6.pptx
 
Graph Representation, DFS and BFS Presentation.pptx
Graph Representation, DFS and BFS Presentation.pptxGraph Representation, DFS and BFS Presentation.pptx
Graph Representation, DFS and BFS Presentation.pptx
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)
 
Skew Products on Directed Graphs
Skew Products on Directed GraphsSkew Products on Directed Graphs
Skew Products on Directed Graphs
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph
GraphGraph
Graph
 
Graph
GraphGraph
Graph
 

Mehr von Sikder Tahsin Al-Amin

de Bruijn Graph Construction from Combination of Short and Long Reads
de Bruijn Graph Construction from Combination of Short and Long Readsde Bruijn Graph Construction from Combination of Short and Long Reads
de Bruijn Graph Construction from Combination of Short and Long ReadsSikder Tahsin Al-Amin
 
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...Sikder Tahsin Al-Amin
 
Combinational Logic with MSI and LSI
Combinational Logic with MSI and LSICombinational Logic with MSI and LSI
Combinational Logic with MSI and LSISikder Tahsin Al-Amin
 
Cloud computing for education: A new dawn?
Cloud computing for education: A new dawn?Cloud computing for education: A new dawn?
Cloud computing for education: A new dawn?Sikder Tahsin Al-Amin
 

Mehr von Sikder Tahsin Al-Amin (10)

de Bruijn Graph Construction from Combination of Short and Long Reads
de Bruijn Graph Construction from Combination of Short and Long Readsde Bruijn Graph Construction from Combination of Short and Long Reads
de Bruijn Graph Construction from Combination of Short and Long Reads
 
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...
Distance Estimation by Constructing The Virtual Ruler in Anisotropic Sensor N...
 
Combinational Logic with MSI and LSI
Combinational Logic with MSI and LSICombinational Logic with MSI and LSI
Combinational Logic with MSI and LSI
 
Combinational Logic
Combinational LogicCombinational Logic
Combinational Logic
 
Simplification of Boolean Functions
Simplification of Boolean FunctionsSimplification of Boolean Functions
Simplification of Boolean Functions
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
Problem Solving Basics
Problem Solving BasicsProblem Solving Basics
Problem Solving Basics
 
Cloud computing for education: A new dawn?
Cloud computing for education: A new dawn?Cloud computing for education: A new dawn?
Cloud computing for education: A new dawn?
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Fuzzy clustering of sentence
Fuzzy clustering of sentenceFuzzy clustering of sentence
Fuzzy clustering of sentence
 

Kürzlich hochgeladen

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 

Kürzlich hochgeladen (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 

Graphs - Discrete Math

  • 2. Introduction  What is a graph G?  It is a pair G = (V, E), where  V = V(G) = set of vertices  E = E(G) = set of edges  Example:  V = {s, u, v, w, x, y, z}  E = {(x,s), (x,v)1, (x,v)2, (x,u), (v,w), (s,v), (s,u), (s,w), (s,y), (w,y), (u,y), (u,z),(y,z)}
  • 3. Edges  An edge may be labeled by a pair of vertices, for instance e = (v,w).  e is said to be incident on v and w.  Isolated vertex = a vertex without incident edges.
  • 4. Special edges  Parallel edges  Two or more edges joining a pair of vertices  in the example, a and b are joined by two parallel edges  Loops  An edge that starts and ends at the same vertex  In the example, vertex d has a loop
  • 5. Special graphs  Simple graph  A graph without loops or parallel edges.  Weighted graph  A graph where each edge is assigned a numerical label or “weight”.
  • 6. Directed graphs (digraphs) G is a directed graph or digraph if each edge has been associated with an ordered pair of vertices, i.e. each edge has a direction
  • 7. Complete graph K n  Let n > 3  The complete graph Kn is the graph with n vertices and every pair of vertices is joined by an edge.  The figure represents K5
  • 8. Connected graphs  A graph is connected if every pair of vertices can be connected by a path  Each connected subgraph of a non- connected graph G is called a component of G
  • 10. Incidence matrix  Incidence matrix  Label rows with vertices  Label columns with edges  1 if an edge is incident to a vertex, 0 otherwise e f g h j v 1 1 0 0 0 w 1 0 1 0 1 x 0 0 0 1 1 y 0 1 1 1 0
  • 11. Try yourself  Draw a graph with the adjacency matrix
  • 12. Paths and cycles  A path of length n is a sequence of n + 1 vertices and n consecutive edges  A cycle is a path that begins and ends at the same vertex
  • 13. Euler cycles  An Euler cycle in a graph G is a simple cycle that passes through every edge of G only once.
  • 14. Degree of a vertex  The degree of a vertex v, denoted by δ(v), is the number of edges incident on v  Example:  δ(a) = 4, δ(b) = 3,  δ(c) = 4, δ(d) = 6,  δ(e) = 4, δ(f) = 4,  δ(g) = 3.
  • 15. Sum of the degrees of a graph Theorem: If G is a graph with m edges and n vertices v1, v2,…, vn, then n Σ δ(vi) = 2m i = 1 In particular, the sum of the degrees of all the vertices of a graph is even.
  • 16. 6.3 Hamiltonian cycles  Traveling salesperson problem  To visit every vertex of a graph G only once by a simple cycle.  Such a cycle is called a Hamiltonian cycle.  If a connected graph G has a Hamiltonian cycle, G is called a Hamiltonian graph.
  • 17.