Write a prolog relation remove

Assignment Help Programming Languages
Reference no: EM13333370

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.

What are all of the answers to the following queries?

ask remove(a,[b,a,d,a],R).
ask remove(E,[b,a,d,a],R).
ask remove(E,L,[b,a,d]).
ask remove(p(X),[a,p(a),p(p(a)),p(p(p(a)))],R).

 

Reference no: EM13333370

Questions Cloud

Define using chemical equations, show how the triprotic acid : Using chemical equations, show how the triprotic acid H3PO4 ionizes in water. Phases such as (l) or (aq) are optional Ka1 = ? Ka2 = ? Ka3 = ?
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.

Reviews

Write a Review

Programming Languages Questions & Answers

  Deisgn child class that overrides parent method

Deisgn child class named Box, that contains additional data field named depth and a computeSurfaceArea() method that overrides the parent method appropriately for a three-dimensional box

  Implement functions using x86 assembly

Implement a procedure that mimics a logic unit

  Xhtml page to display current date time in client-s computer

Create the XHTML page which will display current date time in client's computer. Use document.write method in immediate script.

  Create class uses element array of digits to store integers

Create a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods input, output, add and subtract.

  Program to compute unit price of items sold

Manager of a Supermarket would like to be able to calculate the unit price of items sold there. To do this the program should input the name and the price of the item.

  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.

  Design the software architecture of a web auctioning site

Design the software architecture of a Web auctioning site and design a database for storing information about users, items, auctions and bids.

  Create xml document to mark up the nutrition facts

Create XML document to mark up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value.

  Design a c# windows phone 8 application

Design and implement a C# Windows Phone 8 application based on the SoundBoard app in the Windows Phone 8 Development for Absolute Beginners textbook.

  Write ipo charts for program contains four value functions

Add new C++ source file to project. Name the source file Ch9AppE05. Use Ipo charts you created in step a to code program. Display gross pay with a dollar sign and two decimal places.

  Write function template to return number of element in queue

Add operation queueCount to class queueType (the array implementation of queues), to return number of elements in the queue. Write down the definition of function template.

  Creating code for method tostring

Fill in the code for method toString, which must return a string containing the name, account number, and balance for the account.

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