GROUP 8 GRAPH NEW
GROUP 8 GRAPH NEW
GROUP 8 GRAPH NEW
SEMESTER: ONE
1
ANSWER TO QUESTION ONE
a. required to define graph, explain its components (vertices and edges) and difference between
directed and undirected graph:
i. Graph
Is a non linear data structure consisting of set of vertices and edges. The graph is denoted by G (V, E).
Example of graph
(a) Vertices
Are fundamental units of a graph representing objects such as people, cities, or devices.
(b) Edge
is a line between vertices. Represent relationships, links, or pathways.
2
Diagram
examples
b. required to describe graph traversal algorithms (depth-first search and breadth-first search)
and how they operate within graph:
Graph Traversals
Are methods for visiting all vertices in a graph? The following are two basic graph traversal algorithms
and how they operate within graph:
i. Depth-first search algorithm (DFS)
Is the traversal algorithm that visits all vertices of a graph in decreasing order of a graph. It uses stack
data structure to keep track of all visited nodes. Algorithm starts in an arbitrary node (root node) and
explore as far as possible along each branch before backtracking.
How DFS operate within graph.
An algorithm start at root node of the tree, goes as far it can down a given path then backtrack until it find
an unexplored path and then explore it. The algorithm did this until whole graph explored.
Consider a graph below illustrating DFS algorithm
3
ii. Breadth-first search algorithm (BFS)
Is a traversal algorithm that visits all vertices of a graph present at one level of depth of a graph before
moving to the next level of depth? BFS search a node that is closer to the source by using queue data
structure.
How BFS operate within graph.
BFS start by searching node, followed by its adjacent nodes then all nodes can be reached by a pass from
start node containing two edges, three edges and so on.
4
b. required to discuss how the structure And density of the graph can impact the efficiency of
these search algorithm.
The efficiency of graph traversal algorithms, such as Depth-First Search (DFS) and Breadth-First Search
(BFS), is influenced significantly by the structure and density of the graph. The following are how these
factors affect the efficiency of these algorithms:
i. Graph Structure
5
Components of a Graph in Networked Systems
(a) Vertices (Nodes)
Represent entities in the system, such as Computers or devices, Servers, Switches or routers.
(b) Edges (Links)
Represent connections or interactions between nodes, such as Physical cables or wireless connections,
Data transfer paths and Relationships in protocols example https.
(c) Weights (Optional)
Numerical values assigned to edges, representing, Latency or bandwidth, Packet loss rates and Cost of
data transfer.
(d) Directed or Undirected Edges
Directed Graph Models systems with one-way interactions, like routing protocols or client-server
requests. Undirected Graph Models bidirectional interactions, like peer-to-peer connections.
6
b. required to describe how graph algorithms can be used to detect unusual patterns , intrusion
or to identify path of potential malware spread in network.
Graph algorithms are invaluable for detecting unusual patterns, identifying intrusions, and analyzing the
potential spread of malware in networked systems as follows:
(a) Detecting Unusual Patterns
Graph algorithms can identify anomalies that deviate from typical network behavior. These anomalies
often indicate potential security threats. By using Clustering and Community Detection Algorithms.
Identify groups of nodes (example users, devices) with frequent interactions. Unusual nodes that do not
belong to any cluster or appear in multiple clusters may indicate compromised devices or unauthorized
access.
(b) Intrusion Detection
Graph-based intrusion detection systems (IDS) use algorithms to analyze the network for unauthorized
access or activities. By using Algorithms such as Dijkstra’s algorithm, Bellman-Ford and BFS.
7
(c) lack of standardization
There are many different types of graph and each has its own strength and weekness hence make difficult
on selection the best.
(d) difficult in interpretations.
As size of graph increase managing and interpretations become challenging leading difficult in analysis
and comprehension.
(e) Complexity to design and implement
Designing a graph handling various algorithms require careful considerations and can result bugs and
errors hence poses maintenance challenges.
(f) Data Privacy and Confidentiality Concerns
Sensitive data needs to be protected, Sharing detailed graphs with too many entities or processing them
without sufficient security measures can reveal sensitive operational structures, potentially aiding
attackers.
b. required to suggest alternatives graph structures (eg. adjacency list, adjacency matrices and
optimization techniques eg dijikstra algorithm for shortest path detection that could enhance
search efficiency in cyber security applications requiring rapid analysis of complex networks:
Suggested Alternative Graph Structures and optimization techniques are:
(a) Graph neural Networks(GNNs).
These are deep learning models that operate directly on graph structure allowing for extraction of
complex patterns and relationships. These help in cyber security to enhance malware detection,
vulnerability assessment and enhance threat detection.
Dijkstra’s algorithm finds the shortest path between a source node and all other nodes in a weighted
graph. In cyber security help for Path Optimization essential in identifying the shortest (or least costly)
path for intrusion attempts, lateral movement, or data ex-filtration across a network.
(d) Bellman-Ford Algorithm
Bellman-Ford is an algorithm for finding the shortest paths from a source node to all other nodes in a
graph, and it can handle negative edge weights. It's slower than Dijkstra but more flexible for dynamic
graphs where edge weights may change. In cyber security is helpful since used in Dynamic Environments
8
where the state of the network is constantly changing (e.g., new vulnerabilities or attacks may alter the
"weight" of edges.
9
REFERENCES
Cormen, T.H., Leiserson, C.E., Rivest, R.L., & Stein, C.(2009).introduction to algorithms(3rd ed).the MIT
press.
Goodrich, M.T., Tamassia, R., & Goldwasser, M.H (2014). Data structure and algorithm in java (6th ed)
pg 594. John wiley & Sons.
https://www.totorialspoint.com
https://www.thedshandbook.com
10