All Exams Test series for 1 year @ ₹349 only
Question

Given the following set of prolog clauses :

father(X, Y) :

parent(X, Y),

male(X),

parent(Sally, Bob),

parent(Jim, Bob),

parent(Alice, Jane),

parent(Thomas, Jane),

male(Bob),

male(Jim),

female(Salley),

female(Alice).

How many atoms are matched to the variable ‘X’ before the query

father(X, Jane) reports a Result ?

This question was previously asked in
UGC NET 2015 Paper 1 Question Paper (27-Dec-2015)
The correct answer is

2

The rule says X is the father of Y if parent(X, Y) holds and male(X) holds, and Prolog tries the parent facts top to bottom with backtracking.

For father(X, Jane), the goal parent(X, Jane) first succeeds with X = Alice; male(Alice) is not a fact, so Prolog backtracks.

The next match is X = Thomas; male(Thomas) is also not a fact, and no further parent(_, Jane) fact exists, so the query now reports its result (No).

Exactly two atoms, Alice and Thomas, were bound to X; the facts with Bob as child never bind X because Jane does not unify with Bob.

Hence, 2.

Was this answer helpful?

Similar Questions

  1. In constraint satisfaction problem, constraints can be stated as __________.

  2. Language model used in LISP is __________.

  3. Reasoning strategies used in expert systems include __________.

  4. Forward chaining systems are __________ where as backward chaining systems are __________.

  5. Match the following with respect to heuristic search techniques :

    List - IList - II
    (a) Steepest - ascent Hill Climbing(i) Keeps track of all partial paths which can be candidate for further exploration
    (b) Branch - and - bound(ii) Discover problem state(s) that satisfy a set of constraints
    (c) Constraint satisfaction(iii) Detects difference between current state and goal state
    (d) Means - end - analysis(iv) Considers all moves from current state and selects best move

    Codes :

  6. Match the following knowledge representation techniques with their applications :

    List - IList - II
    (a) Frames(i) Pictorial representation of objects, their attributes and relationships
    (b) Conceptual dependencies(ii) To describe real world stereotype events
    (c) Associative networks(iii) Record like structures for grouping closely related knowledge
    (d) Scripts(iv) Structures and primitives to represent sentences

    Codes :

  7. Match the following :

    List - IList - II
    (a) Intelligence(i) Contextual, tacit, transfer needs learning
    (b) Knowledge(ii) Scattered facts, easily transferable
    (c) Information(iii) Judgemental
    (d) Data(iv) Codifiable, endorsed with relevance and purpose

    Codes :

  8. Which of the following is false for the programming language PROLOG ?

  9. ________ is used in game trees to reduce the number of branches of the search tree to be traversed without affecting the solution.

  10. Consider f(N) = g(N) + h(N)

    Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current node N to the goal node. Then f(N) = h(N) is used in which one of the following algorithms ?


Important Questions from Approaches to AI

  1. The process of removing detail from a given state representation is called ______.

  2. In constraint satisfaction problem, constraints can be stated as __________.

  3. Language model used in LISP is __________.

  4. Reasoning strategies used in expert systems include __________.

  5. Forward chaining systems are __________ where as backward chaining systems are __________.

Need Expert Advice?
Upcoming Exams
JTET
November 01, 2026
CTET
December 12, 2026
Test Series
UGC NET img
Teaching
UGC NET (Paper 2) 2026 Mock Test Series
796 Tests 2 Tests Free
4.4(38)
English
More Questions from UGC NET

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App