Beruflich Dokumente
Kultur Dokumente
Structure
Wednesday 6.45 pm to 9.45pm
Foundations
Logic
Sets and
Functions
Logic
Rules of Logic :
Logic
Proposition:
A declarative statement
(ie) either true or false
Example: 1+1 = 2 ; 7-1 = 6;
Capital of Pakistan is Islamabad
Capital of UAE is Dubai; 5+2 = 8
Note: The first three statements are True the
last two are false.
Logic
Consider the following sentences
Logic
Area of logic that deals with propositions is
Logic
Some instances of propositions and their
representations:
It is raining to day
Say p : raining to day
Opposite of this statement (negation)
It is not the case that it is raining to day
Symbolized as ~p
Logic
Today is Friday
negation of this statement
It is not the case that today is Friday
or simply
Today is not Friday
Logic
Connectives
Conjunction
Examples: Its raining today and college declared
holiday
Two ideas: raining ; holiday connected by
conjunction and
Symbolically:
Raining = r ; holiday = h
then can be symbolized as
r^h
Logic
p^q
Logic
Connectives
Disjunction
Example:
Get me cool drink or water
cvw
Logic
pvq
Negation :
Truth table
p
Implications
Implications: Conditional Statements
If it rains then its a holiday
Two ideas: raining = p ; holiday = q
(ie) p implies q
symbolizing
pq
If p then q
If p then q
If p,q
p is sufficient for q
q if p
q when p
a necessary condition for p is q
p implies q
p only if q
a sufficient condition for q is p
q whenever p
q is necessary for p
q follows from p
Logic
Truth table:
p
pq
Logic
If p then q
Converse
Contra positive
Inverse
pq
q p
~ q ~ p
~ p ~ q
Logic
Home team wins whenever it is raining
If it is raining then the home team wins
Converse
Contra positive
Inverse
Logic
Bi conditional
pq
p if and only if q
Truth Table
p
T
T
F
F
q
T
F
T
F
pq
T
F
F
T
Logic: Precedence
Like in arithmetic it important
to put :
Logic
Example: Precedence of logical operators
a c ~ f
Logic
Example: Precedence of logical operators
q ~ p
pvq
~p
pq
Solution
pvq
~p
pq
Boolean Searches
Search university in new Mexico
Logic Puzzles
In an island that has two kinds of inhabitants,
Logic Puzzles
In a flight crew, the position of pilot, copilot