1 TOSCOW NH 2 3 4 5 6 7 8 9 LO 11 12 L3 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 83 34 85 36 37 38 39 Below we have some logical facts and some potential queries that could be run with those facts. Your goal is to fill in what these queries do. Ignore any warnings for this file. As a hint, you can run this file directly by: 8 swipl -s 5_exercises.pl ...and then issuing the queries at the prompt. Consider the following Prolog logicbase: 8 a (al, 1). a (A, 2). a (a3, N). b (1,bl). b (2,B). b (N, b3). C (X,Y) :- a (X,N), b (N, Y). d (X,Y) :- a (X,N), b (Y, N). d (X,Y) :- a (N, X), b (N, Y). Write out whether or not the following queries are true or false, replacing ??? where appropriate. If a query is true and involves variable instantiations, then write out all possible variable instantiations which make the query 8 true. Some have already been done for you, to give an example of the expected format. If you wish, you may simply copy and paste the output of SWI-PL here directly; we will be grading this by hand, so the output format isn't important.
1 TOSCOW NH 2 3 4 5 6 7 8 9 LO 11 12 L3 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 83 34 85 36 37 38 39 Below we have some logical facts and some potential queries that could be run with those facts. Your goal is to fill in what these queries do. Ignore any warnings for this file. As a hint, you can run this file directly by: 8 swipl -s 5_exercises.pl ...and then issuing the queries at the prompt. Consider the following Prolog logicbase: 8 a (al, 1). a (A, 2). a (a3, N). b (1,bl). b (2,B). b (N, b3). C (X,Y) :- a (X,N), b (N, Y). d (X,Y) :- a (X,N), b (Y, N). d (X,Y) :- a (N, X), b (N, Y). Write out whether or not the following queries are true or false, replacing ??? where appropriate. If a query is true and involves variable instantiations, then write out all possible variable instantiations which make the query 8 true. Some have already been done for you, to give an example of the expected format. If you wish, you may simply copy and paste the output of SWI-PL here directly; we will be grading this by hand, so the output format isn't important.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Show how to do this. Please answer correctly and do not copy and paste.
This uses Prolog so write in it as well.
The queries are in the 2nd picture that you have to run in Prolog,
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 3 steps
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
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education