Question: Prolog Programming Do: #2 Part 1: Simple Queries (30 points) You are given a set of facts of the following form 1. novel (name, year).

Prolog Programming

Do: #2

Prolog Programming Do: #2 Part 1: Simple Queries (30 points) You are

Part 1: Simple Queries (30 points) You are given a set of facts of the following form 1. 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 2. fan (name, novels.liked) Here name is an atom denoting the name of the character (in some imaginary world!) and novels.liked denotes the list of novels liked by that character For example, the fact fan (joey, [little.women]). says that the character named joey is a fan of the novel named little-women 3. author (name, novels written). Here name is an atom denoting the name of the author and novels written de- notes 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 Write the following separate queries: 1. Find all the names of the novels that have been published in either 1953 or 1996 2. Find all the names of the novels that have been published during the period 1800 to 1900 3. Find all the names of the characters who are fans of the.lord of.the.rings 4. Find all the names of the authors whose novels chandler is a fan of 5. Find all the names of the characters who are fans of the novels authored by brandon.sanderson 6. Find all the names of the novels that are common between either of phoebe, ross and monica

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!