prolog and ruby

1. Task #1:) (20 points) Consider the following knowledge base as in the previous assignment:

nonStopFlight(la, chicago).

nonStopFlight(philadelphia, la).

nonStopFlight(columbus, philadelphia).

nonStopFlight(sanFrancisco, columbus).

nonStopFlight(detroit, sanFrancisco).

nonStopFlight(toledo, detroit).

nonStopFlight(houston, sanFrancisco).

You already wrote a recursive rule findFlight/2 that tells us whether we can travel by plane from one

town A to another town B. This time you write a recursive rule findRoute/2 that should find the route

(with zero or more airports as intermediate hops) from town A to town B. Your rule not only finds the

route, it also prints the route (showing each hop seperated by a dash or so) on the computer screen. If any

such route does not exist, prolog should respond "false". Run at least 2 querries and show the output (in

README) you get from Prolog. Writing README carries 2 point.

2. Task #2:) (20 points) Write a Prolog rule myDelete(A, List1, List2) which deletes all occurrences of

item A from List1 to produce result List2. As an example, running query myDelete(b, [b,c,d,b,c,b],

Result). should give us Resul t Æ [c,d,c]. Then, extend your Prolog rule so that it asks the user for the

name of the output file so that it can present the result in that output file. Test your implementation of the

rule with at least 2 querries and show the results in README. Writing README carries 2 points.

3. Task #3:) Part A: (12 points)Write Prolog code which can solve any given 9x9 Sudoku puzzle. Note that the

textbook has solution for the 4x4 Sudoku puzzle. You need to extend the textbook’s code (i.e., [login to view URL]

on Page 104-105) andmake itwork for the 9x9 puzzle. Test your implementation with at least 2 querries and

show the results in README. Writing README carries 1 point. Note: youmay need an alternative to

library rules fd_all_different and fd_domain depending on your prolog system.

4. Task #3:) Part B: (8 points) Write a Ruby program to do the above (i.e., which can solve any given 9x9

Sudoku puzzle). Run your Ruby program on the same instances of the puzzles as done in Part A. Measure

how much time your program takes and compare that with the time taken by Prolog version.

Taidot: Prolog, Ruby on Rails

Näytä lisää: ruby rails user account system, ruby rails page user came, write perl program give result user needed, version symantec user manual, php mysql student result online solution projects, unable jump row mysql result index solution, user master screen using ruby rails, best ruby soap solution, cookie based solution identify user jsp, create program user plays simple version card game computer , creating user registration page ruby rails, find ruby component version, freelance ruby user, hack user ids vbulletin version , interactive online solution users interact clients brandproduce online tool user create custom skateboard design online, ruby email confirmation user registration, ruby rails multiple user type, send javascript result ruby

Tietoa työnantajasta:
( 1 arvostelu ) Bowling Green, United States

Projektin tunnus: #18939709

4 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


Hi, I am a software engineer experienced in Prolog (I am using SWI Prolog). I can complete your project within 3 days from awarding, properly tested and commented. Looking forward to hearing from you.

$100 USD 3 päivässä
(27 arvostelua)

Hi, I think I made this exercises before on prolog, I can help you with this, you can check my reviews

$100 USD 2 päivässä
(11 arvostelua)

Hello, I have 2+ years experience working with ruby and I have strong algorithm background (I ranked 895 in here: [login to view URL]). Looking forward to working with you :)

$30 USD 3 päivässä
(2 arvostelua)
$25 USD 1 päivässä
(0 arvostelua)