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
What is the time complexity of Merge sort and Heap sort algorithms? Time complexity of merge sort is O(N log2 N) Time complexity of heap sort is   O(nlog2n)


The Euclidean algorithm is an algorithm to decide the greatest common divisor of two positive integers. The greatest common divisor of N and M, in short GCD(M,N), is the largest in

The best algorithm to solve a given problem is one that requires less space in memory and takes less time to complete its execution. But in practice it is not always possible to

Define container in terms of  object-oriented terms A Container is a broad category whose instances are all more specific things; there is never anything which is just a Contai

Determine YIQ Colour Model Whereas an RGB monitor requires separate signals for the red, green, and blue components of an image, a television monitor uses a single composite si

Q. Write down the algorithm for binary search. Which are the conditions under which sequential search of a list is preferred over the binary search?

what is frequency count with examble

Q. Explain the technique to calculate the address of an element in an array. A  25 × 4  matrix array DATA is stored in memory in 'row-major order'. If base  address is 200 and

There are three kinds of tree traversals, namely, Postorder , Preorder and Inorder. Preorder traversal: Each of nodes is visited before its children are visited; first the roo