Project #3 Solution

$35.00 $29.00

Note that submission date has been changed! This is a programming project. Write your programs using logical language Prolog. Use SWISH (SWI Prolog for Sharing). Run each of your programs by typing a query and clicking on ‘Run’ button. [25 points] Consider a hypothetical family tree shown below: Create a simple database containing facts and…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:
Tags:

Description

5/5 – (2 votes)

Note that submission date has been changed!

This is a programming project. Write your programs using logical language Prolog. Use SWISH (SWI Prolog for Sharing). Run each of your programs by typing a query and clicking on ‘Run’ button.

  1. [25 points] Consider a hypothetical family tree shown below:

Create a simple database containing facts and inference rules. Include facts about family members, such as male, female, parent. Then add rules such as sister, brother, sibling, father, mother, grandparent. Run queries that will answer the following questions about family members: (a) Is Pete Mark’s parent? (b) Is Anne Jenny’s parent? (c) Who is Todd’s father? (d) Who is Tom’s sibling? (e) Who is Lilly’s brother? (f) Who is Henry’s grandparent? (g) Who is Alice’s sister? (h) Is Frank Kate’s brother? (i) Who is Matt’s mother? (j) Is Mark Anne’s brother?

Submission file should include your database and screenshots of the results of all queries.

  1. [17 points] Write a Prolog program that finds the maximum of a list of numbers. Submission file should include a screenshot with tracing a program execution when a list only has 2 members and execution without tracing when a list has 8 elements.
  1. [13 points] Write a Prolog program that returns a list containing a union of the elements of two given sets.
Project #3 Solution
$35.00 $29.00