Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
CSI2120 Programming Paradigms

Task:
Problem Description

The City of Ottawa owns and maintains many wading pools which need to be regularly maintained. The repair crew needs to find a route to visit the pools. You will have to help the crew to find a reasonable route to visit all pools. A route is reasonable if all pools are visited and the route is not too long. An optimal route is not required.

This is a problem where the nodes are the pools and the edges have weights corresponding to the distance between pools (We will just use the Euclidean distance and do not consider the road network). 

Question 1. Logic solution (Prolog) [3 marks]

Write a Prolog predicate find Route/1 with the solution returned in the argument in the form of a list. You must also provide the predicate saveRoute/2 that takes as first argument the above solution and as a second argument a file name in which the solution will be stored.

In addition, you must provide the list of the defined predicates with a short definition for each of them.

Question 2. Functional solution (Scheme) [3 marks]

Write a Scheme function findRoute with the file name of your intermediate file format as argument. You must also provide the function saveRoute that takes as first argument the above solution and as a second argument a file name in which the solution is stored and will evaluate to true on success. Note that to build your solution, you are not allow to use any of the standard functions that end with a!

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close