SlideShare a Scribd company logo
Basic Traversal And Search
Techniques
Presented by
S.Vijayalakshmi I-MSC[IT]
Connected Components
• A connected components is a subgraph in
which any two vertices are connected to each
other by paths and which is connected to no
additional vertices of the super graph
Algorithm For Connected
Components
• Connected components(G)
For each vertex V G. G.V
Make –set (V)
For each edge (U,V) G.E
If find –set(4) find-set(V)
Union(U,V)
• Same Component(U,V)
If find-set(U)= =find-set(V)
Return true
Else return false
Determining Connected
Components
void Graph::Components()
{
visited = new Boolean[n];
for(int i=0 ; i<n ; i++)
visited[i]= False;
for(i=0 ; i<n ; i++)
if(!visited[i])
{
DFS(i);
OutputNewComponent();
}
delete[]vivited;
}
GRAPHS
• Graphs are one of the most interesting data
structures in computer science
• Graths and tree are somewhat similar by their
structureand in fact tree is derived from the
graph and data structure
• Commonly used graph traversal algorithms
are:
DFS
BFS
BFS
• In this we visit the node level by
level so it will start with 0, which
is the root node then next ,then the
last level
• Queue is used to implement BFS
DFS
• In this we visit the root node first
then its children until it reaches
the end node
• Stack is used to implement DFS
Spanning Tree
• Spanning tree have a connected undirected graph
 connected : every node reachable from every other node
 Undirected: edges do not have automatic direction
• Spanning tree of the graph is a connected sub -
graph in which there are no cycles
• A spanning of a graph has no cycles but still
connects to every house
• If G is a connected graph with n vertices and m
edges, spanning tree of G must have n-1 edges ,
and no.of edges deleted from G to get a spanning
tree must be m -(n-1)=m-n+1
• A graph may have many spanning tree;for
instance the complete graph of four vertices.
A connected,
undirected graph
four of the spanning tree of the graph
Biconnected Components
Basically it is a graph theory.
A graph is biconnected if it contains no
‘articulation’ points .
A components of a graph G is maximal
“biconnected subgraph”. That means it is
not contained any larger biconnected
subgraph of G
Articulation Points
Let G = (V,E) be a connected
undirected graph.
• Articulation point : is any vertex f G whose
removal result in a disconnected graph
Articulation Point
• Articulation point : is any vertex of G whose
removal results in a disconnected graph
Biconnected Components
• A graph is biconnected if it contains no
articulation points.
Definition
• The aim of the DFS algorithm is travers the
graph in such a way that is try to go for from
the root node. Stack is use in the
implementation of the DFS. lets see hoe DFS
work with respect to the following graph.
• DFS – Depth First Search
• It implements stack, the concept of LIFO –
Last In First Out.
Un Directed Graph
• Let G = (N,A)be an undirected graph all of
whose nodes we wish to visit
• To carry out a depth first traversal of the graph
choose any node V N as the starting point
Directed Graph
• The algorithm is essentially the same as for
undirected graph , the different residing in the
interpretation of the word “adjacent”.
• In a directed graph, node W is an adjacent to
node V but is not adjacent to W
Basic Traversal and Search Techniques

More Related Content

What's hot

Presentation - Bi-directional A-star search
Presentation - Bi-directional A-star searchPresentation - Bi-directional A-star search
Presentation - Bi-directional A-star search
Mohammad Saiful Islam
 
Few More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split GraphsFew More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split Graphs
ijcoa
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
vikas dhakane
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
Hema Kashyap
 
Hprec7.1
Hprec7.1Hprec7.1
Hprec7.1
stevenhbills
 
Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-application
Apurbo Datta
 
breadth first search
breadth first searchbreadth first search
breadth first search
DeepikaT13
 
Can you trust the internet? An introduction to graph theory, computational co...
Can you trust the internet? An introduction to graph theory, computational co...Can you trust the internet? An introduction to graph theory, computational co...
Can you trust the internet? An introduction to graph theory, computational co...
Denise Gosnell, Ph.D.
 
