Let us go back to the network we have been studying in the previous few homework assignments. Only, this time, it is a social network involving people who are connected by a friend relation- ship, represented below: as Prolog code on the left, and a graphical representation on the right. Note that this friend relationship is symmetric, since, on the left, for each pair X, Y of people, if friend(X,Y), then friend(Y,X), and in the graphical representation on the right, the “edges” do not have direction. friend(abi, bea). friend(abi, cory). friend(bea, cory). friend(bea, dina). friend(cory, dina). friend(dina, eva). friend(dina, fei). friend(eva, fei). friend(fei, gil). friend(bea, abi). friend(cory, abi). friend(cory, bea). friend(dina, bea). friend(dina, cory). friend(eva, dina). friend(fei, dina). friend(fei, eva). friend(gil, fei). Write the Prolog predicate friend of a friend(X,Y) which is true when X has a friend who is a friend of Y. Note: that this does not preclude X from also being a friend of Y, but it does preclude X from being a friend of a friend of itself, i.e., friend of a friend(X,X) should be false.
Let us go back to the network we have been studying in the previous few homework assignments. Only, this time, it is a social network involving people who are connected by a friend relation- ship, represented below: as Prolog code on the left, and a graphical representation on the right. Note that this friend relationship is symmetric, since, on the left, for each pair X, Y of people, if friend(X,Y), then friend(Y,X), and in the graphical representation on the right, the “edges” do not have direction. friend(abi, bea). friend(abi, cory). friend(bea, cory). friend(bea, dina). friend(cory, dina). friend(dina, eva). friend(dina, fei). friend(eva, fei). friend(fei, gil). friend(bea, abi). friend(cory, abi). friend(cory, bea). friend(dina, bea). friend(dina, cory). friend(eva, dina). friend(fei, dina). friend(fei, eva). friend(gil, fei). Write the Prolog predicate friend of a friend(X,Y) which is true when X has a friend who is a friend of Y. Note: that this does not preclude X from also being a friend of Y, but it does preclude X from being a friend of a friend of itself, i.e., friend of a friend(X,X) should be false.
New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter3: Designing A Page Layout: Creating A Website For A Chocolatier
Section3.2: Visual Overview: Page Layout Grids
Problem 6QC
Related questions
Question
Let us go back to the network we have been studying in the previous few homework assignments. Only, this time, it is a social network involving people who are connected by a friend relation- ship, represented below: as Prolog code on the left, and a graphical representation on the right. Note that this friend relationship is symmetric, since, on the left, for each pair X, Y of people, if friend(X,Y), then friend(Y,X), and in the graphical representation on the right, the “edges” do not have direction.
friend(abi, bea).
friend(abi, cory).
friend(bea, cory).
friend(bea, dina).
friend(cory, dina).
friend(dina, eva).
friend(dina, fei).
friend(eva, fei).
friend(fei, gil).
friend(bea, abi).
friend(cory, abi).
friend(cory, bea).
friend(dina, bea).
friend(dina, cory).
friend(eva, dina).
friend(fei, dina).
friend(fei, eva).
friend(gil, fei).
Write the Prolog predicate friend of a friend(X,Y) which is true when X has a friend who is a friend of Y. Note: that this does not preclude X from also being a friend of Y, but
it does preclude X from being a friend of a friend of itself, i.e., friend of a friend(X,X) should be false.
![abi
cory
bea
dina
eva
gil
fei](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdd1340e1-026e-4b10-9e6b-a53bd1323fd7%2F2e87b643-a302-4abf-965b-a335ec8383b6%2Fne1fpaq_processed.jpeg&w=3840&q=75)
Transcribed Image Text:abi
cory
bea
dina
eva
gil
fei
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
![Principles of Information Systems (MindTap Course…](https://www.bartleby.com/isbn_cover_images/9781305971776/9781305971776_smallCoverImage.gif)
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
![A+ Guide To It Technical Support](https://www.bartleby.com/isbn_cover_images/9780357108291/9780357108291_smallCoverImage.jpg)
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
![Principles of Information Systems (MindTap Course…](https://www.bartleby.com/isbn_cover_images/9781305971776/9781305971776_smallCoverImage.gif)
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
![A+ Guide To It Technical Support](https://www.bartleby.com/isbn_cover_images/9780357108291/9780357108291_smallCoverImage.jpg)
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
![Fundamentals of Information Systems](https://www.bartleby.com/isbn_cover_images/9781305082168/9781305082168_smallCoverImage.gif)
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:
9780357392607
Author:
FREUND
Publisher:
Cengage