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

Explain list directive in assembly language, Q. Explain list directive in a...

Q. Explain list directive in assembly language? A list directive causes assembler to generate an annotated listing on printer, video screen, disk drive or any combination of th

Methods for organising the associative memory, There are two methods for or...

There are two methods for organising the associative memory based on bit slices: Bit parallel organisation: In this organisation every bit slices which are not masked off,

Define about hyper-threading technology, Q. Define about Hyper-threading te...

Q. Define about Hyper-threading technology? Hyper-threading technology enables a single microprocessor to behave as two separate threaded processors to operating system and app

Differentiate between static and dynamic step loops, Differentiate between ...

Differentiate between static and dynamic step loops. Step loops fall into two classes: Static and Dynamic.  Static step loops have a fixed size that cannot be changed at runti

Set screen and leave screen, What happens if only one of the commands SET S...

What happens if only one of the commands SET SCREEN and LEAVE SCREEN is used without using the other? If we use SET SCREEN without LEAVE SCREEN, the program ends processing for

Analysis of website, In this part you are required to review and critique a...

In this part you are required to review and critique a website of a café or a restaurant of your choice. Your report should be a minimum 500 words with a maximum of 1000 words. You

How to load dos from hard disk, Q. How to Load DOS from Hard Disk? To L...

Q. How to Load DOS from Hard Disk? To Load DOS from the Hard Disk of your computer, follow these steps: 1. Turn on the power ON/OFF switch of the CPU unit of your PC the pow

Explain policies for process scheduling, Explain any three policies for pro...

Explain any three policies for process scheduling that uses resource consumption information. All three policies for process scheduling are explained below in brief: 1. Fi

Weighted-average under perpetual inventory procedure, Q. Weighted-average u...

Q. Weighted-average under perpetual inventory procedure? Weighted-average under perpetual inventory procedure in perpetual inventory procedure firms calculate a new weighted-av

Assembly language programming, write an assembly language program for fibon...

write an assembly language program for fibonacci series?

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