Write prolog procedures. (i) Delete the second occurrence of 5 from a list. (ii) Count the numbers divisible of 7 in a l
Posted: Mon Jun 06, 2022 10:57 am
Write prolog procedures. (i) Delete the second occurrence of 5 from a list. (ii) Count the numbers divisible of 7 in a list. (iii) Clear all repetitions of consecutive elements from a list. (iv) Find the smallest subsequence the sum of the elements of which is at least a given number N. (v) Given sets A and B to define the symmetric difference between A and B. (vi) Double the number of arguments of a given predicate. f(X1,X2,X3) -> f(X1,X1, X2, X2, X3, X3). (vii) Find the shortest branch. (viii) Find the least common multiplier of the elements of a tree.