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
When Workday opened in 2005, the company had no idea it would be regarded as the most successful IPO of 2012. The introduction of cloud computing into the HR and financial systems

Q. Illustrate Character Coded Data? The input output happens in the form of ASCII data. These ASCII characters are entered as a string of data. For illustration to get two numb

What is called static and dynamic branch prediction? The branch prediction decision is always the similar every time a given instruction is implemented. Any approach that has t

Local minima - sigmoid units: Alternatively in addition to getting over some local minima where the gradient is constant in one direction or adding momentum will increase the

Define the meaning of Registers and Counting? Registers: Group of flip-flops use for data storage. Counting: Another extremely important application of flip-flops is in dig

Explain simple telephone communication system with circuit and equation of current flow in microphone? Simple Telephone Communication: In the simplest type of a telephone cir

Analysis and design form the basis on any significant software artifact. Analysis is critical in terms of making sure that the final artifact actually meets user requirements (ie b

What are the registers generally contained in the processor? MAR-memory address register MDR-memory data register IR-Instruction Register RO-Rn-General purpose registe

write alp to perform bcd addition without using procedure

Determine the features of keyboards Common features on general-purpose keyboards are cursor-control keys. Functions keys are used to enter frequently used operations in a singl