3 A 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. [18 points]
Topping Weight (ounces)
Pepperoni-4
Sausage-10
Bacon-6
Onion-5
Mushroom-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
3.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 arguments P, S, B, O, and M represent the weights (in ounces) of the
Pepperoni, Sausage, Bacon, Onion, and Mushroom toppings, respectively. [14]
3.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.
3.3 Use your pizza rule to find all possible outputs to the following question (goal). [2]
| ?- pizza(P, S, B, O, 1). Put all answers of the question in a comment in the file