prolog..... -- 2

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 from the file ‘FamilyTree’ posted in this module (Module 4).

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 snippets of the results of all queries.

[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.

[13 points] Write a Prolog program that returns a list containing a union of the elements of two given sets.

Evner: Prolog

Se mere: prolog or operator, prolog print list, male female scene script, scripts male female, male female things french, maya character male female, free adult male female web cams, male female french, free male female scripts, script male female, male female france, days male female french, french male female translation, time warner comercial kyle male female, draw anime male female, french male female words, free male female script, samples male female voices

Om arbejdsgiveren:
( 9 bedømmelser ) St Louis, United States

Projekt ID: #27895883

1 freelancer byder i gennemsnit $50 på dette job

(116 bedømmelser)