Table of Contents

Naloge za prolog

sister/2

sister(X,Y)X is a sister of Y.

connected/3

connected(X,Y,N)X and Y are connected with a series of (no more than N) parent/child relations.

conc/3

conc(L1,L2,L) ⇔ the list L is obtained by appending the elements of L2 to L1.

del/3

del(X,L1,L2) ⇔ the list L2 is obtained from L1 by deleting element X.

insert/3

insert(X,L1,L2) ⇔ the list L2 is obtained from L1 by inserting the element X at arbitrary position.

min/2

min(L,Min)Min is the smallest element in the list L.

count/3

count(X,L,N)N is the number of times the element X appears in the list L.

sins/3

quick_sort/2

quick_sort(L,SL) ⇔ the list SL contains the elements of L sorted in non-decreasing order. Use the predicate pivoting/4 to implement quicksort.