College Timetable Scheduling System
College Timetable Scheduling SystemCollege Timetable Scheduling System
College Timetable Scheduling System
ShardulKulkarni24
 
Explore ML Beginner Session on Linear Regression
Explore ML Beginner Session on Linear RegressionExplore ML Beginner Session on Linear Regression
Explore ML Beginner Session on Linear Regression
vaishnaviayyappan
 
AI Greedy and A-STAR Search
AI Greedy and A-STAR SearchAI Greedy and A-STAR Search
AI Greedy and A-STAR Search
Andrew Ferlitsch
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
shashidharPapishetty
 
Core 3 Functions 1
Core 3 Functions 1Core 3 Functions 1
Core 3 Functions 1
davidmiles100
 
Alg1 ch0407example5
Alg1 ch0407example5Alg1 ch0407example5
Alg1 ch0407example5
amymallory
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
Md. Tanvir Hossain
 
Alg II 2-7 Transformations
Alg II 2-7 TransformationsAlg II 2-7 Transformations
Alg II 2-7 Transformations
jtentinger
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
Shuqing Zhang
 
20181204i mlse discussions
20181204i mlse discussions20181204i mlse discussions
20181204i mlse discussions
Hiroshi Maruyama
 
Arrays.pptx
Arrays.pptxArrays.pptx
Arrays.pptx
Shweta Bhatia
 

What's hot (19)

Presentation - Bi-directional A-star search
Presentation - Bi-directional A-star searchPresentation - Bi-directional A-star search
Presentation - Bi-directional A-star search
 
Few More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split GraphsFew More Results on Sum Labeling of Split Graphs
Few More Results on Sum Labeling of Split Graphs
 
A* Search Algorithm
A* Search AlgorithmA* Search Algorithm
A* Search Algorithm
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
 
Hprec7.1
Hprec7.1Hprec7.1
Hprec7.1
 
Interpolation and-its-application
Interpolation and-its-applicationInterpolation and-its-application
Interpolation and-its-application
 
breadth first search
breadth first searchbreadth first search
breadth first search
 
Can you trust the internet? An introduction to graph theory, computational co...
Can you trust the internet? An introduction to graph theory, computational co...Can you trust the internet? An introduction to graph theory, computational co...
Can you trust the internet? An introduction to graph theory, computational co...
 
College Timetable Scheduling System
College Timetable Scheduling SystemCollege Timetable Scheduling System
College Timetable Scheduling System
 
Explore ML Beginner Session on Linear Regression
Explore ML Beginner Session on Linear RegressionExplore ML Beginner Session on Linear Regression
Explore ML Beginner Session on Linear Regression
 
AI Greedy and A-STAR Search
AI Greedy and A-STAR SearchAI Greedy and A-STAR Search
AI Greedy and A-STAR Search
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
 
Core 3 Functions 1
Core 3 Functions 1Core 3 Functions 1
Core 3 Functions 1
 
Alg1 ch0407example5
Alg1 ch0407example5Alg1 ch0407example5
Alg1 ch0407example5
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
 
Alg II 2-7 Transformations
Alg II 2-7 TransformationsAlg II 2-7 Transformations
Alg II 2-7 Transformations
 
Astar algorithm
Astar algorithmAstar algorithm
Astar algorithm
 
20181204i mlse discussions
20181204i mlse discussions20181204i mlse discussions
20181204i mlse discussions
 
Arrays.pptx
Arrays.pptxArrays.pptx
Arrays.pptx
 

Similar to Basic Traversal and Search Techniques

Basic Traversal and Search Techniques
Basic Traversal and Search TechniquesBasic Traversal and Search Techniques
Basic Traversal and Search Techniques
SVijaylakshmi
 
DSA ppt.pptx
DSA ppt.pptxDSA ppt.pptx
DSA ppt.pptx
18csjeyavarthini
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
Jonghoon Park
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
ssuser1989da
 
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docxgraphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
whittemorelucilla
 
LEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdfLEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdf
MuhammadUmerIhtisham
 
Lecture13
Lecture13Lecture13
Lecture13
vaishali_singh
 
