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

Differentiate between absolute and relative poverty, Question 1: Using ...

Question 1: Using appropriate diagrams, describe the optimal provision of a private good and a public good. Question 2: Using appropriate diagram, show how there is an

Why we need web browser, Q. why we need Web Browser? A Web browser is s...

Q. why we need Web Browser? A Web browser is software program which allows you to easily display Web pages and navigate the Web. The first graphical browser, Mosaic, was develo

Determine about the voice systems, Determine about the Voice Systems Sp...

Determine about the Voice Systems Speech recognizers are used in some graphics workstations as input devices to accept voice commands. The voice-system input can be used to ini

What is a cooperation model, What is A cooperation model A cooperation ...

What is A cooperation model A cooperation model defines the way interdependencies are established by cooperative interactions. We recognize two basic roles services can play: c

What is a table attribute, What is a Table attribute? The table's attr...

What is a Table attribute? The table's attributes verifies who is responsible for maintaining a table and which types of access are permitted for the table.  The most signific

Develop a menu-driven application, In assignment you are required extend th...

In assignment you are required extend the Patient class to implement an  Inpatient  class,  representing a patient who is admitted to the hospital for a longer term and who may req

What a header script can specify in cgi, A header in CGI script can specify...

A header in CGI script can specify? A header into CGI script can give format of document and New location of perticular the document.

COMPUTER SYSTEM, Classify computer systems according to capacity. How they ...

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

Explain significance of init() & destroy( ) method of applet, Explain the s...

Explain the significance of init() and destroy( ) methods of an applet? Also explain two ways of invoking an applet. The init( ) method is utilized for fundamental initializati

Explain latex in matlab, Matlab already handles naturally easy LaTeX encodi...

Matlab already handles naturally easy LaTeX encodings that permit introducing Greek lettters or modifying the font size and appearance in plots.

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