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
Big oh notation (O) : The upper bound for the function 'f' is given by the big oh notation (O). Considering 'g' to be a function from the non-negative integers to the positive real

Dequeue (a double ended queue) is an abstract data type alike to queue, where insertion and deletion of elements are allowed at both of the ends. Like a linear queue & a circular q

A binary search tree is constructed through the repeated insertion of new nodes in a binary tree structure. Insertion has to maintain the order of the tree. The value to the lef

the voltage wave forms are applied at the inputs of an EX-OR gate. determine the output wave form

Define Minimum Spanning Tree A minimum spanning tree of a weighted linked graph is its spanning tree of the smallest weight, where the weight of a tree is explained as the sum

Write the algorithm for compound interest

Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text

A graph with n vertices will absolutely have a parallel edge or self loop if the total number of edges is greater than n-1

differences between direct and indirect recursion

Q. Define a sparse matrix. Explain different types of sparse matrices? Show how a triangular array is stored in memory. Evaluate the method to calculate address of any element ajk