Graphs
GraphsGraphs
FADML 06 PPC Graphs and Traversals.pdf
FADML 06 PPC Graphs and Traversals.pdfFADML 06 PPC Graphs and Traversals.pdf
FADML 06 PPC Graphs and Traversals.pdf
Yelah1
 
Spanningtreesppt
SpanningtreespptSpanningtreesppt
Spanningtreesppt
Jyoshna Cec Cse Staf bejjam
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
oneous
 
Lecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptxLecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptx
king779879
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
nabati
 
Graph Data Structure
Graph Data StructureGraph Data Structure
Graph Data Structure
Keno benti
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
PyData
 
NON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxNON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptx
Rajitha Reddy Alugati
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
Dabbal Singh Mahara
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
Tribhuvan University
 
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptxData Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptx
RashidFaridChishti
 
09_DS_MCA_Graphs.pdf
09_DS_MCA_Graphs.pdf09_DS_MCA_Graphs.pdf
09_DS_MCA_Graphs.pdf
Prasanna David
 

Similar to Basic Traversal and Search Techniques (20)

Basic Traversal and Search Techniques
Basic Traversal and Search TechniquesBasic Traversal and Search Techniques
Basic Traversal and Search Techniques
 
DSA ppt.pptx
DSA ppt.pptxDSA ppt.pptx
DSA ppt.pptx
 
8150.graphs
8150.graphs8150.graphs
8150.graphs
 
graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________graph_theory_1-11.pdf___________________
graph_theory_1-11.pdf___________________
 
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docxgraphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
graphin-c1.pnggraphin-c1.txt1 22 3 83 44 5.docx
 
LEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdfLEC 12-DSALGO-GRAPHS(final12).pdf
LEC 12-DSALGO-GRAPHS(final12).pdf
 
Lecture13
Lecture13Lecture13
Lecture13
 
Graphs
GraphsGraphs
Graphs
 
FADML 06 PPC Graphs and Traversals.pdf
FADML 06 PPC Graphs and Traversals.pdfFADML 06 PPC Graphs and Traversals.pdf
FADML 06 PPC Graphs and Traversals.pdf
 
Spanningtreesppt
SpanningtreespptSpanningtreesppt
Spanningtreesppt
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
 
Lecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptxLecture 2.3.1 Graph.pptx
Lecture 2.3.1 Graph.pptx
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Graph Data Structure
Graph Data StructureGraph Data Structure
Graph Data Structure
 
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam LermaGraph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
Graph Analytics - From the Whiteboard to Your Toolbox - Sam Lerma
 
NON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptxNON-LINEAR DATA STRUCTURE-Graphs.pptx
NON-LINEAR DATA STRUCTURE-Graphs.pptx
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
Data Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptxData Structures and Agorithm: DS 21 Graph Theory.pptx
Data Structures and Agorithm: DS 21 Graph Theory.pptx
 
09_DS_MCA_Graphs.pdf
09_DS_MCA_Graphs.pdf09_DS_MCA_Graphs.pdf
09_DS_MCA_Graphs.pdf
 

More from SVijaylakshmi

client server computing.pptx
client server computing.pptxclient server computing.pptx
client server computing.pptx
SVijaylakshmi
 
small industries.pptx
small industries.pptxsmall industries.pptx
small industries.pptx
SVijaylakshmi
 
pseudo Color Image.pptx
pseudo Color Image.pptxpseudo Color Image.pptx
pseudo Color Image.pptx
SVijaylakshmi
 
hive.pptx
hive.pptxhive.pptx
hive.pptx
SVijaylakshmi
 
real Time data analysis.pptx
real Time data analysis.pptxreal Time data analysis.pptx
real Time data analysis.pptx
SVijaylakshmi
 
Density based methods
Density based methodsDensity based methods
Density based methods
SVijaylakshmi
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
SVijaylakshmi
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
SVijaylakshmi
 
control structures
control structurescontrol structures
control structures
SVijaylakshmi
 
Network security
Network securityNetwork security
Network security
SVijaylakshmi
 
Swing components
Swing componentsSwing components
Swing components
SVijaylakshmi
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compiler
SVijaylakshmi
 

