Você está na página 1de 6

Chapter I

Propositions and Connectives


(Part I)
Introduction
Logic and mathematical reasoning has numerous applications in computer
science. Rules in logic are used in the design of computer circuits, the
development of computer programs, the verification of correctness of
programs, and many other ways.
Logic - Definition

Science of necessary inference


Study of reasoning
Specifically concerned with whether reasoning is correct
Focuses on the relationship of statement and not in individual
statement

Some applications of Logic in Information Technology

Design of computer circuits


Construction of computer programs
Verification of the correctness of programs

Two types of logic:

Propositional logic
Predicate logic

Proposition and Theorem

The term proposition is a declarative statement which is either true


or false.

A theorem is a proposition which has been proved to be true about a


mathematical system.

Propositional Logic

The area of logic that deals with propositions.

Is a statement of language that formulates something about an


external world.

The bases for propositional logic are the three laws of Aristotelian
Logic. These are:
o Law of Identity A thing itself
o Law of Excluded Middle A statement is either true or false but
not both
o Law of Non-Contradiction No statement is both true and false

Goals for propositional logic:


Study the ways of combining propositions to form new propositions and to
determine under what circumstances these new compound propositions are
true.
Notations:

Lowercase letters starting from p and continuing as needed represent


propositions.

Lowercase letters representing propositions are called propositional


variables.

Examples:
p: Christianity is a lifestyle
3 is an odd integer.
Quezon city was once the capital of the Philippines.
12 / 4 = 3.
Which of the following are not Propositions?

Who are you talking to?

Read this sentence carefully.

X+4=7

U+V=W

Answer:

Sentences 1 and 2 are not propositions because they are not


declarative sentences.

Sentences 3 and 4 are not propositions because they are neither true
nor false.

An Acceptable proposition is given the decision value true ( or 1), while


an unacceptable statement is assigned a decision value false (or 0).

An array of decision value (truth value) is called a logical matrix (or


truth table).

Notations:

Lowercase letters starting from p and continuing as needed represent


propositions.

Lowercase letters representing propositions are called propositional


variables.

Connectives
Many mathematical statements are constructed by combining one or more
propositions. These new propositions are formed from existing propositions
using logical operators. The logical operators that are used to form new
propositions from two or more existing propositions are called connectives.
Terms and Symbols
A simple statement is one that does not contain any other statement as a
part. We will use the lower-case letters, p, q, r, ..., as symbols for simple
statements.
A compound statement is one with two or more simple statements as
parts or known as components. A component of a compound is any whole
statement that is part of a larger statement; components may themselves be
compounds.
An operator (or connective) joins simple statements into compounds, and
joins compounds into larger compounds.

Conjunction
Negation
Disjunction
Implication
Equivalence

( And)
(Not)
(Or)
(Tautology)
== / =
(Equal)

The AND ( ^ ) connective

It is a proposition that is true when both p and q are true and is false
otherwise.

Propositions connected by the symbol ^ are called conjunctions.


Example:
p: A mouse is an input device
q: A printer is an output device
p ^ q: A mouse is an input device and a printer is an output
device.
Example
Consider the following statements:
p: 3 divides 9.
q: 3 divides 15.
p^ q: 3 divides 9 and 3 divides 15. Or 3 divides both 9 and 15.
e.g: conjunction Truth Table
p

p^q

T
T
F
F

T
F
T
F

T
F
F
F

The OR ( V ) Connector

A proposition that is false when both p and q are false and true
otherwise.

These are propositions connected by the symbol V are called


disjunctions.

Example:

Let:
p: students who have not taken algebra can take Discrete
Mathematics.
q: students who have taken computer science can take Discrete
Mathematics.
p v q: students who have taken algebra or computer science, but
not both, can take discrete mathematics.
e.g. disjunction truth table
p

pVq

T
T
F
F

T
F
T
F

T
T
T
F

The NOT Connector( )

Another proposition that is denoted by p.

The proposition p is read as not p.


Example:
The negation of the proposition
5 is positive is It is not the case that 5 is positive.
5 is not positive.
The truth table for the negation of a proposition:
p
T
F

p
F
T

* Negation of a proposition
Unary Operation
denoted by:

Truth Table

A truth table provides the definition for connectives of propositional


logic
Steps on creating Truth Table
1. Assign one column for each propositional variables and the
resulting proposition.
2.
Determine the number of rows by the formula: R = 2 n
3. Where R the no. of rows

N the no. of variables


4. From the rightmost propositional variable assign alternating
values of true and false in increment of power of 2 for each
column.
End of presentation. Thank you!
Prepared by:
Kristine Grace B. Estilo
Course Facilitator Discrete Structures
College of Engineering and Computing Sciences

Você também pode gostar