adplus-dvertising
frame-decoration

Question

Which one of the following is a correct implementation of the metapredicate “not” in PROLOG (Here G represents a goal) ?

a.

not(G):– !, call(G), fail. not(G).

b.

not(G):– call(G), !, fail. not(G).

c.

not(G):– call(G), fail, !. not(G).

d.

not(G):– call(G), fail. not(G):– !.

Answer: (b).not(G):– call(G), !, fail. not(G).

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 is a correct implementation of the metapredicate “not” in PROLOG (Here G represents a goal) ?

Similar Questions

Discover Related MCQs

Q. Which one of the following is not an informed search technique?

Q. If we convert

∃u ∀v ∀x ∃y (P(f(u),v, x, y) → Q(u,v,y)) to
∀v ∀x (P(f(a),v, x, g(v,x)) → Q(a,v,g(v,x)))

This process is known as

Q. Given two jugs of capacities 5 litres and 3 litres with no measuring markers on them. Assume that there is endless supply of water. Then the minimum number of states to measure 4 litres water will be

Q. The map colouring problem can be solved using which of the following technique?

Q. Which of the following is a knowledge representation technique used to represent knowledge about stereotype situation?

Q. A* algorithm uses f ' = g + h' to estimate the cost of getting from the initial state to the goal state, where g is a measure of the cost of getting from initial state to the current node and the function h' is an estimate of the cost of getting from the current node to the goal state. To find a path involving the fewest number of steps, we should set

Q. Which one of the following prolog programs correctly implement “if G succeeds then execute goal P else execute goal q ?”

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

Q. An example of a tautology is:

Q. The preposition (p→q) ˄ (~q˅p) is equivalent to:

Q. If the proposition 7P⇒Q is true, then the truth value of the proposition 7PV(P⇒Q) is:

Q. Which of the following checks cannot be carried out on the input data to a system ?

Q. A fact in prolog is a special case of a:

Q. Natural objects can be realistically modeled using:

Q. An agent can improve its performance by

Q. Which of the following is true for semi-dynamic environment?

Q. In Artificial Intelligence (AI), an environment is uncertain if it is ..............

Q. In Artificial Intelligence (AI), a simple reflex agent selects actions on the basis of ...................

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?

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?