More from SVijaylakshmi (12)

client server computing.pptx
client server computing.pptxclient server computing.pptx
client server computing.pptx
 
small industries.pptx
small industries.pptxsmall industries.pptx
small industries.pptx
 
pseudo Color Image.pptx
pseudo Color Image.pptxpseudo Color Image.pptx
pseudo Color Image.pptx
 
hive.pptx
hive.pptxhive.pptx
hive.pptx
 
real Time data analysis.pptx
real Time data analysis.pptxreal Time data analysis.pptx
real Time data analysis.pptx
 
Density based methods
Density based methodsDensity based methods
Density based methods
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
control structures
control structurescontrol structures
control structures
 
Network security
Network securityNetwork security
Network security
 
Swing components
Swing componentsSwing components
Swing components
 
Parallel language and compiler
Parallel language and compilerParallel language and compiler
Parallel language and compiler
 

Recently uploaded

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

Basic Traversal and Search Techniques

  • 1. Basic Traversal And Search Techniques Presented by S.Vijayalakshmi I-MSC[IT]
  • 2.
  • 3.
  • 4. Connected Components • A connected components is a subgraph in which any two vertices are connected to each other by paths and which is connected to no additional vertices of the super graph
  • 5. Algorithm For Connected Components • Connected components(G) For each vertex V G. G.V Make –set (V) For each edge (U,V) G.E If find –set(4) find-set(V) Union(U,V) • Same Component(U,V) If find-set(U)= =find-set(V) Return true Else return false
  • 6. Determining Connected Components void Graph::Components() { visited = new Boolean[n]; for(int i=0 ; i<n ; i++) visited[i]= False; for(i=0 ; i<n ; i++) if(!visited[i]) { DFS(i); OutputNewComponent(); } delete[]vivited; }
  • 7.
  • 8. GRAPHS • Graphs are one of the most interesting data structures in computer science • Graths and tree are somewhat similar by their structureand in fact tree is derived from the graph and data structure • Commonly used graph traversal algorithms are: DFS BFS
  • 9. BFS • In this we visit the node level by level so it will start with 0, which is the root node then next ,then the last level • Queue is used to implement BFS DFS • In this we visit the root node first then its children until it reaches the end node • Stack is used to implement DFS
  • 10. Spanning Tree • Spanning tree have a connected undirected graph  connected : every node reachable from every other node  Undirected: edges do not have automatic direction • Spanning tree of the graph is a connected sub - graph in which there are no cycles • A spanning of a graph has no cycles but still connects to every house • If G is a connected graph with n vertices and m edges, spanning tree of G must have n-1 edges , and no.of edges deleted from G to get a spanning tree must be m -(n-1)=m-n+1
  • 11. • A graph may have many spanning tree;for instance the complete graph of four vertices. A connected, undirected graph four of the spanning tree of the graph
  • 12.
  • 13. Biconnected Components Basically it is a graph theory. A graph is biconnected if it contains no ‘articulation’ points . A components of a graph G is maximal “biconnected subgraph”. That means it is not contained any larger biconnected subgraph of G
  • 14. Articulation Points Let G = (V,E) be a connected undirected graph. • Articulation point : is any vertex f G whose removal result in a disconnected graph
  • 15. Articulation Point • Articulation point : is any vertex of G whose removal results in a disconnected graph
  • 16. Biconnected Components • A graph is biconnected if it contains no articulation points.
  • 17.
  • 18. Definition • The aim of the DFS algorithm is travers the graph in such a way that is try to go for from the root node. Stack is use in the implementation of the DFS. lets see hoe DFS work with respect to the following graph. • DFS – Depth First Search • It implements stack, the concept of LIFO – Last In First Out.
  • 19. Un Directed Graph • Let G = (N,A)be an undirected graph all of whose nodes we wish to visit • To carry out a depth first traversal of the graph choose any node V N as the starting point
  • 20. Directed Graph • The algorithm is essentially the same as for undirected graph , the different residing in the interpretation of the word “adjacent”. • In a directed graph, node W is an adjacent to node V but is not adjacent to W