Representation in prolog - logic programs, Computer Engineering

Assignment Help:

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.


Related Discussions:- Representation in prolog - logic programs

Ai applications, AI Applications Search is a crucial component of an AI...

AI Applications Search is a crucial component of an AI system, and the search functions are performed over large quantities of difficult structured data using unstructured inpu

Explain handle graphics in matlab, This is the MATLAB graphics system. It c...

This is the MATLAB graphics system. It contains high-level commands for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation grap

Differences between datagrid and datalist, Differences between Datagrid, Da...

Differences between Datagrid, Datalist and Repeater?   1. Datagrid has paging while Datalist doesnt. 2. Datalist has a property known as repeat. Direction = vertical/horizon

Operation research, how to implement a modified distribution method using c...

how to implement a modified distribution method using c/c++

How a physical addressing is performed in wan, How physical addressing is p...

How physical addressing is performed in WAN? WAN networks operate as similar to a LAN. All WAN technology classifies the exact frame format a computer uses while sending and re

Risks by customer perspective in electronic payment system, What are the ri...

What are the risks by customer's perspective in Electronic Payment Systems? Risks within Electronic Payment Systems: Through the customer's perspective are as follows:

Explain how presentation layer helps in establishing, Explain how presentat...

Explain how presentation layer helps in establishing and processing data in End to End layers. The idea of the presentation layer is to stand for information to the communicati

Show the process management for parallel virtual machine, Q. Show the Proce...

Q. Show the Process Management for parallel virtual machine? Process Management  int pvm_mytid( void ) Returns the tid of the calling process. Tid values les

A global variable is a variable, A global variable is a variable A globa...

A global variable is a variable A global variable is declared outside the body of each function.

Process of breadth first search, Process of Breadth first search: It's...

Process of Breadth first search: It's very useful to think of this search as the evolution of the given tree, and how each string of letters of word is found via the search in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd