Write a prolog recursive predicate that tells us

Assignment Help Computer Engineering
Reference no: EM132211513

Question :

Write a Prolog program with the following knowledge base:

directTrain(union-station, san-bernardino).

directTrain(oxnard, union-station).

directTrain(burbank, lancaster).

directTrain(lancaster, union-station).

directTrain(san-bernardino, riverside).

directTrain(santa-ana, burbank).

directTrain(oceanside, santa-ana).

This knowledge base holds facts about towns you can travel between by taking a direct train, e.g., from union station to san bernardino.

Write a Prolog recursive predicate travelBetween that tells us when we can travel by train between two towns (not necessarily by a single direct train).

Reference no: EM132211513

Questions Cloud

Display a temperature on two 1bit 7segment displays : Write a program using the Arduino Uno to display a temperature on TWO 1bit 7segment displays.
Display the seating chart of a theater : Write a program that can be used by a small theater to sell tickets for performances.Display the seating chart of a theater.
Write a program that takes two words as input from keyboard : Write a program that takes two words as input from the keyboard, representing a password and the same password again.
Perform the addition of two byte sized numbers : Write a program in TASM that performs the addition of two byte sized numbers that are initially stored in memory locations 'num1' and 'num2'.
Write a prolog recursive predicate that tells us : This knowledge base holds facts about towns you can travel between by taking a direct train, e.g., from union station to san bernardino.
Write a program which outputs the numbers from 1 to 80 : Write a program, using nested loops, which outputs the numbers from 1 to 80 in 8 columns and 10 rows.
Write a program using python that asks the user to enter air : Write a program using python that asks the user to enter air, water, and steel abd the distance that a sound wave will travel in the medium.
Write a program with an array of four payroll objects : Design a PayRoll Class that has data members for an employee's hourly pay rate, number of hours worked,and total pay for the week.
Find optimal number of clusters using elbow method : Find optimal number of clusters using Elbow Method and then Apply K-Means clustering. Finally do visualization for K-Means Clustering.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How long will ram take to read given values in page mode

A 4 M x 1 dynamic RAM, organized as a 2,048 x 2,048 cell array, has a to of 70 ns. How long will it take to read 1,024 values in page mode?

  Design a spreadsheet to keep track of your expenses

Assume you are going on a business trip. Design a spreadsheet to keep track of your expenses and create a summary of your totals.

  Give appropriate to string methods for all classes

create a class Employee with a name and salary.give appropriate to String methods for all classes

  Inheritance is a method in object-oriented programming

Inheritance is a method in object-oriented programming that you derive new classes from existing classes in your code.

  Displays the frequency table of the characters in the file

Displays the frequency table of the characters in the file, and displays the Huffman code for each character.

  Describe the meaning of each of the given addressing modes

Describe the meaning of each of the following addressing modes. Immediate, Absolute, Register indirect.

  Write a program to order and print some tagged words

Write a program to order and print some tagged words. The program is invoked with a command line argument giving the name of a data file.

  Create a dynamic web site that functions like a calculator

Create a dynamic Web site that functions like a calculator. Add features for addition, subtraction, multiplication, division, modulation, and so on.

  Write a menu-driven program with the given options

Write a menu-driven program with the following options: For a specific team, how many times did they win? For a specific year, who won and who lost?

  Discuss new information technology has a ripple effect

The introduction of new information technology has a ripple effect, raising new ethical, social, and political issues that must be dealt with on individual

  Write a paper about object linking and embedding

Write a paper about Object Linking and Embedding. Headers including paper title and page number. File name: last name, first initial and project.

  Why the file manager should grant such requests

why the file manager should grant such requests.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd