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
Comparison of Gouraud and Phong Shading Phong shading requires more calculations, but produces better results for specular reflection than Gouraud shading in the form of more r

what is hashing? what are diffrent method of hashing?

A shop sells books, maps and magazines. Every item is identified by a unique 4 - digit code. All books have a code starting with a 1, all maps have a code which starts with a 2 and

Program for Linear Search. Program: Linear Search /*Program for Linear Search*/ /*Header Files*/ #include #include /*Global Variables*/ int search; int

Determine the effect of Ruby in implementation of string Ruby has a String class whose instances are mutable sequences of Unicode characters. Symbol class instances are charact

Define File organization''s and it''s types

Mid Square method with good example

Explain in detail the algorithmic implementation of multiple stacks.

The insertion procedure in a red-black tree is similar to a binary search tree i.e., the insertion proceeds in a similar manner but after insertion of nodes x into the tree T, we c

the deference between insertion,selection and bubble sort