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

  Write one java statement that creates an array of integers

Write one Java statement that creates an array of integers containing the multiples of 10 between 10 and 100, including 10 and 100.

  Javascript alert box with a blue background

Create a javascript alert box with a blue background and a bold font. Please do use any buttons for this alert. Write a function and an alert should pop up after that function is executed.

  Write a program to compute a customer bill

Write a program to compute a customer's bill. The program should request the quantity of each item ordered in a void function, calculate the total cost with a value returning function.

  Provide injective function from to and explain why injective

Provide an injective function from ? to ? and explain why it's injective

  Write a program to fetch the state and marital status

Write a program to fetch the state and marital status of five users? If user is from CA, NV, AR, V count them towards the western region

  How you can recover information from this dual boot pc

A computer has Windows XP installed on one partition and Linux on another. Discuss how you can recover information from this dual boot PC. Would your response be differnet if one partition was Windows 7 and the other Linux?

  Explaining role-computer forensic investigator for law firm

You are the computer forensic investigator for a law firm. The firm acquired a new client, a young woman who was fired from her job for inappropriate files discovered on her computer

  Propose three to five additional activities

Propose three to five additional activities you think should be added to a Gantt chart to help you estimate resources and durations. Write a one-page paper describing these new activities.

  Write maximum and minimum rotational latency of disk

Write down the maximum and minimum rotational latency of this disk? Determine the average rotational latency of this disk?

  How a company developed a template for a web page

Marion has argued that with modern information technologies, collocation of team members is no longer important. How would you respond to this claim?

  What is the purpose of the finally block

How does a method declare that it can throw an exception? How does it actually throw an exception? Use Java code to illustrate your answer.

  How you would convince a coworker to better manage

Describe how you would convince a coworker to better manage a personal copmuter by performing regular backups and keep the system patches current?

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