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
Design two matlab algorithms for enlarging the 256x256 images into 512x512 images by using bilinear and bicubic interpolations   a)  Evaluate the interpolated images with the

Q. What is Indirect Addressing Mode explain? Indirect Addressing Mode In the indirect addressing modes operands employ registers to point to locations in memory. So it is

Write down the drawback of top down parsing of backtracking. Following are disadvantages of top down parsing of backtracking: (i) Semantic actions can't be performed whereas

Synchronized with a clock signal Memory system considerations Speed Cost Size of chip Power dissipation Memory controller Refresh Overhead

Easter Island is a small island (about 150 square miles in area) in the Pacific Ocean about 2,000 miles from South America. In about 400 AD there was a small population of settlers

Fingerprint- Biometric computer security systems First of all, fingerprint is the most commonly used biometric technology, because every person has unique fingerprints and the

Illustrate about the Word processors with its design Word processors now have many aspects over and above the original task of generating a typed document. This section would

What is low-level formatting?  Before a disk can store data, it must be divided into sectors that the disk controller can read and write. This process is known as low-level for

Can SMTP be used as transfer protocol for Web pages? Why? SMTP is an easy mail transfer protocol. This uses ASCII text for all communications. SMTP needs reliable delivery- the

What is the maximum size of a database that can be opened in Microsoft Access? Ans) 1 Gigabyte