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] 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=401∗4+2∗10+1∗6+2∗5=40(ounces) A pizza cannot contain 7 toppings of bacon:7 ∗6=42>40A pizza cannot contain only 3 toppings of sausage :3
*
10=30<40Define 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] I ?- 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] I ?- pizza(
P,S,B,O,1)
. Put all answers of the question in a comment in the file.