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

Read after write and write after write - data hazards, RAW  and WAW - Data ...

RAW  and WAW - Data hazards: RAW (read after write) - j tries to read a source before i writes it, hence j wrongly gets the old value .This is the most usual type of

Example of prolog, Example of Prolog: We can say that this is also tru...

Example of Prolog: We can say that this is also true if there are four even numbers. Now we have our first rule: • If there are three or four even numbered cards, such play

Determine the gray code for decimal number, Determine the equivalent Gr...

Determine the equivalent Gray code for decimal number 6 ? Ans. The equivalent Gray code for decimal number 6 is 0101 Because the Decimal number 6 is equivalent to binary nu

Minmax search - artificial intelligence, MinMax Search Parents frequent...

MinMax Search Parents frequently get two children to share a cake by asking one to cut the cake and the other to select which half they want to eat. In this two player cake-sco

What is trp, TRP is the number of clock cycles required to terminate access...

TRP is the number of clock cycles required to terminate access to an open row of memory, and open access to the next row. It stand for row precharge time.

What are value types and reference types, What are value types and referenc...

What are value types and reference types?  Value type - bool, byte, chat, decimal, double, enum, float, int, long, sbyte, short, strut, uint, ulong, ushort. Value types are sto

How to execute an instruction, Execution: Now instruction is ready for exec...

Execution: Now instruction is ready for execution. A different opcode will need different sequence of steps for execution. Hence let's discuss a few illustrations of execution of s

Ms access database to a present conversion, I have converted my MS Access d...

I have converted my MS Access database to a present conversion. I am getting conversion errors? Ans) Design specs have changed in new releases of MS Access. Visit the on-line

What is instruction cycle, What is Instruction Cycle A program residing...

What is Instruction Cycle A program residing in the memory unit of the computer having of a sequence of instructions.  The program is implemented in the computer by going throu

Why are interrupt masks provided in any processor, Why are interrupt masks ...

Why are interrupt masks provided in any processor? Interrupt mask enable the higher priority devices comes first and there for lower priority devices comes last. The interrupt

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