# CS代考 9/7/21 – cscodehelp代写

9/7/21
Assignment 2: First Order Logic
Please use this Word file template, follow (and retain) the instructions in gray text, and insert your work in black where indicated. Keep in mind the evaluation matrix at the end as you do the work and use it to guide what you submit. Use no more than 4 pages of 12-point text excluding figures, the gray instructions, and appendices. You can add as many as many appendices as you like. These will be read on an as-needed basis.
1. The Example Problem
The Prolog programming language is based on first order logic. We’ll use this system to run it.
There is an implementation of the so-called Einstein example here but it is unacceptable in its current form for several reasons. By supplying screenshots as below, show that you have implemented ’s reframing of the question in Appendix 1.
(1.1)
Show question and the answers to Who drinks water? and Who owns the Zebra? as screenshots.
Your response replaces this.
(1.2) Devise an additional question, as different as possible from the two above.
Your question and the answers as a screenshot.
Your response replaces this.
2. A Business Problem
This part of the exercise is more open-ended. Starting from scratch or using Warren’s reframing of the question in Appendix 1, create a suitable business problem in Prolog, and show the solution. The input to the problem can be hard coded. In developing your response, consider starting with a simple problem such as obtaining all items in a warehouse with a small set of characteristics such as “readily accessible” and “high profit,” then make it increasingly sophisticated, version by version. Try to be guided by envisioning increasingly useful functionality.
(2.1) 1-or-2-sentence description of the business problem:
Your response replaces this.
(2.2) Prolog code:
Your response replaces this.
(2.3) Screenshot of output:
Your response replaces this.

Evaluation

Appendix 1
The following preconditions apply:
1. Each of the five houses is painted a different color.
2. The inhabitants of each house have different name own different pets, drink different beverages, and play different games.
1. There are five houses.
2. Olivia lives in the red house.
3. Mateo owns the dog.
4. Coffee is drunk in the green house.
5. Anna drinks tea.
6. From the perspective of the person in the ivory house, the green house is immediately to the left.
7. The tennis player owns snails.
8. Basketball is played at the yellow house.
9. Milk is drunk in the middle house.
10. Lucas lives in the first house.
11. The person who plays volleyball lives in the house next to the man with the fox.
12. Basketball is played in the house next to the house where the horse is kept.
13. The soccer player drinks orange juice.
14. Sara plays rugby.
15. Lucas lives next to the blue house.

Sheet1
Criterion  D  C  B  A  Letter Grade %
Technical correctness  Little technical justification. Correct technically. Satisfactory technical explanation. Correct technically. Good. Did what was required. Correct technically. Went significantly beyond what’s required. 0.0
Clarity in presen-tation  Unclear  Somewhat clear  Clear  Everything competely clear  0.0
Understan-ding  Minor understanding evidenced  Satisfactory understanding evidenced  Evidence of good understanding throughout. Good business problem. Evidence throughout of thorough understanding. Excellent business problem. 0.0

The resulting grade is the average of these, using A+=97, A=95, A-=90, B+=87, B=85, B-=80 etc.
To obtain an A grade for the course, your weighted average should be >93. A-:>=90. B+:>=87. B:>83. B-:>=80 etc.

Criterion D C B A
Letter
%
Technical
correctness
Little technical
justification.
Correct technically.
Satisfactory technical
explanation.
Correct technically.
Good. Did what was
required.
Correct technically. Went
significantly beyond
what’s required.
0.0
Clarity in
presen-
tation
Unclear Somewhat clear Clear
Everything competely
clear
0.0
Understan-
ding
Minor understanding
evidenced
Satisfactory
understanding
evidenced
Evidence of good
understanding
throughout. Good