Explain what is backtracking in Prolog?
Answer / chaitanya
In Prolog, backtracking is a process adopted by Prolog. When a sub-goal fails in Prolog, the Prolog system moves its steps backwards to the previous goal and tries to re-satisfy it. Backtracking enables Prolog to find all alternative solutions to a given query.
| Is This Answer Correct ? | 1 Yes | 0 No |
What should be used with structure names with a combination? a) Make- b) Make c) Create d) Deploy
Mention what is the difference between = and = = 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 following statement? * (setf breakfast ‘(eggs bacon toast tea)) * (cond ((> (length breakfast) 10) ‘glutton) ((not (endp breakfast)) ‘normal)(t ‘anorexic)) a) Anorexic b) Breakfast c) Eggs d) Normal
What is the output of the given statement? * (defun when-plusp-with-bug (number result); (when (plusp number) result)); * (setf pressure -2) * (when-plusp-with-bug pressure (print ‘alarm)) a) Alarm b) Nil c) Both a & b d) None of the mentioned
Why in prolog it is said that Program and Data are the same thing?
Which keyword is used to define the method? a) Defun b) Destruct c) Demake d) Defmethod
What is the other name of boxes in LISP? a) Cons cells b) Conses c) Both a & b d) None of the mentioned
What is the output of the following statement? * (first ‘( p h w)) a) P b) H c) W d) phw
What is the output of the following statement? * ‘(first (first (rest (rest ((a b) (c d) (e f)))))) a) a b) b c) ab d) (FIRST (FIRST (REST (REST ((A B) (C D) (E F))))))
Which is present in the writer procedure for arrays in LISP? a) Setf b) Aref c) Fref d) Both a & b
Which is a procedures supplied by user in terms of primitives? a) Custom b) User-defined c) Definite d) All of the mentioned
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)