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
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...
Related questions
Question
Consider the following prolog
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 5 images
Knowledge Booster
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.Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning