[SOLVED] Prolog: Prolog Assignment

$25

File Name: Prolog:_Prolog_Assignment.zip
File Size: 235.5 KB

5/5 - (1 vote)

Prolog Assignment

Create a program that solves the logic puzzle below. Your program MUST actually SOLVE the puzzle, not just print the results. The program must find one and only one solution to the logic puzzle and that one solution must meet all of the constraints listed below.

  • Fuel Stop charges somewhat less per gallon than Vexon.
  • The business in Irvine charges somewhat more per gallon than the business in Santa Rosa.
  • Gas-N-Go doesnt charge $1.23 per gallon.
  • The gas station in Lewis charges 8 cents less per gallon than the store in Zamora.
  • Fuel Stop charges 8 cents less per gallon than the store in Santa Rosa.
  • The business in Lewis is either Vexon or Energo.
  • Fuel Stop charges 4 cents less per gallon than Ballantines.

Hints:

  1. Prolog doesnt deal well with floating point. What other form could you use?
  2. Remember that variables are capitalized and atoms are all lower case.
  3. Look at the slides (especially the logic puzzle) carefully you can reuse code from the slides.

Get it here: http://www.swi-prolog.org/

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Prolog: Prolog Assignment
$25