Perform depth -first search, Data Structure & Algorithms

You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring marker on it. There is a tap that can be used to fill the jugs with water. How can you get exactly 2 gallons of water into the 4-gallon jug?

Use Depth -First search but after the initial {0,0} state, continue your search from the {0,3} successor instead of the {4,0} successor.

 

Posted Date: 3/15/2013 2:56:14 AM | Location : United States







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

Write discussion on Perform depth -first search
Your posts are moderated
Related Questions
Q. Write an algorithm that counts number of nodes in a linked list.                                       A n s . Algo rithm to Count No. of Nodes in Linked List C

Q. What is the smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same machine.    A n

You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring marker on it. There is a tap that can be used to fill the jugs with water. How can you get exac

What are the features of an expert system

Q. Draw  the structures of complete  undirected  graphs  on  one,  two,  three,  four  and  five vertices also prove that the number of edges in an n vertex complete graph is n(n-1

Varieties of Arrays In some languages, size of an array should be established once and for all at program design time and can't change during execution. Such arrays are known a

implement multiple stacks in an array and write different algorithms to perform operations on it

Which sorting algorithms does not have a worst case running time of  O (n 2 ) ? Merge sort

Q. Explain the result of inserting the keys given. F, S, Q, K, C, L, H, T, V, W, M, R, N, P, A, B, X, Y, D, Z, E  in an order to an empty B-tree of degree-3.

This question deals with AVL trees. You must use mutable pairs/lists to implement this data structure: (a) Define a procedure called make-avl-tree which makes an AVL tree with o