Breadth-first search , Data Structure & Algorithms

1. Apply the variant Breadth-First Search algorithm as shown in Figure 2 to the attached graph. This variant is used for computing the shortest distance to each vertex from the starting vertex. (Use this for your programming exercise.)

2. For this exercise, start at Carroll County. Process the adjacent vertices in alphabetical order.

3. You can stop after you have answered both questions (you don't have to finish the algorithm).

_ What are the first five counties to be removed from the queue, and what is the distance of each?

_ What counties are on the queue after the fifth county is removed, and what are their distance numbers? (You can stop after the county is removed and before its edges have been added to the queue.)

 

Posted Date: 2/19/2013 8:14:02 AM | Location : United States







Related Discussions:- Breadth-first search , Assignment Help, Ask Question on Breadth-first search , Get Answer, Expert's Help, Breadth-first search Discussions

Write discussion on Breadth-first search
Your posts are moderated
Related Questions
Explain Floyd's algorithm It is convenient to record the lengths of shortest paths in an n by n matrix D known as the  distance matrix: the element d ij   in the i th   row an

Define tractable and intractable problems Problems that can be solved in polynomial time are known as tractable problems, problems that cannot be solved in polynomial time are

What is Algorithm A finite sequence of steps for accomplishing some computational task. An algorithm should Have steps which are simple and definite enough to be done


A binary search tree is used to locate the number 43. Which of the following probe sequences are possible and which are not? Explain. (a) 61 52 14 17 40 43 (b) 2 3 50 40 60 43 (c)

how multiple stacks can be implemented using one dimensional array

One of the main problems with the linear queue is the lack of appropriate utilization of space. Assume that the queue can store 100 elements & the complete queue is full. Thus, it

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

algorithm to search a node in linked list

A small shop sells 280 different items. Every item is identified by a 3 - digit code. All items which start with a zero (0) are cards, all items which start with a one (1) are swee