Monday, October 20, 2008

SOME IMPORTANT QUESTIONS /OLD QUESTION PAPERS

Some Important questions
1.WHAT IS LOGIC PROGRAMMING ?
2.DEFINE FACT AND RULES?
3.Define the term expert system?
4.differentiate between Var & Nonvar?
5.Diferentiate between atom and atomic ?
6.explain the term built in predicate trace?
7.Differenciate between between Assert & Assertz predicate?
8.What is Structural induction?
9. What is the purpose of arg predicate?
10.Define translation from natural language to sumbolic language ?
11.Define heuristics?Give one example?
12.what is WFFS ?
13Differentiate between Syntax and symantics?
14 Explain linear resolution?
15.what is skolemization ?
16.what is inferencing?
17.What are representations & mappings?
18./Differnciate between forward reasoning and bacward reasoning?
19. what is mapping?
20. name the various AI languages?
21.Explain CNF & DNF?
22.write short notes on
a)bottom up parsing
b)modus ponens
c)unification
23 explain the concept of backtracking?
24.What is Conflict Resolution?
25.Explain Breadth first search?
26.define predictive retract?
27.what is resolution principle ?
28Explain the chain rule ?
29. what are the various quantifiers ?explain
30 define functor?
31 Differentiate between procedural knowledge and declatrative language?
32.explain the predicates which are used in making the things equal?
33what is SPY used for?
34what is difference between get & get0 ?
35.Explain in detail the concepts of Horn clauses ?
36

Wednesday, October 15, 2008

ABOUT HORN CLAUSE

Definition: A Horn clause is a clause with at most one positive literal.
Any Horn clause therefore belongs to one of four categories:
A rule: 1 positive literal, at least 1 negative literal. A rule has the form "~P1 V ~P2 V ... V ~Pk V Q". This is logically equivalent to "[P1^P2^ ... ^Pk] => Q"; thus, an if-then implication with any number of conditions but one conclusion. Examples: "~man(X) V mortal(X)" (All men are mortal); "~parent(X,Y) V ~ancestor(Y,Z) V ancestor(X,Z)" (If X is a parent of Y and Y is an ancestor of Z then X is an ancestor of Z.)
A fact or unit: 1 positive literal, 0 negative literals. Examples: "man(socrates)", "parent(elizabeth,charles)", "ancestor(X,X)" (Everyone is an ancestor of themselves (in the trivial sense).)
A negated goal : 0 positive literals, at least 1 negative literal. In virtually all implementations of Horn clause logic, the negated goal is the negation of the statement to be proved; the knowledge base consists entirely of facts and goals. The statement to be proven, therefore, called the goal, is therefore a single unit or the conjuction of units; an existentially quantified variable in the goal turns into a free variable in the negated goal. E.g. If the goal to be proven is "exists (X) male(X) ^ ancestor(elizabeth,X)" (show that there exists a male descendent of Elizabeth) the negated goal will be "~male(X) V ~ancestor(elizabeth,X)".
The null clause: 0 positive and 0 negative literals. Appears only as the end of a resolution proof

OR
A Horn clause is a clause with at most one expression on the left of the arrow. The expression on the left of the arrow (if there is one) is called the head of the clause. The expression(s) to the right of the arrow (if there are any) make up the body of the clause. The four possible types of Horn clause are conventionally named as follows.
1.Facts
Clauses of the form A¬ . (Facts have a head but no body.)
2.Rules
Clauses of the form A¬ B1,...,Bn. (Rules have both a head and a body.)
3Goals
Clauses of the form ¬ B1,...,Bn . (Goals have a body, but no head.)
4.Empty Clause
The clause \Box, with no head and no body.

Monday, October 6, 2008

converting FOL to Clause Form

Converting FOL Sentences to Clause Form
Every FOL sentence can be converted to a logically equivalent sentence that is in a "normal form" called clause form
Steps to convert a sentence to clause form:
1.Eliminate all <=> connectives by replacing each instance of the form (P <=> Q) by the equivalent expression ((P => Q) ^ (Q => P))
2Eliminate all => connectives by replacing each instance of the form (P => Q) by (~P v Q)
3Reduce the scope of each negation symbol to a single predicate by applying equivalences such as converting ~~P to P; ~(P v Q) to ~P ^ ~Q; ~(P ^ Q) to ~P v ~Q; ~(Ax)P to (Ex)~P, and ~(Ex)P to (Ax)~P
4.Standardize variables: rename all variables so that each quantifier has its own unique variable name. For example, convert (Ax)P(x) to (Ay)P(y) if there is another place where variable x is already used.
5Eliminate existential quantification by introducing Skolem functions. For example, convert (Ex)P(x) to P(c) where c is a brand new constant symbol that is not used in any other sentence. c is called a Skolem constant. More generally, if the existential quantifier is within the scope of a universal quantified variable, then introduce a Skolem function that depend on the universally quantified variable. For example, (Ax)(Ey)P(x,y) is converted to (Ax)P(x, f(x)). f is called a Skolem function, and must be a brand new function name that does not occur in any other sentence in the entire KB.
Example: (Ax)(Ey)loves(x,y) is converted to (Ax)loves(x,f(x)) where in this case f(x) specifies the person that x loves. (If we knew that everyone loved their mother, then f could stand for the mother-of function.
Remove universal quantification symbols by first moving them all to the left end and making the scope of each the entire sentence, and then just dropping the "prefix" part. For example, convert (Ax)P(x) to P(x).
Distribute "and" over "or" to get a conjunction of disjunctions called conjunctive normal form.
Convert (P ^ Q) v R to (P v R) ^ (Q v R), and convert (P v Q) v R to (P v Q v R).
Split each conjunct into a separate clause, which is just a disjunction ("or") of negated and un-negated predicates, called literals.
Standardize variables apart again so that each clause contains variable names that do not occur in any other clause.
Example
Convert the sentence (Ax)(P(x) => ((Ay)(P(y) => P(f(x,y))) ^ ~(Ay)(Q(x,y) => P(y))))
Eliminate <=>Nothing to do here.
Eliminate =>(Ax)(~P(x) v ((Ay)(~P(y) v P(f(x,y))) ^ ~(Ay)(~Q(x,y) v P(y))))
Reduce scope of negation(Ax)(~P(x) v ((Ay)(~P(y) v P(f(x,y))) ^ (Ey)(Q(x,y) ^ ~P(y))))
Standardize variables(Ax)(~P(x) v ((Ay)(~P(y) v P(f(x,y))) ^ (Ez)(Q(x,z) ^ ~P(z))))
Eliminate existential quantification(Ax)(~P(x) v ((Ay)(~P(y) v P(f(x,y))) ^ (Q(x,g(x)) ^ ~P(g(x)))))
Drop universal quantification symbols(~P(x) v ((~P(y) v P(f(x,y))) ^ (Q(x,g(x)) ^ ~P(g(x)))))
Convert to conjunction of disjunctions(~P(x) v ~P(y) v P(f(x,y))) ^ (~P(x) v Q(x,g(x))) ^ (~P(x) v ~P(g(x)))
Create separate clauses
~P(x) v ~P(y) v P(f(x,y))
~P(x) v Q(x,g(x))
~P(x) v ~P(g(x))
Standardize variables
~P(x) v ~P(y) v P(f(x,y))
~P(z) v Q(z,g(z))
~P(w) v ~P(g(w))