Perform breadth -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 Breadth -First search i.e. finish expanding each row before going to the next one. It means expanding the {4,0} followed by the {0,3} states before going to their successors on the next row.

 

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







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

Write discussion on Perform breadth -first search
Your posts are moderated
Related Questions
A queue is a, FIFO (First In First Out) list.

The disadvantages or limitations of the last in first out costing method are: The election of last in first out for income tax purposes is binding for all subsequent yea

The process of accessing data stored in a serial access memory is same to manipulating data on a By using stack  method.

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

Q. Write down an algorithm to insert a node in the beginning of the linked list.                         Ans: /* structure containing a link part and link part

Define min-heap A min-heap is a complete binary tree in which each element is less than or equal to its children. All the principal properties of heaps remain valid for min-hea

The complexity of searching an element from a set of n elements using Binary search algorithm is   O(log n)

I am looking for some help with a data mining class with questions that are about neural networks and decision trees. Can you help? I can send document with questions.

What is Solid modeling Solid modeling is the most powerful of the 3-D modeling technique. It provides the user with complete information about the model. Defining an object wit

Explain in detail the algorithmic implementation of multiple stacks.