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

Determine about the verilog task, Determine about the Verilog Task - Ta...

Determine about the Verilog Task - Tasks are capable of enabling a function as well as enabling other versions of a Task. - Tasks also run with a zero simulation however the

Maximum depth to crawl, Goals of this assignment: understanding networking ...

Goals of this assignment: understanding networking and client server systems. In this assignment, you will write a simple http web server that handles conjunctive search queries (l

Assignment for statical natural language processing, Hi I study master of ...

Hi I study master of computer science I have assignment for subject statical natural language processing . I need solved due date on 6 May2014 at 11 pm Australia time I need yo

State the example of begin end, State the Example of begin end module s...

State the Example of begin end module sequential(); reg a; initial begin $monitor ("‰g a = ‰b", $time, a); #10 a = 0; #11 a = 1; #12 a = 0; #13 a = 1; #

Database management subsystem, (a) Explain, using suitable examples, the fu...

(a) Explain, using suitable examples, the functions of each of the sub system mentioned in the context of a large chain of supermarkets (i) Database Management Subsystem (ii)

Explain overlay structured program, Explain overlay structured program ? ...

Explain overlay structured program ? A program having overlays is termed as overlay structured program, here an overlay is a part of program that has similar load origin as som

Programming in c, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Determine the applications of recursion theorem, Applications of recursion ...

Applications of recursion theorem?  1.  ATM is undecidble.  2.  Fixed point theorem.  3. MINTM is not Turing recognisable

Define target _blank, TARGET = "_blank" "_blank" opens new document in...

TARGET = "_blank" "_blank" opens new document in a new window. Run the code given in Figure and check how it works. This value doesn't require the use of any frames. "_blank"

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