Logic programs, Computer Engineering

Assignment Help:

Logic Programs:

A subset of first order logic is "Logic programs". However logic program having a set of Horn clauses that are implication conjectures when there is a conjunction of literals that imply a single literal. Thus a logic program consists of implications that look like this example as:

\/X, Y, Z ( b1(X,Y) ^ b2(X)^ ... ^ bn(X,Y,Z) → h(X,Y))

So remember also that there in Prolog we have turn the implication around by which the implication sign points from left to right and then the head of the clause comes first. However we also assume universal quantification over all our literals but that can be removed.

Thus we can write Horn clauses as:

h(x,y) ← b1(X,Y) ^ b2(X) ^ ... ^ bn(X,Y,Z)

So there everybody understands what we are saying. And in fact we will adopt the convention of writing a conjunction of literals with a capital letter or a single literal with a lower case letter also. Although if we were interested in the first literal in the body of the above Horn clause or not interested in the others so then we could write as:

h(X,Y) ← b1, B

However we see that the conjunction of literals b2(X)^ ... ^ bn(X,Y,Z) has been replaced by B so we have utilised a comma instead of a sign.


Related Discussions:- Logic programs

Numbers square, Your professor wants you to fill a two-dimensional N by N m...

Your professor wants you to fill a two-dimensional N by N matrix with some numbers by following a specific pattern. According to his explanation as in the figure below, you have to

What is macro call, What is macro call? Explain. Macro call: While a...

What is macro call? Explain. Macro call: While a macro name is used along with a set of actual parameters this is replaced through a code generated from its body. Such code

Which scheduling in cpu is allocate for least cpu-burst time, The schedulin...

The scheduling in which CPU is allocated to the process with least CPU-burst time is called? Ans. Shortest job first Scheduling wherein CPU is allocated to the process with lea

Calculate blocking probability in a two stage network, In a two stage netwo...

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: Blocking probability Given: N =M =512,

Indian standard code for information interchange, The ISCII is an 8-bit cod...

The ISCII is an 8-bit code which contains standard ASCII values till 127 from 128-225 it contains characters necessary in ten Brahmi-based Indian scripts. It is defined in IS 13194

Regular expression pattern in a wsdl document, Probelm: (a) Show the at...

Probelm: (a) Show the attributes used by Regular Expression Pattern in a WSDL document. (b) Describe the three standard wire formats for transmitting Web Service requests a

Nor gate, The NOR gate. The NOR gate is equivalent to an OR gate follow...

The NOR gate. The NOR gate is equivalent to an OR gate followed by a NOT gate so that the output is at logic level 0 when any of the inputs are high otherwise it is at logic le

Flip flop., the counter shown Q2Q1Q0=000 The status of Q2Q1Q0 after the pul...

the counter shown Q2Q1Q0=000 The status of Q2Q1Q0 after the pulse

Asp and asp.net apps run at the same time on the same server, How would ASP...

How would ASP and ASP.NET apps run at the same time on the same server? Both ASP and ASP.net can be run at similar server, becuase IIS has the capability to respond/serve both

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