SlideShare una empresa de Scribd logo
1 de 38
Depth First Search
Amar Jukuntla
A
B
F
E
H
C
G
D
Task: Conduct a depth-first search of the graph starting with node D
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C
D ✅
E
F
G
H D
D
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C ✅
D ✅
E
F
G
H
C
D
D C
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C ✅
D ✅
E
F
G
H
D
D C
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C ✅
D ✅
E ✅
F
G
H
E
D
D C E
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C ✅
D ✅
E ✅
F
G ✅
H
G
E
D
D C E G
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A
B
C ✅
D ✅
E ✅
F
G ✅
H ✅
H
G
E
D
D C E G H
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B
C ✅
D ✅
E ✅
F
G ✅
H ✅
A
H
G
E
D
D C E G H A
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
B
A
H
G
E
D
D C E G H A B
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
A
H
G
E
D
D C E G H A B
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
H
G
E
D
D C E G H A B
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
G
E
D
D C E G H A B
XX
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
E
D
D C E G H A B
XX
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F
G ✅
H ✅
D
D C E G H A B
XX
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F ✅
G ✅
H ✅
F
D
D C E G H A B F
XX
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F ✅
G ✅
H ✅
F
D
D C E G H A B F
XX
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F ✅
G ✅
H ✅
D
D C E G H A B F
XX
X
VISITED VERTICES
A
B
F
E
H
C
G
D
NODE VISITED
A ✅
B ✅
C ✅
D ✅
E ✅
F ✅
G ✅
H ✅
-1
D C E G H A B F
XX
X
VISITED VERTICES
B
A
C
E F
D
G
H I
START WITH H
B
A
C
E F
D
G
H I
H
VISITED NODES
NODE VISITED
A
B
C
D
E
F
G
H ✅
I H
B
A
C
E F
D
G
H I
H E
VISITED NODES
NODE VISITED
A
B
C
D
E ✅
F
G
H ✅
I
E
H
B
A
C
E F
D
G
H I
H E C
VISITED NODES
NODE VISITED
A
B
C ✅
D
E ✅
F
G
H ✅
I
C
E
H
B
A
C
E F
D
G
H I
H E C B
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F
G
H ✅
I
B
C
E
H
B
A
C
E F
D
G
H I
H E C B
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F
G
H ✅
I
X
C
E
H
B
A
C
E F
D
G
H I
H E C B G
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F
G ✅
H ✅
I
X
G
C
E
H
B
A
C
E F
D
G
H I
H E C B G F
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G
H ✅
I
X
F
G
C
E
H
B
A
C
E F
D
G
H I
H E C B G F
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I
X
G
C
E
H
X
B
A
C
E F
D
G
H I
H E C B G F
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I
X
G
C
E
H
X
X
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X
I
G
C
E
H
X
X
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X
G
C
E
H
X
X
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X
C
E
H
X
X
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X
C
E
H
X
X
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
E
H
X
XX
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X E
H
X
XX
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X E
H
X
XX
B
A
C
E F
D
G
H I
H E C B G F I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X H
X
XX
B
A
C
E F
D
G
H I
VISITED NODES
NODE VISITED
A
B ✅
C ✅
D
E ✅
F ✅
G ✅
H ✅
I ✅
X
X
X
X
X
-1
H E C B G F I

Más contenido relacionado

Más de Amar Jukuntla

Más de Amar Jukuntla (11)

Sorting
SortingSorting
Sorting
 
Sorting
SortingSorting
Sorting
 
Nature of open source
Nature of open sourceNature of open source
Nature of open source
 
Linux Directory System: Introduction
Linux Directory System: IntroductionLinux Directory System: Introduction
Linux Directory System: Introduction
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structures
 
Learning
LearningLearning
Learning
 
First Order Logic resolution
First Order Logic resolutionFirst Order Logic resolution
First Order Logic resolution
 
First Order Logic
First Order LogicFirst Order Logic
First Order Logic
 
A*
A*A*
A*
 
Agents1
Agents1Agents1
Agents1
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 

Último

Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíassuserf18419
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxRogerPrieto3
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveFagnerLisboa3
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxLolaBunny11
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITMaricarmen Sánchez Ruiz
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...silviayucra2
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudianteAndreaHuertas24
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 

Último (15)

Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnología
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptx
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial Uninove
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptx
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
 
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 

DFS Graph