Consider the following prolog database: married (logan, marcia), parent (logan, connor), parent (logan, kendall). parent (logan, roman). parent (logan, siobhan). dating(connor, willa). married(kendall, rava). dating( roman, grace). married(tom, siobhan) parent (caroline, kendall), parent (caroline, roman). parent (caroline, siobhan). Write a prolog rule to identify siblings. The rule sibling/2 receives two arguments and verifies if they are siblings or not. Two distinct persons are siblings if they have a common parent. A person is not a sibling of self. Example: ?- sibling(kendall, roman) true ?- sibling(kendall, tom) false ?- sibling(kendall, kendall) false

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter5: Database Systems And Applications
Section: Chapter Questions
Problem 4PSE: Using a graphics program, develop an entity-relationship diagram for a database application for an...
icon
Related questions
Question

Consider the following prolog database:
married (logan, marcia),
parent (logan, connor),
parent (logan, kendall).
parent (logan, roman).
parent (logan, siobhan).
dating(connor, willa).
married(kendall, rava).
dating( roman, grace).
married(tom, siobhan)
parent (caroline, kendall),
parent (caroline, roman).
parent (caroline, siobhan).

 

Write a prolog rule to identify siblings. The rule sibling/2 receives two arguments
and verifies if they are siblings or not.
Two distinct persons are siblings if they have a common parent. A person is not a sibling of self.
Example:
?- sibling(kendall, roman)
true
?- sibling(kendall, tom)
false
?- sibling(kendall, kendall)
false

Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning