Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ou are given a set of facts of the following form in hw 3 - handout / query / facts . pl: novel ( name

ou are given a set of facts of the following form in hw3-handout/query/facts.pl:
novel(name, year).
Here name is an atom denoting the name of the novel and year denotes the year
that the novel has been published.
For example, the fact novel(the_kingkiller_chronicles, 2007). says that
the novel named the_kingkiller_chronicles was published in the year 2007.
fan(name, novels_liked).
Here name is an atom denoting the name of the person and novels_liked denotes
the list of novels liked by that person.
For example, the fact fan(joey,[little_women]). says that the person named
joey is a fan of the novel named little_women.
author(name, novels_written).
Here name is an atom denoting the name of the author and novels_written
denotes the list of novels written by that author.
For example, the fact
author(george_rr_martin, [a_song_of_ice_and_fire_series]). says that the
author named george_rr_martin has written the novel named
a_song_of_ice_and_fire_series.
Complete the definition of the predicate year_1953_1996_novels(Book) in
hw3-handout/query/query.pl, which is true if Book is a novel that has been published
in either 1953 or 1996.
Complete the definition of the predicate period_1800_1900_novels(Book) in
hw3-handout/query/query.pl, which is is true if Book is a novel that has been pub-
lished during the period 1800 to 1900.
Complete the definition of the predicate lotr_fans(Fan) in
hw3-handout/query/query.pl, which is true if Fan is a name of a person that is a fan
of the_lord_of_the_rings.
Complete the definition of the predicate author_names(Author) in
hw3-handout/query/query.pl, which is true if Author is an author whose novels
chandler is a fan of.
Complete the definition of the predicate fans_names(Fan) in
hw3-handout/query/query.pl, which is true if Fan is a person who is a fan of the
novels authored by brandon_sanderson.
Complete the definition of the predicate mutual_novels(Book) in
hw3-handout/query/query.pl, which is true if Book is a no

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

=+5. How can you show them their personal benefits?

Answered: 1 week ago

Question

=+7. How does it enhance their lifestyle?

Answered: 1 week ago