Water-jug puzzle

Assignment Help Basic Computer Science
Reference no: EM13663974

Water-jug puzzle
In the water-jug puzzle, we are given a 3-liter jug, named Three, and a 4-liter jug, named Four. Initially, Three and
Four are empty. Either jug can be filled with water from a tap, T, and we can discard water from either jug down a
drain, D. Water may be poured from one jug into the other. There is no additional measuring device. We want to find
a set of actions that will leave precisely two liters of water in Four.
1. Set up a state-space search formulation of the water-jug puzzle:
(a) Give the initial iconic state description as a data structure.
(b) Give a goal condition on states as some test on data structure.
(c) Name the actions on states and give precise descriptions of what each action does to a state description.
2. Draw a graph of all of the distinct state-space nodes that are within three moves of the start node, label each
node by its state description, and show at least one path to each node in the graph-labeling each arc by the
name of the appropriate action. In addition to these nodes, show also all of the nodes and arcs (properly labeled)
on a path to the solution.

Reference no: EM13663974

Questions Cloud

Motorcycle with a mass problem : A motorcycle with a mass of 200 kg can accelerate from 0 to 30m/s in 3 seconds. Assuming all of the force generated with the engine goes into acceleration of the motorcycle , how much force is the engine producing? Show your work.
Explain how the web design department : Explain how the web design department will adhere to a code of ethics available for stakeholders.
Wide is illuminated with light of wavelength : A slit 0.9 mm wide is illuminated with light of wavelength 599 nm. We see a diffraction pattern on a screen2.50 m away. What is the distance among the first two diffraction minima on the same side of the central diffraction maximum? (mm)
Develop a secure message and file exchange application : ABC Company is to develop a secure message and file exchange application
Water-jug puzzle : Water-jug puzzle
Compute the value of zeff for this state : The energy of the 2s state of some element is -5.691eV. Compute the value of Zeff for this state. The energy of the 4s state of some element is-4.339 eV. Compute the value of Zeff for this state.
The context of a database system : 1. Discuss what a user view represents in the context of a database system.
Confirm graphically that the solution : Confirm graphically that the solution from part a maximizes the farmer's profit from his land.
Decide corresponding radius r of outermost bohr orbit : A sodium atom (Z = 11) contains 11 protons in its nucleus. Strictly speaking, the Bohr model does not apply, as the neutral atom contains 11 electrons instead of a single electron. but, we can apply the model to the outermost electron as an approxima..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Minimum-spanning-tree problem for lp formulation

The minimum-spanning-tree problem is to find an acyclic subset T + E that connects all of the vertices and whose total weight c(T ) = ce is minimized. Write down the dual of your LP formulation.

  Network lan and the wan links

Use VLSM to configure the given network LAN and the WAN links. VLSM must be used in the MOST efficient way to subnet the LAN and the WAN links. All the links between routers are WAN links.

  Design a program that prompts the user to enter a string

Using Python version 2.7, design a program that prompts the user to enter a string.The program should then display the number of vowels and the number of consonants in the string. I am absolutely lost and don't even know how to start, any assistan..

  Cultural factors contribute to success of nanotechnology

What is the Nanotechnology, and identify the cultural factors that may contribute to the success or failure of this technology.

  Write a function called parkingcharge

Write a function called parkingCharge that, given the type of vehilce (c = car, b = bus, t = truck) and the hours a vehicle spent in the parking lot, retruns the parking charge based on the rates shown below.

  Find the transmission rate in bits per second

Suppose all headers (including RTP, UDP and IP) have a total length of h and an IP datagram is emitted every 40 msecs.

  Discussion on computer future

After reading about programming languages and their capabilities, consider all of the devices in your home that have a computer. Where will computer programming and the use of computers go in the future?

  Searches for items that are not in the list

How many searches for items that are not in the list would you have to do to make sorting and using binary search a better strategy than using linear search?

  Function prototypes lack parameters

These function prototypes lack parameters; add whatever parameters you feel are necessary so that the program works without global variables. The program's output should reflect the bus's actions by reporting each change in state, along with the n..

  Design a database application to keep track of movies

Design a database application to keep track of movies, actors, and the roles played by actors in movies. You may make up all the data.

  You may have observed such a situation before a highly

you may have observed such a situation before a highly publicized and outrageous crime has taken place and the suspect

  Provide permission to get financial amounts

System to have employees register and provide permission to get financial amounts from dental insurance and retirement companies.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd