Representation in prolog - logic programs, Computer Engineering

Representation in Prolog - Logic Programs : Artificial intelligence

If we impose some more constraints on first order logic, then we get to a representation language known as logic programs. The major limitation we impose is that all the knowledge we want to encode is represented such as Horn clauses. These are implications which containa head anda body, where the predicates in the body are conjoined and they imply the single predicate in the head. Horn clauses are entirely quantified over all the variables appearing in them. So, an instance Horn clause looks like this:

∀x, y, z ( b1(x,y) ∧ b2(x) ∧ ... ∧ bn(x,y,z) -> h(x,y))

We see that the body contain of predicates bi and the head is h(x,y). We may make this look a lot more like the Prolog programs you are used to writing by making a few syntactic changes: firstly, we turn the implication around and write it as :- thus:

∀x, y, z (h(x,y) :- b1(x,y) ∧ b2(x) ... bn(x,y,z))

next, we change the symbols to commas.

∀x, y, z (h(x,y) :- b1(x,y), b2(x), ..., bn(x,y,z))

Lastly, we remove the universal quantification (it is assumed in Prolog), make the variables capital letters (Prolog requires this), and put a complete stop at the end:

h(X,Y) :- b1(X,Y), b2(X), ..., bn(X,Y,Z).

Note that we utilize the notation h/2 to indicate that predicate h has arity 2. Also, we call a set of Horn clauses  aslike a logic program. Representative knowledge with logic programs is less expressive than full first order logic, butstill it can express lots of types of information. In specific, disjunction can be gained by having different Horn clauses with the same head. So, this sentence in first -order logic:

∀x (a(x) ∨ b(x) -> c(x) ∧ d(x))

itcan be written as the following logic program:

c(x) :- a(x).

c(x) :- b(x).

d(x) :- a(x).

d(x) :- b(x).

We also permit ourselves to represent facts as atomic ground predicates. For instance, we can state that:

parent(georgedubya,georgesenior). colour(red). and so on.

Posted Date: 10/2/2012 7:15:25 AM | Location : United States







Related Discussions:- Representation in prolog - logic programs, Assignment Help, Ask Question on Representation in prolog - logic programs, Get Answer, Expert's Help, Representation in prolog - logic programs Discussions

Write discussion on Representation in prolog - logic programs
Your posts are moderated
Related Questions
Problem: (a) What are the two main advantages of sound? (b) UTMDigitlab ltd, specialized in digitizing sound, converts an audio stream of the latest album of Britney Spea

Real time (transaction) processing In real time (transaction) processing files are generally updated in real time (for example when booking flights on an airplane); however in

What is a union ? A union, like a structure, is a derived type. Unions follow the same syntax as structures but have members that share storage. A union type defines a set of alt

What are concentrators? Explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed. This is both unessential and expensive to g

What are the disadvantages of file processing system?

State the features of Pentium series of microprocessors: Pentium is a 32-bit superscalar, CISC microprocessor.  The term superscalar is used for processor that contains more th

Specify the goals of parsing. Goals: a. To check the validity of source string b. To agree on the syntactic structure of a source string. For invalid string this rep

The use of Information Technology (IT) is well known. IT has turn into a must for survival of all business houses with growing information technology trends. Computer is main compo

Cut-off Search: By using  a minimax search, all we have to do is program, in a game playing situation our agent to look at the whole  search tree from the current state of the

The binary equivalent of (FA) 16   is ? Ans. (FA) 16 = (11111010) 10