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 are grounded header linked lists?

Q. Using the following given inorder and preorder traversal reconstruct a binary tree Inorder sequence is D, G, B, H, E, A, F, I, C

Determine the types of JAVA Java has two parts... 1. Core language -- variables, arrays, objects o Java Virtual Machine (JVM) runs the core language o Core language is

Write an algorithm using pseudocode which takes temperatures input over a 100 day period (once per day) and output the number of days when the temperature was below 20C and the num

algorithm for multiplication of two sparse matrices using linked lists..

The  total  of  time  needed  by  an algorithm to run to its completion is termed as time complexity. The asymptotic running time of an algorithm is given in terms of functions. Th


Write a program that uses the radix sort to sort 1000 random digits. Print the data before and after the sort. Each sort bucket should be a linked list. At the end of the sort, the

Program Insertion of a node into any Circular Linked List Figure depicts a Circular linked list from which an element was deleted. ALGORITHM (Deletion of an element from a

Q. State the difference between a grounded header link list and a circular header link list?     Ans: A header linked list is a linked list which all the time c