%% Two uses %% The subject should write original algorithms and arguments in the supplementary examination %% Do algorithms have the same structure? same_predicates([],[],A,A):-!. same_predicates(A,D,B,C):- A=[A1|As], member(A1,D)-> delete(D,A1,B2), %% this algorithm returns true given abc and abcc, where it doesn't matter if c is represented twice append(B,[A1],E), same_predicates(As,B2,E,C).