Depth-first search is different from breadth-first search, Computer Engineering

Assignment Help:

Depth-first search is different from Breadth-first search in the following ways:

A depth search traversal method goes to the deepest level of the tree first and then works up whereas a breadth-first search looks at all possible paths at the similar depth before it goes to a deeper level. When we come to a dead end in a depth-first search, we back up as little as possible. We try another route from a new vertex-the route on top of our stack. In a breadth-first search, we require to back up as far as possible to find a route originating from the previous vertices. So the stack is not an appropriate structure for finding a previous route because it keeps track of things in the order opposite of their occurrence-the latest route is on top. To keep track of things in the order in which they happened, we use a FIFO queue.

 


Related Discussions:- Depth-first search is different from breadth-first search

What are interrupts, What are interrupts?  Interrupt: An interrupt i...

What are interrupts?  Interrupt: An interrupt is a hardware mechanism which enables an external device, classically input/output devices, to send a signal to the CPU. An int

Hard and soft real time systems, Q. Hard and Soft Real Time Systems? ...

Q. Hard and Soft Real Time Systems? Hard Real Time Systems that guarantee critical tasks are completed on time. Soft Real Time Systems that are less restrictive type o

What data structure is used by an operating system, What data structure is ...

What data structure is used by an operating system to keep track of process information? Explain A data structure termed as process control block (PCB ) is used by an operat

Write a c program to sort in ascending order of n numbers, Write a C progra...

Write a C program to sort in ascending order of n numbers. # include # include void main() { int a[25],no,i,j,m,t; clrscr(); printf("\nEnter Total number

What is the difference between the c#.net and vb.net, What is the differenc...

What is the difference between the C#.NET and VB.NET? VB.NET - It don't have the XML Documentation. - It don't have the Operator Overloading. - It dont't have the P

Illustrate what is a ion pair energy, Q. Illustrate what is a ion pair ener...

Q. Illustrate what is a ion pair energy? Answer:- Ion energy contains electric charges called protons (+) and neutrons (0) and electrons (-) charges. It's present in an at

Where the trunks lines are run between, Trunks are the lines that run betwe...

Trunks are the lines that run between (A)  Subscribers and exchange (B)  Switching system and power plant (C) Local area network (D) Switching stations Ans:

Inheritance, what is Ambiguity in single inheritance

what is Ambiguity in single inheritance

Adding momentum - sigmoid units, Adding Momentum - Sigmoid units: Howe...

Adding Momentum - Sigmoid units: However imagine a ball rolling down a hill as it does so then it gains momentum in which its speed increases and it becomes more difficult to

Advantages and disadvantage of message passage programming, Q. Advantages a...

Q. Advantages and Disadvantage of Message Passage Programming? Advantages of Message Passage Programming     Portable It is less error prone Offers excellent

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd