Week 10-11 Graph Theory Part 1
Week 10-11 Graph Theory Part 1
Week 10-11 Graph Theory Part 1
Graph Theory
PART A: BASICS OF GRAPH THEORY: VERTICES, EDGES, DEGREE
2
Basics of Graph Theory:
Vertices, Edges, and Degree
Learning Objectives:
❑Understand the basic components Discussion:
of a graph: vertices and edges. ❑Vertices and Edge
❑Define and calculate the degree of ❑Degree of a Vertex
a vertex. ❑Real-World Examples
❑Explore real-world examples to
illustrate these concepts.
4
Vertices and Edges
⮚ Vertices (singular: vertex) are the points in a graph. They are often
represented as dots or circles in graphical depictions.
⮚ Edges are the connections between vertices. They are represented as lines or
arcs in graphical depictions.
5
Vertices and Edges
Example:
Example:
Graph theory is widely used in various fields. Let's look at a few practical
examples.
Social Networks
✔In social networks like Facebook or Twitter, users are vertices, and
connections (friendships or followers) are edges.
✔Analyzing the degree of users can help identify popular individuals or
potential influencers.
9
Real-World Examples
Computer Networks
✔In computer networks, devices (computers, routers) are vertices, and
connections (cables or wireless links) are edges. The degree of a device can
indicate its importance in the network.
Transportation
✔In a transportation system, intersections (or cities) are vertices, and roads (or
routes) are edges. The degree of an intersection can reveal traffic congestion or
critical junctions.
10
Example Problems
Example #1
Given a graph with 6 vertices and 9 edges, calculate the average degree of its
vertices.
Solution:
Average Degree = (2 * Number of Edges) / Number of Vertices
Average Degree = (2 * 9) / 6 = 3
11
Example Problems
Example #2
Solution:
Total Degree = In-Degree + Out-Degree
Total Degree = 3 (in-degree) + 2 (out-degree) = 5
12
Conclusion