You are on page 1of 25

INTRODUCTION TO THEORY OF

CHANNNNGE COMPUTATION
Class Meeting: Monday 12.00 -2.00pm
Venue: E303
Final Examination: As directed by the University
Description: 3 credits, 30h(T); C.
• Objectives:
• At the end of this course, the emphasis is for the student
to be able to assimilate and to solve problems at any stages
of the stages of computer development: from just input
devices to more sophisticated devices we have today

• Prerequisites: CSC 306


• Administration of the course:
• The students are expected to attend all classes.

• An official written document stating why you are absent from any class or test
if per chance you are absent from the class.

• Hence a notice of such absences should be submitted in writing advance.

• An excused absence requires a written testament of illness or other


catastrophe from a physician or other official of the university.

Grading:
Grading will be based on class work, quizzes, Exams, Special Assignments/Design Projects and
the Final Examination according to the following scheme:
Continuous assessment 30%
Examinations 70%
Total 100%
Lecture Topics Assignments

1 Introduction And Revision Of Assignments 1


Basic Mathematic

2 Language Assignments 2
3 Introduction To Models Assignments 3
4 Introduction To Finite State Assignments 4
Machines
5 Translator And Transducer Assignments 5
6 Equivalence And Reduction Of Assignments 6
Finite State Machines

7 Non-Deterministic Finite State Assignments 7


Machines
8 Converting Non-Deterministic FSA To Assignments 8
a Reduced Deterministic FSA in
Standard Form
9 Classification Of Grammars Assignments 9
10 Context-Free Grammars Assignments 10
11 Introduction Turing machine Assignments 11
 
12 Pushdown Automata Assignments 12
 
13 Proof by induction Assignments 13
Churches thesis
Power relation
• Introduction And Revision Of Basic
Mathematic
• Propositions and Truth Functions

Definition: A proposition is a statement for


which it is meaningful to say that it is true or
false (but not both).

The truth value of a proposition p is T or F


according as the proposition is false or true.

• T = TRUE F = FALSE
• Compound Propositions
Compound propositions can be made up from simpler ones in such
a way that their truth value can be determined from those of
their constituents using truth tables.

These set out the truth value of compound statements based on


the truth values of their constituents.

Note that you don’t need to know what the statements are –
just whether they are true or false.

If p is TRUE and q is FALSE then “p and q” is FALSE while “p


or q” is TRUE.
• NOT, AND, OR
The simplest truth operator is “NOT” which only involves
one constituent. Its truth table is:
The truth tables for “AND” and “OR” are:
Notice that “p or q” is defined to be TRUE even when both are true.
Sometimes in everyday English we use “or” in an exclusive sense, but in
logic, and in mathematics, it always includes the possibility of both.
• In order to work at the level of the underlying logical
structure we denote primitive propositions (ones which are
not built up from simpler ones) by letters of the alphabet
just as in algebra we represent numbers by letters.

• The above three truth operators are denoted by special


symbols
−, ∧ , ∨ respectively.

−p denotes “not p”;


p ∧ q denotes “p and q”;
p ∨ q denotes “p or q”;
• Several variations are in common use

“not p” is often denoted by p' , ¬p

“p and q” is denoted by p.q and

“p or q” by p + q.
Implication
• very much misunderstood — implication. The
definition of “p implies q” is given by its truth table
• Notation: We denote “p implies q” by p → q. Sometimes
this is written as p ⇒ q or p ⊃ q.
• The problem with this definition is the third row which says that a false proposition
implies a true one

• In fact all it shows is that the technical definition of implication differs somewhat
from the ordinary sense of the word.

• In normal usage implication involves a causal connection.

• It might be the case that I’m wealthy and that I’m honest. In the ordinary sense
of the word we would not say however that “being wealthy implies that I am
honest”. Wealth does not cause honesty.

• However if both propositions are true for me then, in the sense of propositional
logic, “I am wealthy” implies “I am honest”.

• Because propositional logic deals with isolated propositions it cannot express the
notion of wealthy people always being honest (or its negation). That requires
“quantifiers”,
• Equivalence
• We say that p is (logically) equivalent to q if they have the same
truth value.
• It is denoted by “p is equivalent to q” and p ↔ q.
• Other notations in use are p ≡ q and p ⇔ q.
• This definition can be set out in a truth table:
Summary of Truth Operators
• Tautologies
• A tautology is a proposition built up from primitive propositions, which is
always true irrespective of the truth values of the constituent propositions.
• Tautologies are logical theorems.
For example
• “(p and q) implies (q and p)” doesn’t give us any information about the
statements p and q. Rather it tells us about the symmetry of the “and”
operator.

The following three propositions are tautologies:


• p↔p
• p → (p ∨ q)
• (p ∧ q) ↔ (q ∧ p)
But (p ∨ q) → (p ∧ q) is not a tautology.
Translating From English
• p → q might be expressed as:
if p then q
p implies q
q is implied by p
q, if p
p only if q
p is a sufficient condition for q
q is a necessary condition for p
• p ↔ q might be expressed as:
p is equivalent to q
p if and only if q (sometimes this is abbreviated to “p iff q”)
p is a necessary and sufficient condition for q

• p ∧ q might be expressed as:


p and q
not only p, but q

• p ∨ q might be expressed as:


p or q
unless p then q
p, unless q
at least one of p and q
• Laws of Logic
• Commutative Laws:
(1) p ∨ q ↔ q ∨ p
(2) p ∧ q ↔ q ∧ p
• Associative Laws:
(3) (p ∨ q) ∨ r ↔ p ∨ (q ∨ r)
(4) (p ∧ q) ∧ r ↔ p ∧ (q ∧ r)
• Distributive Laws:
(5) p ∧ (q ∨ r) ↔ (p ∧ q) ∨ (p ∧ r)
(6) p ∨ (q ∧ r) ↔ (p ∨ q) ∧ (p ∨ r)
• Idempotent Laws:
(7) p ∨ p ↔ p
(8) p ∧ p ↔ p
• De Morgan Laws:
(9) − (p ∨ q) ↔ −p ∧ −q
(10) − (p ∧ q) ↔ −p ∨ −q
• Miscellaneous Laws:
(11) p ∧ q → p
(12) p → p ∨ q
(13) − (−p) ↔ p
(14) p ∨ −p
(15) − (p ∧ −p)
• These last two assert that a proposition must either be true
or false but not both.
• Syllogism:

(16) (p → q) ∧ p → q
A syllogism is a logical argument of the form:
p→q
But p.
Therefore q.

• Proof by Contradiction:
(17) (p → q) ∧ −q → −p

• Transitive Property of Implication:


(18) (p → q) ∧ (q → r) → (p → r)
• Quantifiers
• A predicate is a statement that involves variables. Predicates become
propositions when particular objects (e.g. numbers) are substituted for the
variables.

• The resulting propositions have truth values that depend on those elements.
• An n-ary predicate is one which applies to a combination of n elements. Special
terms are unary if n = 1, binary if n = 2 and ternary if n = 3. A unary predicate
is what we usually think of as a property, such as “x is even” or “x is female”.

• We could write these symbolically as Ex for “x is even” and Fx for “x is female”.


There must be some underlying set over which the variables range.

• In the case of E it might be the set of integers and in the case of F it might be
the set of all students in a particular class.
• Thank you for listening
• Assignment 1

You might also like