1. CAREER COLLEGE BHOPAL
DEPARTMENT OF COMPUTER SCIENCE
TOPIC: GRAPH
COURSE: BCA 1ST YEAR
YEAR: 2022-2023
PAPER: PROGRAMMING METHOD & DATA STRUCTURES
NAME OF STUDENT:
ADITYA PRATAP SINGH
2. LEARNING OUTCOMES
• Student should be able to: Explain basic terminology of a graph ADT.
• Choosing the best format to display the graph representation.
• Accurately interpret data presentation on a graph .
• You are able to decide the order of vertices to be visit in the search process.
3. GRAPH ADT
• The graph abstract data type is defined as: Graph creates a new, empty
graph, add vertex adds an instance of vertex to the graph, add edge add a
new, directed edge to the graph that connects two vertices.
• A graph is a non-linear data structures consisting of vertices and edges.
The vertices are something also referred to as nodes and the edges are
lines or arcs that connect any two nodes in the graph.
5. UNDIRECTED GRAPH DIRECTED GRAPH
A set of objects that are connected
together, where all the edges are
bidirectional.
A graph in which the edges have a direction.
6. COMPLETE GRAPH REGULAR GRAPH
A simple undirected graph in which every
pair of distinct vertices is connected by a
unique edge.
A graph where each vertex has the same
number of neighbors.
7. CYCLIC GRAPH ACYCLIC GRAPH
A graph that contains at least one cycle is
known as a cyclic graph.
A graph that contains zero cycles is known as
an acyclic graph.
9. GRAPH REPRESENTATION
Graph representation is a way of analysing numerical data. It exhibits the
relation between data, ideas, information and concepts in a diagram. It is
easy to understand and it is one of the most important learning strategies. It
is always depends on the type of information in a particular domain.
10. TYPES OF GRAPH REPRESENTATION
• Line graphs
• Bar graphs
• Histograms
• Line plots
• Frequency table
• Circle graph
11. LINE GRAPH BAR GRAPH
0
1
2
3
4
5
6
Category 1 Category 2 Category 3 Category 4
Series 1 Series 2 Series 3
A line graph, also known as a line chart or
a line plot, is commonly drawn to show
information that changes over time.
A bar graph is a graphical representation of
information. It uses bars that extend to
different heights to depict value.
0% 20% 40% 60% 80% 100%
Category 1
Category 2
Category 3
Category 4
Chart Title
Series 1 Series 2 Series 3
12. HISTOGRAM LINE PLOTS
A histogram is a graph that shows the
frequency of numerical data using
rectangles.
A line plot is a graph that displays data using a
number line.
13. FREQUENCY TABLE CIRCLE GRAPH
Frequency tables are helpful to understand
which options occur more or less often in
the dataset.
A circle graph, or a pie chart, is used to
visualize information and data.
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
14. GRAPH TRAVERSALS
• A graph search technique visits every node exactly one in a systematic fashion.
Two standard graph search technique have been widely used:
• Depth-First search (DFS).
• Breadth-First search (BFS).
15. DIFFERENCE BETWEEN BFS & DFS
Sr. No. Key BFS DFS
1. DEFINITION BFS is stands for breadth first search DFS is stands for depth first search
2. DATA STRUCTURES BFS uses Queue to find the shortest
path
It is use stack to find the shortest path
3. SOURCE It is better when target is closer to
source
DFS is better when target is far from
source.
4. SUITABILITY FOR
DECISION TREE
As BFS considers all neighbour so it is
not suitable for decision tree used in
puzzle games
DFS is more suitable for decision tree
5. SPEED This is slower than DFS It is faster than BFS
6. TIME COMPLEXITY The complexity of BFS= O(V+E) where
V is vertices and E is edge
Time complexity of DFS is also O(V+E)
where V is vertices and E is edge
17. DEPARTMENT OF COMPUTER SCIENCE
Coordinator
Dr. Swarna Sinha
HOD
Department Of Computer Science
Mentor
Dr. Kapil Saxena
Asst. Professor
Department Of Computer Science
Subject Teacher
Dr. Swarna Sinha
HOD
Department Of Computer Science
Credits / Aabhar