Mention what is Cut (!) in Prolog and what is the advantage of ‘Cut’ and ‘Negation’?
Answer / chaitanya
Cut function is used in Prolog when you want to restrict Prolog from backtracking into certain choicepoints or subgoals, either because the alternatives would give wrong solutions or for efficiency reasons.
Advantage of using cut in Prolog is
Through cut, we can often improve the efficiency of the program
We can specify exclusive rules using cut
| Is This Answer Correct ? | 1 Yes | 0 No |
What is the output of the following statement? * (setf book (book=author-writer book ‘(guy steele))) a) Guy b) Steele c) Error d) None of the mentioned
What is meant by collection of methods the same name? a) Lisp class b) Class c) Generic function d) None of the mentioned
Explain what is LISP constants?
How many items are available in mapping primitives are there? a) 3 b) 4 c) 5 d) 6
What is the output of the given statement? * (defmethod area ((figure rectangle)) (* (rectangle-width figure) (rectangle-height figure))) a) Area b) Rectangle c) Height d) Error
Explain why PROLOG language is stated as a procedural language?
In “cuts” what is the Parent goal in Prolog?
Which keyword embeds the initial element in an array in LISP? a) Initial b) Initial-content c) Initial-element d) None of the mentioned
Which abstractions have a prescribed behavior? a) Auxiliary procedures b) Procedure abstraction c) Primary procedures d) None of the mentioned
Explain what is List structures in Prolog?
How many access procedures are avilable in lisp? a) 1 b) 2 c) 3 d) 4
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
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)