Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Given the Prolog facts in Example 28, what would Prolog

return when given these queries?

a) ?enrolled(kevin,ee222)

b) ?enrolled(kiko,math273)

c) ?instructor(grossman,X)

d) ?instructor(X,cs301)

e) ?teaches(X,kevin)

Short Answer

Expert verified

a) No

b) Yes

c) cs301

d) Grossman

e) Chan

Step by step solution

01

Prolog return in ?enrolled (kevin,ee222)

Instructor(chan,math273) is not a fact given to prolog and Prolog then returns ?enrolled(kevin,ee222) as no.

02

Prolog return in ?enrolled(kiko,math273)

Instructor(patel,cs301) is a fact given to prolog and Prolog then returns ?enrolled(kiko,math273) as yes.

03

Prolog return in ?instructor(Grossman,X)

Prolog will determine every class that Grossman teaches.

04

Prolog return in ?instructor(X,cs301)

Prolog will determine every teacher of class cs301.

05

Prolog return in ?teaches(X,kevin)

Prolog will determine the teaches of Kevin.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that ยฌยฌpand pare logically equivalent.

A says โ€œThe two of us are both knightsโ€ and B says A โ€œ is a knave.โ€

Let p and q be the propositions โ€œThe election is decidedโ€ and โ€œThe votes have been counted,โ€ respectively. Express each of these compound propositions as an English sentence.

a)ยฌp

b)pโˆจq

c)ยฌpโˆงq

d)qโ†’p

e)ยฌqโ†’ยฌp

f )ยฌpโ†’ยฌq

g) pโ†”q

h) ยฌqโˆจ(ยฌpโˆงq)

Write each of these statements in the form โ€œif p, then qโ€ in English. [Hint: Refer to the list of common ways to express conditional statements provided in this section.]

a) I will remember to send you the address only if you send me an e-mail message.
b) To be a citizen of this country, it is sufficient that you were born in the United States.
c) If you keep your textbook, it will be a useful reference in your future courses.
d) The Red Wings will win the Stanley Cup if their goalie plays well.
e) That you get the job implies that you had the best credentials.
f ) The beach erodes whenever there is a storm.
g) It is necessary to have a valid password to log on to the server.
h) You will reach the summit unless you begin your climb too late.

Let P(x),Q(x),R(x),andS(x) be the statements โ€œxis a duck,โ€ โ€œxis one of my poultry,โ€ โ€œxis an officer,โ€ and โ€œxis willing to waltz,โ€ respectively. Express each of these statements using quantifiers; logical connectives; andP(x),Q(x),R(x),andS(x).

(a) No ducks are willing to waltz.

(b) No officers ever decline to waltz.

(c) All my poultry are ducks.

(d) My poultry are not officers.

(e) Does (d) follow from (a), (b), and (c)? If not, is there a correct conclusion?

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free