Logics are something

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.


Logics are something which we do not implement in solving our problems; rather it is used to explain the concept or reasoning of the problem. Logics are used in the most intellectual activities.

Logic was defined by Averroes as "the tool for distinguishing between the true and the false". A machine works on facts; it uses the logic behind the problem and produces the answer.


Basically there are two types of logic, propositional and predicate logic. Propositional logic is concerned about the statements and their connectivity in terms of logical reasoning. Predicate logic is concerned with the individual and its properties. It refers to an individual statement and links it with its properties.


Logic can be defined as the art or system of reasoning.

Logic is a formal language that includes:

  • Syntax - rules for writing legal sentences
  • Semantics - meaning of those sentences (facts)
  • Proof - rules for inferring sentences from other sentences


Logical theories in AI are independent from implementations. They can be used to provide insights into the reasoning problem without directly informing the implementation. Direct implementations of ideas from logic like theorem-proving and model-construction techniques are used in AI, but the AI theorists who rely on logic to model their problem areas are free to use other implementation techniques as well.

Thus the uses of logic in AI can be as:

  • a tool of analysis
  • a basis for knowledge representation
  • a programming language.

Logic can be represented in two major forms:

  • Propositional
  • Predicate


It is the study of the statements and their connectivity structure.

Propositions are atomic sentences - which cannot be decomposed further. When logical connectors are used with propositions, we get well formed formulas which can be used to prove statements or infer from other statements. Propositional logic deals with the determination of the truth of a sentence.

In propositional logic we define:

  1. Truth table - truth table give the logical relationship between two or more statements. We can explain the functions of truth table with the help of logic gates. Ex - representation of the statement - ((P V H) " not(H) => P in truth table is as follows :
  2. Logical equivalence - when two statements have the same truth table values than they are said to be logically equivalent.
  3. Tautologies - there are those in which all the statements are true. Ex - "Sun is a star and Earth is a planet".
  4. Contradictions - in this all the values of truth table are false. Ex - "Sun is a planet and Earth is a star".

However, many kinds of inference cannot be formalised in propositional logic. Ex - general statements like "All men are mortal" cannot be represented in the form of this type of logic.


Logical connectors are used to combine statements. Each connector has its symbol. The symbols and their corresponding meanings are:

  1. negation meaning "not"
  2. conjunction meaning "inclusive or"
  3. disjunction meaning "and"
  4. implication meaning "if - then"
  5. equivalence or bi-implication (iff) meaning "if and only if"

The propositional formulas are built upon these elements only and are called wee formed formulas. If A and B are sentences, then the various connectors are used as:

  • A is true when A is false, and is false when A is true.
  • A?B is false when both A and B are false, and is true otherwise.
  • A^B is true when both A and B are true, and is false otherwise.
  • A?B is false when A is true and B is false, and is true otherwise.
  • A?B is true when both A and B are true, true when both A and B are false, and false otherwise.


Atomic sentences can either be true or be false. The truth value of the formula can be determined by the truth values of the atomic sentences that constitute the formula. In other words, the meaning of the propositional formula (well formed formula) is defined by the semantics.

Each logical connector is defined by a truth table. After determining each atomic statement to be true or false, a truth table can be used to compute the truth value of any formula.


Predicate logic is the study of the individual and their properties. The most simple sentences can be represented in terms of logical formulae in which a predicate is applied to one or more arguments. In predicates, the statements are:

  • Related in specific ways
  • Predicate name identifies the relationship

A method that is used extensively in application of predicate logics in artificial intelligence programs has a machine based inference procedure called resolution. This method makes it simpler to represent knowledge, general and expert, in terms of set of axioms expressed in a special form of formulae and then derive the result from these axioms.

However, many statements are ambiguous and there is always a choice as to how to represent the statement. Ex - "Amit like to watch sports". This statement is ambiguous as many things are not stated in this statement like - which sport does Amit likes to watch whether cricket, football, etc and where does he like to watch the sports whether on TV or stadium.


The statement in predicate logic contains:

  • Objects - the individual
  • Predicates - the property of the individual
  • Quantifiers - the expression of a quantity

Quantifiers are of two types:

  • Universal quantifier - For all (?)
  • Existential quantifier - There exists (?)


Semantics for predicate logic can be defined as:

  • How we interpret sentences
  • How we translate between the two languages
  • How we tell the truth of a sentence


Resolution is a procedure that is used for predicate logic for proof. This method can be easily automated for machines to prove a statement based on set of other statements that are related. The steps followed in proving a method by resolution is:

  1. Negate all the sentences that are given as facts.
  2. Convert all facts to predicate logic statements.
  3. Convert statements to conjunctive normal form or clause form.
  4. Apply resolution (A Ú B) Ù ¬B ? A

Steps to convert the statements into Conjunctive normal form are:

  1. Eliminate the ? connective.
  2. Eliminate the ? connective.
  3. The negation symbols have to be moved inside the brackets.
  4. The variable names are standardised such that each quantifier has its unique name.
  5. Move all the quantifiers to left of statement.
  6. Remove existential quantifiers.
  7. Eliminate universal quantifiers.
  8. Convert to conjunctions of disjunctions (CNF).
  9. Flatten nested conjunctions and disjunctions.

In conjunctive normal form, a literal is a propositional variable or a negation. A clause is a disjunction of literals. A sentence written as conjunction of clauses is said to be in Conjunctive normal form.

A contradiction was derived from the given statements and the negation of the goal. Since the given statements are assumed to be true, the contradiction must arise from negating the goal.


The following example represents all the matter studied in this paper.


  1. Bill likes all kinds of food
  2. Anything that anyone eats and is not killed by is food.
  3. If a person is alive, then that person has not been killed.
  4. Bill eats peanuts and is still alive.
  5. To prove:

    Bill likes peanuts.

    Negate goal, add to given statements

  6. Bill does NOT like peanuts.

Translate statements to predicate calculus:

  1. "x { Food(x) ? Likes(Bill, x) }
  2. "y { ?x { Eats(x, y) ^ ¬ KilledBy(x, y)) ? Food(y) }
  3. "x {Alive(x) ? ¬?y {KilledBy(x,y) } }
  4. Eats (Bill, peanuts) ^ Alive (Bill)
  5. Likes (Bill, peanuts)

Convert to CNF:

  1. Food(X1) ? Likes (Bill, X1)
  2. Eats(X2, Y2) ? KilledBy(X2, Y2) ? Food (Y2)
  3. Alive(X3) ? ¬KilledBy(X3, Y3)
  4. Eats (Bill, peanuts)
  5. Alive (Bill)
  6. Likes (Bill, peanuts)
  7. Proceed with resolution - try to derive contradiction:

  8. Food (peanuts)
  9. Eats(X2, peanuts) ? KilledBy(X2, peanuts)
  10. KilledBy (Bill, peanuts)
  11. Alive (Bill)
  12. NIL

Hence the statement "Bill likes peanuts is true".


  1. Wikipedia.com
  2. Artificial Intelligence by rich and knight
  3. Cs.bham.ac.uk
  4. Google search