WS Presentations Main Page
q([],[]).
q([X|RX],[X1|RX1]) :-
X1 is X +1,
q(RX,RX1).
..., q(X,Y) & r(X), ...Cost is equal to
(cost function
). Assuming
threshold is 4 units:
..., length(X,LX),
Cost is LX*2+1,
( Cost > 4 -> q(X,Y) & r(Z)
; q(X,y), r(X) ), ...