Question
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)
Step 1
Since the fact that Kevin is enrolled in ee222 is not given in Example 28, Prolog would return "No". Show more…
Show all steps
Your feedback will help us improve your experience
Amy Jiang and 57 other Calculus 2 / BC educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
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, $\mathrm{X}$ ) d) ?instructor ( $\mathrm{X}, \mathrm{Cs} 301)$ e) ?teaches ( $\mathrm{X}$, kevin)
The Foundations: Logic and Proofs
Predicates and Quantifiers
Given the Prolog facts in Example $28,$ what would Prolog return given these queries? a) ?instructor(chan,math273) b) ?instructor(patel,cs301) c) ?enrolled(X,cs301) d) ?enrolled(kiko,Y) e) ?teaches(grossman,Y)
Given the Prolog facts in Example 28 , what would Prolog return given these queries? a) ?instructor(chan,math273) b) ?instructor (patel, cs301) c) ?enrolled $(\mathrm{X}, \mathrm{Cs} 301)$ d) ?enrolled ( kiko, Y) e) ?teaches (grossman, Y)
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD