subject

Write prolog clauses that define each of the following predicates: a. exactly_3(x) is true if x is a list with exactly three elements. b. at_least_3(x) is true if x is a list with at least three elements. c. at_most_3(x) is true if x is list with at most three elements. hint: use four clauses. d. intersect(x, y) is true if x and y are lists with an element in common. intersect([1,2,3,4],[5,4,1,6]) holds, but intersect([1,2,3,4],[5,6]) does not hold. hint: use member but no recursion. e. all_intersect(z, y) is true if every element of list z is a list x such that intersect(x, y) holds. all_intersect([[1,2,3],[5,4,6]],[3, 4]) holds, and all_intersect([],[3,4]) holds, but all_intersect([[1,2,3],[1,2,5],[5,4 ,6]],[3,4]) does not hold.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
List at least one thing to check for when you're checking the clarity and professionalism of a document.
Answers: 1
question
Computers and Technology, 25.06.2019 20:40
Write a java program named charsindex to get the index of all the characters of the alphabet. ask user to input a string.the sample output was produced by this string: "the quick brown fox jumps over the lazy dog." sample output:
Answers: 3
You know the right answer?
Write prolog clauses that define each of the following predicates: a. exactly_3(x) is true if x is...
Questions
question
Mathematics, 03.03.2021 03:40
Questions on the website: 13722367