Explain with an example what is “Setof” predicate in Prolog?
Answer / chaitanya
In Prolog, “Setof” predicate can be used to find out all the solutions of a predicate. For example, you have this database:
Guru99 (SAP, Testing Tools)
Guru99 (PHP, Perl)
And if you want to find the solutions of Guru99 (X, Y). We can enter
Setof ([ X,Y] , Guru99 (X,Y), Z).
Z = [[ SAP , Testing Tools], [ PHP, Perl] ]
| Is This Answer Correct ? | 0 Yes | 0 No |
How the clause is called if it contains a test, as well as zero or more additional forms in LISP? a) Conditional b) Consequents c) Clause d) None of the mentioned
What is the process of arranging procedures into layers? a) Procedure b) Abstraction c) Abstraction layers d) Procedure abstraction
Which notation facilitates uniformity in lisp? a) Prefix b) Postfix c) Infix d) None of the mentioned
What is the output of the given statement in LISP? * (setf l1 (list ‘a ‘b ‘c)) * (setf l2 (list ‘a ‘b)) * (setf l1 l2) a) A B b) A B C c) B C d) None of the mentioned
What is the output of the following statement? * (defun (input-list) (if (endp input-list) nil (cons ( (first input-list)) ( (rest input-list))))) a) Procedure b) Transforming c) Input d) Error
Explain what is List structures in Prolog?
Which creates reader procedures for getting things out of an instance fields? a) Structure in LISP b) Defstruct c) Class d) Object
What is the output of the given statement? * (endp ‘(this is not empty)) a) T b) NIL c) Error d) None of the mentioned
Mention what is the difference between = and = = in Prolog?
What is the output of the given statement in LISP? * (setf bins (make-array 4 :initial-element ‘e)) * (aref bins 0) a) E b) 0 c) 4 d) None of the mentioned
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod
Explain List of artificial intelligence projects?
AI Algorithms (74)
AI Natural Language Processing (96)
AI Knowledge Representation Reasoning (12)
AI Robotics (183)
AI Computer Vision (13)
AI Neural Networks (66)
AI Fuzzy Logic (31)
AI Games (8)
AI Languages (141)
AI Tools (11)
AI Machine Learning (659)
Data Science (671)
Data Mining (120)
AI Deep Learning (111)
Generative AI (153)
AI Frameworks Libraries (197)
AI Ethics Safety (100)
AI Applications (427)
AI General (197)
AI AllOther (6)