Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Give a complete problem formulation for each of the following. Choose a formulat

ID: 3784218 • Letter: G

Question

Give a complete problem formulation for each of the following. Choose a formulation that is precise enough to be implemented. c. You have a program that outputs the message "illegal input record" when fed a certain file of input records. You know that processing of each record is independent of the other records. You want to discover what record is illegal. d. You have three jugs, measuring 12 gallons, 8 gallons, and 3 gallons, and a water faucet. You can fill the jugs up or empty them out from one to another or onto the ground_ You need to measure out exactly one gallon.

Explanation / Answer

Answer to Question c :

Initial state: considering all input records.

Goal test: considering a single record, and it gives “illegal input record” message.

Actions/Transition model/Successors: run again on the first half of the records; run again on the second half of the records. Cost function: Number of runs.

Note: This is a contingency problem; you need to see whether a run gives an error message or not to decide what to do next.

Answer to Question d :

Initial state: Each Jug have values [0, 0, 0].

Actions/Transition model/Successors: Given values [x, y, z], generate [12, y, z], [x, 8, z], [x, y, 3] (by filling); [0, y, z], [x, 0, z], [x, y, 0] (by emptying); or for any two jugs with current values x and y, pour y into x; this changes the jug with x to the minimum of x + y and the capacity of the jug, and decrements the jug with y by the amount gained by the first jug.

Cost function: Number of actions.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote