Define prolog relations for the following

Assignment Help Programming Languages
Reference no: EM13333369

Given the relations
father(X,Y) X is the father of Y
mother(X, Y) X is the mother of Y
female(X) X is female
male(X ) X is male

Define prolog relations for the following:

a. sibling
b. sister
c. grandson
d. descendant

Provide some facts for the father, mother, male, and female predicates and then test the entire thing using Prolog.

 

Reference no: EM13333369

Questions Cloud

Write a prolog relation that returns a list : Write another relation (anything you want) that does something not performed above. Explain what your relation does.
Locate the final image relative to the lens on the right : Two converging lenses (f1 = 9.00 cm and f2 = 6.00 cm) are separated by 18.0 cm. The lens on the left has the longer focal length, Locate the final image relative to the lens on the right
Evaluate the hardness as ppm caco3 : A 250.0-mL sample of water was adjusted to pH 10 with ammonia buffer and calmagite indicator was added. The prepared sample required 30.84 mL of 0.00802 M EDTA for titration to the endpoint. Calculate the hardness as ppm CaCO3
Write a prolog relation remove : Write a Prolog relation remove(E,L,R) that is true if R is the list which results from removing one instance of E from list L. The relation is false if E isn't a member of L.
Define prolog relations for the following : Provide some facts for the father, mother, male, and female predicates and then test the entire thing using Prolog.
Explain what is the ph of a 0.0700 m solution of h2a : What is the pH of a 0.0700 M solution of H2A? What are the equilibrium conecntrations of H2A and A^2- in this solution? pH = ? [H2A} = ? [A^2-] = ?
What is the speed of the large cart after the collision : A small, 300g cart is moving at 1.30m/s on an air track when it collides with a larger, 5.00kg cart at rest. What is the speed of the large cart after the collision
Write a prolog relation subsequence : Write a Prolog relation remove(E,L,R) that is true if R is the list which results from removing one instance of E from list L. The relation is false if E isn't a member of L.
Explain chloroform and chcl3 immiscible or miscible : Predict whether each of the following solvents is miscible or immiscible with hexane,C6H14. 1.) formic acid, HCOOH immiscible or miscible 3.) methyl ethyl ketone, C4H8O immiscible or miscible 2.) methanol CH3OH immiscible or miscible 4.) chlorofor..

Reviews

Write a Review

Programming Languages Questions & Answers

  Creating message box to display member name

Ddefine for your class is a method to design a message box to display member name, car year and model, and year member joined club.

  Write the program by declaring one-dimensional array

Write the program by declaring one-dimensional array which could be used to hold data for grades (int type) of 10 students. The program will prompt user for numeric grades.

  Program using ten radio buttons to show five states

It is program using 10 Radio Buttons to show 5 States and 5 Capitals to user's interface. Also, there is text box to print "Correct" and "Incorrect" when Sate and the Capital is a correct match.

  Design program to enter a series of numbers

Design a program that asks the user to enter a series of 20 numbers. The program should determine whether the number is valid by comparing it to the following list of valid charge account numbers.

  Draw and implement abstract base class

Draw and implement the abstract base class ArithmeticExpression which represent any binary (having two arguments) arithmetic expression.

  Create class to calculate perimeter and area rectangle

Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.

  Compute service charge customer owes for writing bad check

Create the output and sketch the flowchart or write pseudocode for program which computes service charge a customer owes for writing bad check.

  Prepare clear button which will clear result text box

Make the compute button the Accept button. Prepare Clear button which will clear result text box and reset all text boxes, 4. controls, and internal variables used.

  Draw application which reads inventory records file

Draw an application which reads inventory records file and produces a report whihc show item-number, item-description, and price of every item on each day, one through 7.

  Creating printstream object using dos

Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.

  Explaining valid advice for naming variables

Which of the following is valid advice for naming variables? To save typing, make most variable names one or two letters.

  Write the code using recursive decent parser

Write the code, using recursive decent  parser and write the code, using a table-driven parser

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