You are on page 1of 6

PROGRAM TITLE: ……………………………………………

UNIT TITLE: ……Discrete Math……………………………………………….

ASSIGNMENT NUMBER: ……2……………………………

ASSIGNMENT NAME: ……Graph theory……………………………….

SUBMISSION DATE: ……………………………………….

DATE RECEIVED: ………November 24…………………………………….

TUTORIAL LECTURER: ……………………………………

WORD COUNT: ……………………………………………..

STUDENT NAME: …Nguyễn Quốc An……………………………………………

STUDENT ID: ……BKC18348……………………………………………….

MOBILE NUMBER: ……0795179677………………………………………


Summative Feedback:

Internal verification:
LO2: Analyse mathematical structures of objects using graph theory

PART 1: Discuss using two examples on binary trees both quantitatively and qualitatively.

Binary Tree: Every component could only have two children.maximum number of nodes that can exist
at any level i is 2i. A binary tree is essential in a software program. One of the most common applications
of binary trees is in search algorithms. A binary tree is a type of data structure that is used to store
information. A nonlinear data structure is represented by a binary tree.

First example Quantitative binary tree:

Complete binary tree: The binary tree is comprehensive whether all stages are completely filled (save
potentially the last level, which has modules as far to the left as practicable). For example, maximum
nodes = 2h+1 - 1, minimum nodes = 2h and maximum height = log n

Second example Qualitative binary tree:

Complete binary tree: Each nodes have both 0 and 2 children. Except for the leaf node, each node will
have exactly two children. Moreover, number of leaf nodes = number of internal node + 1. For example,
maximum nodes = 2h+1 – 1, minimum nodes = 2h + 1 and maximum height = (n - 1)/2

PART 2:

 State the Dijkstra's algorithm for a directed weighted graph with all non-negative edge
weights.

The shortest path issue for a directed weighted graph with non-negative parameters is
solved by Dijkstra's algorithm. Because the values are non-negative, it is assumed that w(e) ≥ 0
for all e ∈ E. The method keeps a priority queue minQ in which unprocessed vertices with their
relatively short estimation methods est(v) are stored as key values. It then continuously takes the
vertex u from minQ with the lowest est(u) and extends all edges occurring from u to any vertex in
minQ. After extracting one vertex from minQ and completing all flexibilities through it, the
algorithm considers this vertex as completed and does not examine it again. The procedure
terminates when either the prioritized queue (minQ) or every vertex is checked exactly once.

 Find the shortest path spanning tree for the weighted directed graph with vertices A, B, C,
D, and E given using Dijkstra’s algorithm.

Shortest path to A: E - A, cost = 5

Shortest path to D: E - D, cost = 3

Shortest path to C: E - A - C, cost = 9

Shortest path to B: E - D - B, cost = 7


The minimum spanning tree:

PART 3: Check whether the following graphs have an Eulerian and/or Hamiltonian circuit.

Graph 1: Has Hamiltonian: A-B-D-C-E

Graph 2: Has Hamiltonian: A-B-C-D-E-A


Graph 3: Has Hamiltonian: A-B-C-E-D
PART 4:

 Construct a proof for the five colours theorem for every planar graph.

Theorem: Each planar graph with n nodes could be coloured with a maximum of 5 colors. We
induct on n, the amount of vertices in a planar graph G, to prove using induction.

Base Case, P(n ≤ 5): Because G contains ≤ 5 nodes, the graph can also be filled with 5 different
colors.

Inductive step, P(n + 1): For example P(n) is true and prove P(n) is true with every planar
graph and n vertices.

As we know every planar graph include one vertex with deg(v) ≤ 5. Furthermore, let call this
vertex v in our graph G. While, discharge v and the excessing subgraph G’ can lead to assume P(n).

If deg(v) ≤ 4, to achieve an acceptable colouring, we can use 4 colors to represent all vertices
close to v and color 5 to show v itself. In contrast, if deg(v) = 5, we consider that all of the vertices
next to v are colored differently.

Hence proved.

 Discuss how efficiently Graph Theory can be used in a route planning project for a vacation
trip from Colombo to Trincomalee by considering most of the practical situations.
Essentially consider the two fold,
 Routes with shortest distance (Quick route travelling by own vehicle)
 Route with the lowest cost
 Answer: It is accomplished by initially scanning a graph, beginning at one point and
progressing through nearby nodes until the destination node is approached. The purpose of
route planning in particular is to find the shortest path to the destination. Moreover, the
primary goal is to eliminate path-request delaying while increasing overall effectiveness.
Weighted graphs and modifications of algorithms can also be used to determine optimal
paths, that is, routes with the shortest distance and the lowest possible cost. Weights on the
graph's edges are provided based on real-world characteristics, including weather
conditions and network capacity at the selected time. Finally, the two main challenges that
must be handled in this Graph Theory application are determining the combination of both
edges and comparing the distance between two alternative pathways with different edge
lengths.

You might also like