Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Design & Analysis of Algorithms, Study Guides, Projects, Research of Design

It will help you in DFS Introduction

Typology: Study Guides, Projects, Research

2018/2019

Uploaded on 04/27/2019

ayeshaarshad2899
ayeshaarshad2899 🇵🇰

4

(1)

19 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Design & Analysis of Algorithms and more Study Guides, Projects, Research Design in PDF only on Docsity! Graph: we define a graph as being composed by two sets, V and E, respectively denoting the set of vertices and the set of edges. We say that vertices are connected by edges, so an edge connects two vertices together DFS: DFS algorithm is a recursive algorithm that uses the idea of backtracking. Here, the word backtrack means that when you are moving forward and there are no more nodes along the current path, you move backwards on the same path to find nodes to traverse. Depth-first search is an algorithm for traversing or searching tree or graph data structures. One starts at the root and explores as far as possible along each branch before backtracking. This recursive nature of DFS can be implemented using stacks. For example, analyzing networks, mapping routes, scheduling, and finding spanning trees are graph problems. To analyze these problems, graph-search algorithms like depth-first search are useful.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved