Question: Optimization in Networks question. Please help me. Breadth-First Search If we maintain the set LIST as a queue, we always select nodes from the front

Optimization in Networks question. Please help me.

Optimization in Networks question. Please helpOptimization in Networks question. Please help
Breadth-First Search If we maintain the set LIST as a queue, we always select nodes from the front of LIST and add them to the rear. In this case the search algorithm selects the marked nodes in a first-in, first-out order. If we define the distance of a node i as the minimum number of arcs in a directed path from node s to node i, this kind of search first marks nodes with distance 1, then those with distance 2, and so on. Therefore, this version of search is called a breadth-first search and the resulting search tree is a breadth-first search tree. Figure 3.5(b) specifies the breadth-first search tree for the network shown in Figure 3.5(a). In subsequent chapters we use the following prop- erty of the breadth-first search tree whose proof is left as an exercise (see Exercise 3.30). Property 3.3. In the breadth-first search tree, the tree path from the source node s to any node i is a shortest path (i.e., contains the fewest number of arcs among all paths joining these two nodes). Depth-First Search If we maintain the set LIST as a stack, we always select the nodes from the front of LIST and also add them to the front. In this case the search algorithm selects the marked node in a last-in, first-out order. This algorithm performs a deep probe, creating a path as long as possible, and backs up one node to initiate a new probe when it can mark no new node from the tip of the path. Consequently, we call this version of search a depth-first search and the resulting tree a depth-first search tree. The depth-first traversal of a network is also called its preorder traversal. Figure 3.5(c) gives the depth-first search tree for the network shown in Figure 3.5(a). In subsequent chapters we use the following property of the depth-first search tree, which can be easily proved using induction arguments (see Exercise 3.32). Property 3.4 (a) If node j is a descendant of node i and j # i, then order(j) > order(i). (b) All the descendants of any node are ordered consecutively in sequence.1. Give two qualitatively different directed networks for which a. BreadthFirst Search examines the nodes in the same order as a DepthFirst Search. Your examples should have at least ve nodes. Sketch your networks and describe why they satisfy the given criterion

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!