Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Arizona Best Pizzaria made combo pizza that contains exactly 45 ounces of toppings. The base has a fixed weight and is not considered in

2. Arizona Best Pizzaria made combo pizza that contains exactly 45 ounces of toppings. The base has a fixed weight and is not considered in the calculation. 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 45 ounces.

Toppings Weight

Peperoni 5

Meatball 10

Basil 7

Olives 3

Chicken 8

For example, a pizza can contain 1 topping of pepperoni, 2 toppings of meatball, 2 toppings of basil, and 2 toppings of olives : 1*5+ 2*10 + 2*7 + 2*3= 45 (ounces)

A pizza can not contain 6 toppings of chicken : 6 * 8 = 48> 45

A pizza can not contain only3 toppings of meatball : 3*10= 30 < 45

2.1. Define a rule pizza(P, M, B, O, C) to find out how many of each topping can be contained on a pizza, where P, M, B, O, and C are the numbers of the pepperoni, meatball, basil, olives, and chicken toppings, respectively.

2.2. Write a rule called q2:-condition, to ask the following question (goal), so that the grader to type | ?-q2.

To test the question. | ?-pizza(1, 2, 2, 2, 2). Put all answers of the question in a comment in the file.

2.3. Write a rule called q3 :-condition, to ask the following question (goal), so that the grader to type | ?-q3. To test the question.

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

2.4. Write a rule called q4:-condition, to ask the following question (goal), sothat the grader to type | ?-q4. To test the question.[1]

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago