Ask Question, Ask an Expert


Ask Programming Language Expert

problem 1

We are given the following knowledge base of travel information:


a) prepare predicate travel/2 that determines whether it is possible to travel from one place to another by chaining together car, train, and plane journeys. For ex, your program must answer yes to the query travel(valmont,raglan). So, by using travel/2 to query the above database, you could find out that it is possible to go from Valmont to Raglan. If you are planning such a voyage, that’s already something useful to know, but you would maybe prefer to have precise route from Valmont to Raglan.

b) prepare the  predicate travel/3 which tells you which route to take when travelling from one place to another. For ex, the program should respond
X = go(valmont,metz,
to a query travel(valmont,losAngeles,X).

c) Extend predicate travel/3 so that it not only tells you the route to take to get from one place to another, but also how you have to travel. i.e., new program must let you know, for each stage of the voyage, whether we require to travel by car, train, or plane. Test your predicates thoroughly.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9462

Have any Question? 

Related Questions in Programming Language

Along with your name include your student id and discussion

? Along with your name, include your student ID# and discussion section at the top of your Assignment. ? There are eight problems; we will go over them in dicussion section after the due date. ? The textbook in this cont ...

Programming languages assignment write the following as

Programming Languages Assignment Write the following as Prolog rules:  1. Implement a rule "dogEnthusiast". Someone is a "dogEnthusiast" if they own AT LEAST TWO dogs. Assume that the only types of facts available are: " ...

1 write a program that reads input as a stream of

1. Write a program that reads input as a stream of characters until encountering EOF. Have the program report the number of uppercase characters, the number of lowercase characters, and the number of other characters rea ...

Write a lex program that converts a le to pig latin

Write a Lex program that converts a le to Pig Latin." Specially, assume the le is a sequence of words (groups of letters) separated by whitespace. Every time you encounter a word: 1. If the First letter is a consonant, m ...

Figure is code to count the number of primes from 2 to n

Figure is code to count the number of primes from 2 to n, using the sieve method on a suitably large array a. That is, a[i] is TRUE at the end only if there is no prime p i or less that evenly divides i. We initialize al ...

Write an mdi project that is a simple text editor allow the

Write an MDI project that is a simple text editor. Allow the user to open multiple documents, each in a separate child form. For the text editor, use one big textbox control with its multiline property set to True or a R ...

Assignment lispoverviewthe purpose of this assignment is

ASSIGNMENT: LISP Overview The purpose of this assignment is for you to gain some experience designing and implementing LISP programs. This assignment explores only a few of the many interesting LISP features. This assign ...

Assignmentquestion 1consider the following class the

Assignment Question 1 Consider the following class. The purpose of each block of code within the class is written in comments within the code. But the following class contains a number of errors. Errors can occur at comp ...

Assignmentthe fourth programming project involves writing a

Assignment The fourth programming project involves writing a program to manage a student database. The interface to the program should be a GUI that looks similar to the following: A combo box should allow the user to se ...

Assignmentreference this assignment is an object oriented

Assignment Reference: This assignment is an object oriented version of the In-class assignment. The functionality supported for a single vehicle in ICA 01 would be extended to multiple vehicles using a single class Car, ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen