ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 Jun 2017 My Price 9.00

Prolog logic

It is about prolog. Can someone help me with part b and c of the first question or give me some hint? I don't know how to think in prolog, especially about the database constraint.

b) Express the above bullet list as constraints, e.g., as below. You will have to fill-in the dots with the
corresponding Prolog logic.
constraintRoofer(player(N,O,S)) :-

 

Université d’OttawaFaculté de génieÉcole de scienced’informatiqueet de génie électriqueUniversity of OttawaFaculty of EngineeringSchool of ElectricalEngineeringand Computer Science___Assignment 2CSI2120 Programming ParadigmsWinter 2016Due on February 23rd, 2016 before 11:00 pm in Virtual Campus[5 marks in total]Question 1.[3 marks]Five golfers, named Jules, Gilles, Jean, Joe and Ghislain often play a round of golf together (use smallcaps for the players’ names in your program). Their occupations are, not necessarily in this order,mason, plasterer, carpenter, tinsmith and roofer.They have played a round of golf but at the end their score cards don’t match. Their results were evennumbers between 64 and 84.•Ghislain played par with 72, beating the roofer by 2 strokes.•Gilles had a bad day, and has ended with 10 strokes above par, or 12 strokes more than themason.•The tinsmith has beaten Joe by 4 strokes and has won the round.•Jules has beaten the carpenter by 8 strokes, but did not win overall.Find the occupation and the score of each player.a)Design a predicate to enumerate all possible combinations for players where N is the name of theplayer, O is the occupation and S is the score.?-player(N,O,S).N = jules,O = carpenter,S = 64;N = jules,O = carpenter,S = 66and so on.b)Express the above bullet list as constraints, e.g., as below. You will have to fill-in the dots with thecorresponding Prolog logic.constraintRoofer(player(N,O,S)) :- …constraintMason( …

Answers

(11)
Status NEW Posted 06 Jun 2017 08:06 AM My Price 9.00

-----------

Not Rated(0)