






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Assignment 02 - Discrete Maths in BTEC Higher National Diploma in Computing
Typology: Essays (university)
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Summative Feedback:
Internal verification:
1. Binary tree
A tree whose elements have at most 2 children is called a binary tree. Since each element in a
binary tree can have only 2 children, we typically name them the left and right children.
(GeeksforGeeks, 2022)
2. Complete binary tree
A complete binary tree is another specific type of binary tree where all the tree’s levels are
filled with nodes, except the lowest level of the tree. Also, in the last or the lowest level of
this binary tree, every node should possibly reside on the left side
Figure 1 : Complete binary tree
3. Full binary tree
It is a special kind of binary tree that has either zero children or two children. It means that all
the nodes in that binary tree should either have two child nodes of its parent node or the
parent node is itself the leaf node or the external node.
6. Example of a Quantitative binary tree
Complete Binary Tree: A Binary Tree will become a Complete Binary Tree if all of its levels
are filled by nodes. But there might be an exception where the last level is not filled and has
all the keys as left as possible.
h+
h
1. Dijkstra's algorithm
The Dijkstra algorithm is one of the basic algorithms used for pathfinding. The basic idea of
this algorithm is as follows:
including the shortest path.
INFINITE. Assign the distance value as 0 for the starting point so that it is picked first.
node next to it.
from the starting point
(GeeksforGeeks, 2021)
2. Find the shortest path spanning tree for the weighted directed graph with vertices A,
B, C, D, and E was given using Dijkstra's algorithm
Figure 4 : Weighted directed graph
Take point E as the starting point, we can analyze that path as follow. The blueish and bold
word means that the node is chosen because it has the minimum value in that row:
Step E A B C D
After finishing drawing the table above to analyze our paths, we can conclude the shortest
path for this graph is S = { E, D, A, B, C }
Graph 2.1 is not an Eulerian circuit because it cannot go through every edge without
repeating nor starts and ends at the same vertex.
Graph 2 is a Hamiltonian circuit because it can go through every vertex without repeat
and ends at the same start point
Graph 3:
Figure 7 : Graph 3
Graph 3 is not an Eulerian circuit because it cannot start and end at the same vertex, but it
can go through every edge once.
Graph 3 is not a Hamiltonian circuit since it can’t go through every vertex once nor start
and end at the same vertex.
GeeksforGeeks, 2021. Dijkstra’s shortest path algorithm | Greedy Algo-7. [Online]
Available at: https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/
[Accessed 19 11 2022].
GeeksforGeeks, 2022. Binary Tree Data Structure. [Online]
Available at: https://www.geeksforgeeks.org/binary-tree-data-structure/
[Accessed 27 11 2021].