Write prolog clauses to express therelationships

Assignment Help JAVA Programming
Reference no: EM13162563

Write prolog clauses to express the following relationships, given the parent relationship: grand-parent, sibling, cousin.

 

so far i have:

ancestor(X,X).

ancestor(X,Y) :- ancestor(X, Z), parent(Z, Y).

 

 

Reference no: EM13162563

Questions Cloud

How many grams of have been consumed : If 155 of wet is collected over water at 24 and a barometric pressure of 738 , how many grams of have been consumed? (The vapor pressure of water is 22.38 .)
Compute the volume in liters : Calculate the volume in liters of a 0.133mol/L copper (II) sulfate solution that contains 150.g of copper (II) sulfate (CuSO4).
Calculate the vapor pressure of pure ethanol : A solution of 53.6 g of glycerin in 133.7g of ethanol has a vapor pressure of 113 torr at 313K. Calculate the vapor pressure of pure ethanol assuming that glycerin is a non-volatile, non electrolyte solute in ethanol.
Compute the millimoles of copper sulfate : Calculate the millimoles of copper (II) sulfate the chemist has added to the flask. Be sure your answer has the correct number of significant digits.
Write prolog clauses to express therelationships : Write prolog clauses to express the following relationships, given the parent relationship: grand-parent, sibling, cousin.
What is ka for this acid : When 0.060 mol of propionic acid, C2H5CO2H, is dissolved in 500 ml of water, the equilibrium concentration of H3O+ ions is measured to be 2.41 x 10-3 M. What is Ka for this acid?
Effects of the strategies on both gdp and unemployment : One government strategy to provide for economic stability and encourage economic growth is to provide tax reductions or tax incentives for individuals and businesses. An alternative approach is to increase government spending to accomplish these g..
How many moles of oxygen were in the sample : If 5.50 of the unknown compound contained 0.183 of and 0.367 of , how many moles of oxygen, , were in the sample.
Derive an expression for the subsequent concentration : Derive an expression for the subsequent concentration of sodium chloride c in terms of c0, t, Q, and V. Make a sketch of c versus t and label the main features.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write program in java-calculate and display mortgage payment

Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage.

  Write specifications for method which advances date by one

Write specifications for the method which advances any given date by one day. Comprise a statement of purpose, pre- and post-conditions, and description of parameters.

  Write java program to compute how much federal need to pay

Write a java application to calculate how much federal and state tax you need to pay. The program should accomplish the following task.

  Create a java program to calculate the circumference

Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.

  Programming exercises

Programming Exercises 1. Write an application named BadSubscriptCaught in which you declare an array of 10 first names. Write a try block in which you prompt the user for an integer and display the name in the requested position.

  Write complete java program to read from keyboard

Write complete Java program to read, from keyboard, a student's first and last name and six grades. It will display on screen last name then first letter of first name with a period.

  Java enumeration lettergrade represent letter grades

Write a java enumeration LetterGrade that represents letter grades A through F, including plus and minus grades. Define a private instance variable holding a boolean value.

  Write down java console application to add new student

Write down java console application presents the following menu. Add new student and scores in Biology, Physics and chemistry Search for a given student.

  Create a complete java application

Create a complete Java application that meets these requirements and the program has an opening comments section (using block comments) with the file name, date, your name, and purpose of the program.

  Application named arithmeticmethods

Create an application named ArithmeticMethods whose main() method holds two integer variables. Assign values to the variables. In turn, pass each value to methods named displayNumberPlus10()

  Write a program that converts number from binary to decimal

write a program that Converts a Number from Binary to Decimal  by using reading keyboard input.

  Develop java code to compute monthly rent for housing units

Develop a java code that computes monthly rent for 3 housing units namely Bungalows,Apartments and hostels. All housing units have got size,color and monthly rental rate.

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