Saturday, June 9, 2012
What is the differencce between 32-bit and 64-bit versions of windows
The terms 32-bit and 64-bit refer to the way a computer's processor (also called aCPU), handles information. The 64-bit version of Windows handles large amounts of random access memory (RAM) more effectively than a 32-bit system.
Prolog Family Tree
% Family tree
%%FACTS
married(romeo,juliet).
married(rangga,cinta).
married(aco,ece).
parent(romeo,rangga).
parent(romeo,ece).
parent(juliet,rangga).
parent(juliet,aco).
parent(rangga,andi).
parent(rangga,ina).
parent(rangga,ani).
parent(cinta,andi).
parent(cinta,ina).
parent(cinta,ani).
parent(ece,sinta).
parent(ece,jojo).
parent(aco,sinta).
parent(aco,jojo).
male(romeo).
male(rangga).
male(aco).
male(andi).
%% RULES
father(F,C):-parent(F,C),male(F).
mother(M,C):-parent(M,C),not(male(M)).
child(C,P):-parent(P,C).
/*full_siblings(A,B):-
father(F,A),father(F,B),
mother(M,A),mother(M,B),
A\=B.*/
siblings(A,B):-parent(P,A),parent(P,B),A\=B.
son(S,P):-parent(P,S),male(S).
daughter(D,P):-parent(P,D), not(male(D)).
uncle(U,N):-siblings(U,P),parent(P,N),male(U).
aunt(A,N):-siblings(A,P),parent(P,N),not(male(A)).
/*cousin(X,Y) :-
father(F1,X),father(F2,Y),siblings(F1,F2);
father(F,X), mother(M,Y), siblings(F,M);
mother(M,X), father(F,Y), siblings(M,F);
mother(M1,X), mother(M2,Y), siblings(M1,M2).*/
cousin(A,B):-parent(C,A),parent(D,B),siblings(C,D).
nephew(A,B):-child(A,C),siblings(C,B).
grandparent(G,N):-parent(G,X),parent(X,N).
grandchild(A,B):-child(A,C),child(C,B).
grandson(A,B):-child(A,C),child(C,B),male(B),male(A).
granddaughter(A,B):-child(A,C),child(C,B),not(male(B)), not(male(A)).
grandpa(GP,GC):-
father(GP,F),
father(F,GC);
father(GP,M),
mother(M,GC).
grandma(GM,GC):-
mother(GM,M),parent(M,GC).
brothers(A,B):-child(A,C),child(B,C), A\=B, male(B).
sister(A,B):-child(A,C),child(B,C), A\=B, not(male(B)).
Subscribe to:
Comments (Atom)