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

What are attributes, What are Attributes?  Attributes are declarative ...

What are Attributes?  Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Pred

Discuss the advantages of electronics data exchange, Discuss the advantages...

Discuss the advantages of Electronics Data Exchange (EDI). Advantages of EDI: Electronics Data Exchange's saves needless re-capture of data. It leads to faster transfer of d

The events of an aspx page execute, In what order do the events of an ASPX ...

In what order do the events of an ASPX page execute. As a developer is it important to understand these events?   If you try to access it in Page_Load that is way previous th

What is serial mouse, Q. What is Serial Mouse? Mice that use standard s...

Q. What is Serial Mouse? Mice that use standard serial port are known as 'serial'. Because Serial ports 1 and 4 (COM1, COM4 under DOS, /dev/ttyS0 and /dev/ttyS3 under Unix/GNU-

Technical Support Engineer, I''m seeking a challenging professional working...

I''m seeking a challenging professional working position in the field of Information Technology,where I’ll be given the chance to enhance & expand the skills & experience

Calculate the switching elements in a two stage network, In a two stage ne...

In a two stage network there are 512 inlets and outlets, r=s=24. If the probability that a given inlet is active is 0.8, calculate: the switching elements Given: N =M =512,

What is .net and .net framework, What is .NET / .NET Framework?  It i...

What is .NET / .NET Framework?  It is a Framework in which Windows applications might be developed and run. The Microsoft .NET Framework is a platform for building, deploying,

What are set up time and hold time constraints, What are set up time and ho...

What are set up time and hold time constraints? What do they mean? Which one is crucial for establishing maximum clock frequency of a circuit? Set up time is the amount of time

Explain ai applications, AI Applications Search is a important elemen...

AI Applications Search is a important element of an AI system, and search functions are executed on huge quantities of complicated structured data by means of unstructured 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