Contact us - +12567847275

Computer Science Homework Help

Prolog program: draw derivation trees

 

/* Consider the following Prolog program: */

member(X,[X|Xs]).

member(X,[Y|Xs]) :- member(X,Xs).

disjoint([],Ys).

disjoint([X|Xs], Ys) :- not(member(X, Ys)), disjoint(Xs,Ys).

/*

Draw the derivation trees for the following queries:

(a) ?- disjoint([1,2,3],[4,2]).

(b) ?- disjoint([1,2,3],Xs).

(c) ?- not(not(disjoint(Xs,[4,2]))).

As a short reminder:

+ Goal

is the same as

not(Goal)

*/

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.