## [answered] 2 A premium pizza is comprised of exactly 40 ounces of topp

2A premium pizza is comprised of exactly 40 ounces of toppings. The available toppings are listed below with their corresponding weight (in ounces). There can be multiple entries of each topping, as long as the total weight is equal to 40 ounces. [20 points]

 Topping Weight (ounces) Pepperoni Sausage Bacon Onion Mushroom 4 10 6 5 7

For example, a pizza can contain 1 topping of pepperoni, 2 toppings of sausage, 1 topping of bacon, and 2 toppings of onion : 1*4 + 2*10 + 1*6 + 2*5 = 40 (ounces)

A pizza cannot contain 7 toppings of bacon : 7 * 6 = 42 > 40

A pizza cannot contain only 3 toppings of sausage : 3*10 = 30 < 40

2.1 Define a rule pizza(P, S, B, O, M) to find out how many of each topping can be contained on a pizza, where P, S, B, O, and M are the weight (in ounces) of the Pepperoni, Sausage, Bacon, Onion, and Mushroom toppings respectively.[15]

2.2 Use your pizza rule to find all possible outputs to the following question (goal).[2]

| ?- pizza(1, S, 1, O, M). Put all answers of the question in a comment in the file.

2.3Use your pizza rule to find all possible outputs to the following question (goal).[3]

| ?- pizza(P, S, B, O, 1). Put all answers of the question in a comment in the file.

Solution details:
STATUS
QUALITY
Approved

This question was answered on: Sep 18, 2020

Solution~0001001948.zip (25.37 KB)

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

STATUS

QUALITY

Approved

Sep 18, 2020

EXPERT

Tutor