Question
a.
if-else (G, P, q) :- !, call(G), call(P). if-else (G, P, q) :- call(q).
b.
if-else (G, P, q) :- call(G), !, call(P). if-else (G, P, q) :- call(q).
c.
if-else (G, P, q) :- call(G), call(P), !. if-else (G, P, q) :- call(q).
d.
All of the above
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which one of the following prolog programs correctly implement “if G succeeds then execute goal P else execute goal q ?”
Similar Questions
Discover Related MCQs
Q. The strategy used to reduce the number of tree branches and the number of static evaluations applied in case of a game tree is
View solution
Q. An example of a tautology is:
View solution
Q. The preposition (p→q) ˄ (~q˅p) is equivalent to:
View solution
Q. If the proposition 7P⇒Q is true, then the truth value of the proposition 7PV(P⇒Q) is:
View solution
Q. Which of the following checks cannot be carried out on the input data to a system ?
View solution
Q. A fact in prolog is a special case of a:
View solution
Q. Natural objects can be realistically modeled using:
View solution
Q. An agent can improve its performance by
View solution
Q. Which of the following is true for semi-dynamic environment?
View solution
Q. In Artificial Intelligence (AI), an environment is uncertain if it is ..............
View solution
Q. In Artificial Intelligence (AI), a simple reflex agent selects actions on the basis of ...................
View solution
Q. In heuristic search algorithms in Artificial Intelligence (AI), if a collection of admissible heuristics h1.......hm is available for a problem and none of them dominates any of the others, which should we choose?
View solution
Q. Consider following sentences regarding A*, an informed search strategy in Artificial Intelligence (AI).
(a) A* expands all nodes with f(n) < C*.
(b) A* expands no nodes with f(n) /C*.
(c) Pruning is integral to A*.
Here, C* is the cost of the optimal solution path.
Which of the following is correct with respect to the above statements?
View solution
Q. Consider a vocabulary with only four propositions A, B, C and D. How many models are there for the following sentence?
B V C
View solution
Q. Consider the following statements :
(a) False╞ True
(b) If α╞ (β ∧ γ) then α╞ β and α╞ γ.
Which of the following is correct with respect to the above statements?
View solution
Q. Consider the following English sentence:
“Agra and Gwalior are both in India”.
A student has written a logical sentence for the above English sentence in First-Order Logic using predicate In(x, y), which means x is in y, as follows:
In(Agra, India) V In(Gwalior, India)
Which one of the following is correct with respect to the above logical sentence?
View solution
Q. Consider the following two sentences:
(a) The planning graph data structure can be used to give a better heuristic for a planning problem.
(b) Dropping negative effects from every action schema in a planning problem results in a relaxed problem.
Which of the following is correct with respect to the above sentences?
View solution
Q. Consider the set of all possible five-card poker hands dealt fairly from a standard deck of fifty-two cards. How many atomic events are there in the joint probability distribution?
View solution
Q. In Artificial Intelligence (AI), which agent deals with happy and unhappy state?
View solution
Q. If b is the branching factor and m is the maximum depth of the search tree, what is the space complexity of greedy search?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Artificial Intelligence? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!