Question

In: Computer Science

Searching Question: We have three unmarked jugs, which hold exactly 19, 13 and 7 ounces of...

Searching Question:

We have three unmarked jugs, which hold exactly 19, 13 and 7 ounces of water respectively. The 19-ounce jug is empty, but the 13 and 7 ounces jugs are full (thus, there is a total of 20 ounces of water). You need to get exactly two 10 ounces of water (in the first two jugs) by using only the three jugs mentioned above. The cost of each action is the ounce of water poured/moved.

A. How do you represent states? (5 points)

B. What are the initial state(s) and the goal state(s) in your representation? (5 points)

Solutions

Expert Solution

A.

The following would be the procedure in chart form:

                          19Ounces    13Ounces     7Ounces

                  0                 13                  7 //Initial State

Step 1                              7                13                   0

Step 2                            19              1                   0

Step 3                            12              1           7

Step4         12    8                   0

Step 5          5              8                 7

Step 6            5           13                   2

Step 7         18              0                2

Step 8             18        2            0

Step 9                       11                2                 7

Step 10             11                9           0

Step 11           4          9            7

Step 12               4                13                3

Step 13              17             0                3

Step 14          17            3           0    

Step 15        10                    3               7 //goal state

B.

here initial state is the state from where we started which is 0,13,7 because The 19-ounce jug is empty, but the 13 and 7 ounces jugs are full (thus, there is a total of 20 ounces of water) as mentioned in question

and goal state is the final stateofthese jugs which is 10,3,7 , here the goal is to You need to get exactly two 10 ounces of water (in the first two jugs) by using only the three jugs mentioned above.

A.


Related Solutions

It is claimed by a prominent insurance company that exactly 13% of drivers do not have...
It is claimed by a prominent insurance company that exactly 13% of drivers do not have insurance. The insurance company collects a sample of 600 drivers and finds that 120 of them do not have insurance. Test the claim using a level of significance equal to 0.01. State the claim: LaTeX: H_0H 0: p ________13% claim LaTeX: H_1H 1:pLaTeX: \ne≠13% Determine the direction of the tails: Left, Right, or Two: Find the critical value: +/- Compute Test Point (round to...
Consider the following sum (which is in expanded form): 1−4 + 7−10 + 13−16 + 19−22...
Consider the following sum (which is in expanded form): 1−4 + 7−10 + 13−16 + 19−22 +···±(3n−2). Note that this is slightly different from the previous sum in that every other term is negative. (a) Write it as a summation (∑). (b) Evaluate the sum for every integer n from 1 to 9. (Be careful - if you get this wrong, you will likely get the rest of this question wrong!) (c) Write a closed-form formula for the value of...
13-28 (Objectives 13-4, 13-7) Following are evidence decisions for the three audits described in Figure 13-3...
13-28 (Objectives 13-4, 13-7) Following are evidence decisions for the three audits described in Figure 13-3 : Audit A Ineffective client internal controls Audit B Very effective client internal controls Audit C Somewhat effective client internal controls Evidence Decisions The auditor decided it was possible to assess control risk below the maximum. The auditor identified effective controls and also identified some deficiencies in controls. The auditor performed extensive positive confirmations at the balance sheet date. The auditor performed tests of...
Question 13 Assume that a company currently depreciates its fixed assets over 7 years. Which of...
Question 13 Assume that a company currently depreciates its fixed assets over 7 years. Which of the following would occur if a tax law change forced the company to depreciate its fixed assets over 10 years instead? a. The company's tax payment would increase. b. The company's cash position would increase. c. The company's net income would increase. d. Answers a and c are correct. e. Answers b and c are correct. 5 points Question 14 Harmeling Enterprises experience a...
QUESTION 4 (20 marks) 4.1 ABC shares have had returns of 8 percent, -13 percent, -7...
QUESTION 4 4.1 ABC shares have had returns of 8 percent, -13 percent, -7 percent and 29 percent for four of the last 5 years. 4.1.1 If the average return of the share over this period is 11 percent, what was the share’s return for the missing year? (3) 4.1.2 What is the standard deviation of the share’s return? (6) 4.2 The Extreme Reaches Corp. last paid a R1.50 per share annual dividend. The company is planning on paying R3.00,...
7. Chapter 13, Question 2: Use the attached data file “Chapter 13 Data Set 1” to...
7. Chapter 13, Question 2: Use the attached data file “Chapter 13 Data Set 1” to answer this question in the book. Do you agree with the author’s conclusion about whether practice time makes a difference? <15 Hours Practice 15-25 Hours Practice More than 25 Hours Practice 58.7 64.4 68 55.3 55.8 65.9 61.8 58.7 54.7 49.5 54.7 53.6 64.5 52.7 58.7 61 67.8 58.7 65.7 61.6 65.7 51.4 58.7 66.5 53.6 54.6 56.7 59 51.5 55.4 54.7 51.5 61.4...
The following is an Excel Question: We have three factories (A, B, C) and five distributors...
The following is an Excel Question: We have three factories (A, B, C) and five distributors (P, Q, R, S, T) of our products. The products are shipped by truck from factory to distributor. At most 180 units of our products fit a truck. The shipping cost is $1 per unit to load the truck and $1 per unit to unload the truck plus the mileage cost. The mileage cost is based on the mileage the truck must travel between...
The following is an Excel question: We have three factories (A, B, C) and five distributors...
The following is an Excel question: We have three factories (A, B, C) and five distributors (P, Q, R, S, T) of our products. The products are shipped by truck from factory to distributor. At most 180 units of our products fit a truck. The shipping cost is $1 per unit to load the truck and $1 per unit to unload the truck plus the mileage cost. The mileage cost is based on the mileage the truck must travel between...
Question 13 We define the letters 'a', 'e', 'i', 'o' and 'u' as vowels. We do...
Question 13 We define the letters 'a', 'e', 'i', 'o' and 'u' as vowels. We do not consider any other letter as a vowel. Write a function named initialVowels() that returns a list of words in a body of text that begin with a vowel. Include both capitalized and lower case instances of the vowels. A word should appear in the return list at most once, no matter how many times is occurs in the input string. Input: a string...
QUESTION 13 ​ In order to determine the velocity of money, we need to know: a....
QUESTION 13 ​ In order to determine the velocity of money, we need to know: a. ​ the interest rate and nominal GDP. b. ​ the money supply and the price level. c. ​ the money supply and nominal GDP. d. ​ nominal GDP and real GDP. QUESTION 14 ​ The money supply and money demand curves are _____ and ______ respectively. a. ​ Vertical; downward sloping. b. ​ Upward sloping; vertical c. ​ Upward sloping, downward sloping d. ​...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT