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

  Write iterative program which finds largest number

Write the iterative program which finds largest number of McNuggets which cannot be bought in exact quantity. Your program must print the answer in the following format.

  Create set-list of enumerated constants called week

Create set/list of enumerated constants called week which contains days of week. Have variable called today that is of kind week. Allot a value to today.

  Implement to do a matrix-matrix product

Implement and check the time to do a matrix-matrix product of a 1000x500 matrix with a 500x800 matrix of floats sequentially and using 1,2,3,4, and 8 threads on dual and quad core processors.

  Develop class templates for administrative employees

Develop classes or class templates for the following: Administrative Employees are paid a salary, but they also receive a bonus at regular intervals during the year. Add a class "Administrator" to the Employee class hierarchy.

  Program to prompts user for integer and print prime number

Give a program which will compile in VS 2010. Write a program to prompts user for integer and then prints out all prime numbers up to that integer.

  Calculate display the area of a rectangle (length * width)

Use the input.txt file. Have it read in the number of records to work on. Then for each record read in a character. If it is a C then read in a value and calculate and display the area of a circle (pi*r 2 ), a R then read in two values and calculate ..

  Compute tax percentage using nested if

On Home Sales Data worksheet, in column E, compute Tax Percentage. Using nested IF calculate the following (Hint: do not use the function AND because if the house does not have 1 bedroom

  Write a web application which will give report of balance

Write a web application which will provide a report of the balance held in the visitor's account during the past several months.

  Write program to convert length in feet into centimeters

Write the program which prompts the user to enter the length in feet and inches and outputs equivalent length in centimeters.

  Create application which permits user to input a price

Create an application which allows a user to input a price until suiatble sentinel value is entered. Output is a price of each item on each day,one through seven.

  Describe issues-web site designers when adding multimedia

Describe some of the issues web site designers must consider when adding multimedia to a web site. Consider issues such as bandwidth, server load, or others you consider to be important. Please provide references.

  Program to assign anonymous array of double value

Write c++ statements to permit the user to enter n, number of values to be processed; then assign an anonymous array of n double values, storing its address in doublPtr.

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