ELEMENTARY LOGIC AND ITS NOTATION - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

ELEMENTARY LOGIC AND ITS NOTATION

Description:

– PowerPoint PPT presentation

Number of Views:153
Avg rating:3.0/5.0
Slides: 26
Provided by: csc29
Category:

less

Transcript and Presenter's Notes

Title: ELEMENTARY LOGIC AND ITS NOTATION


1
ELEMENTARY LOGIC AND ITS NOTATION   Logic
involves the meaning and relationships between
propositions. A proposition is a declarative
sentence that is either true or false. Questions
and exclamations are not propositions. i.e., the
following are not propositions Be quiet so I
can start the class! Professor Boesch have you
ever watched the Sopranos?   From simple
propositions p and q we can form several compound
propositions and we need to know the rules of
deciding when the compound proposition is True or
False. A compound proposition is and
(conjunction) with symbol ?. Another one is or
(disjunction) with symbol ?. They are defined
precisely by using truth tables as follows
2
  • Note that this "or" is an inclusive or. English
    is ambiguous as the statement "dinner comes with
    soup or salad" usually means the exclusive "or",
    i.e., you do not get both.

3
  • The statement If it starts to rain, then I will
    close the window together with the question
    Does it make me a liar if I close the window
    because it has become very cold, but it is not
    raining? should convince us that we need to
    understand the definition of a conditional (or
    implication.) Most people would agree that this
    cold weather action does not contradict the
    original statement, and indeed it does not.
  • The fact is that it does not matter what I do
    when it does NOT rain -- I only made a promise of
    what I would do when it rains.  

4
If it starts to rain, then I will close the
window
5
Equivalent terminology If p then q, or p is
sufficient for q, or q is necessary for
pClearly from this example the following are
equivalent(i) If it starts to rain, then I
will close the window (ii) If I did not
close the window, then it is not raining .
 Formally we define q ? p as the
contrapositive of p ? q , where the symbol p
means the negation of p. We also note that an
examination of the truth tables for a statement
and its contrapositive gives the generalization
of, (i) and (ii) above being the same, namely
( p ? q ) ? ( q ? p ) Where of course
? means the items on either side of the symbol
have the same truth values i.e. they are either
both false or both true.
6
(No Transcript)
7
So when the compound proposition is always true
we call it a tautology. Besides the
contrapositive of p ? q there are 2 other similar
but not equivalent implications namely the
inverse, which is p ? q, and the converse,
which is q ? p. Another tautology that is easily
verified by a truth table is ( p ? q ) ? ( p ?
q ). The right hand side of this tautology is
easy to understand as it says that when p is F it
does not matter what q is since T ? "anything"
is T, but if p is T q must be true for p ? q
to be T.
8
QUANTIFIERS Often a statement depends on a
variable, we denote this as p(x), e.g. the
square root of a real number exists if it is
non-negative means Let x be any real number.
The statement in quotes is a proposition that is
the function p(x) x 0 ?x exists .
These are also called predicates. The validity
of p(x) has two important special casesFOR ALL
x p(x) , which is written ?x p(x) or FOR SOME
x p(x), written ?x p(x) e.g. ?x x gt 0
is true but ?x x gt 0 is not true. And
?x x2 0 is true In general ?x p(x) ? ?x
p(x) BUT NOT VICE VERSA Also ?x p(x)
? ?x p(x) and ?x p(x) ?
?x p(x) e.g. Not all x gt 0 ? some x 0
and Not some x2 lt 0 ? all x2 0
9
example 9 on page 31.
10
example 19 on page 38.
11
example 20 on page 38.
12
We prove this in the following truth table
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
Example 4 p57 It is below freezing and raining.
Thus it is below freezing
Simplification
Example 9 p60 Given (1) (p ? q) ? r (2) r ?
sIs p ? s a valid conclusion?Answer Either r
is T or (p ? q) is T.In the r is T case, we can
use (2) to decide that s is T. Hence p ? s is
T.In the (p ? q) is T case, we know that p is T.
Hence p ? s is T.
17
Discuss Example 29Every integer x is the sum
of squares of 3 integers. This will be true for
x lt 7, but not x7, as only possible squares less
than 7 are 0,1, 4. Now consider any 3 terms
abc where a, b, and c must be either 0,1, or 4
and we will see this is impossible by the
followingThe 3 term sum must have at least one
4 as the maximum possible sum that does not use a
4 is 3. Furthermore it can only have one 4, and
this will not work as the other 2 terms add up to
at most 2.
18
Discuss Example 31. What is wrong? 1) a b
Given2) a2
ab multiply 1) by a3) a2- b2 ab -
b2 substract b24) (a-b)(ab) b(a-b)
factor5)ab b divide
by (a-b)6) 2b b from 17) 2 1 Divide
by b
The problem is step 5) where we divide by 0
19
Problem 11 p74a) All students in this class
understand logic. X is a student in this class.
Therefore X understands logic
Correct as ?x p(x) ? ?x p(x)
b) Every comp. sci. major takes discrete math.N
is taking discrete math. Thus N is a comp. sci.
major
Incorrect as this is the converse
c) All parrots like fruit. My bird is not a
parrot. Thus my bird does not like fruit
Incorrect why?
d) Everyone who eats granola is healthy. Linda is
not healthy. Thus Linda does not eat granola
Correct as ?x p(x) ? ?x p(x)
20
Problem 14 p75 a) If x2 is irrational then x is
irrational. Thus if x is irrational x2 is
irrational
Invalid reasoning and also a false fact
b) If x2 is irrational then x is irrational. x2
p2 is irrational, thus x is irrational.
Valid reasoning and a true fact. Note that there
is a typo in the book.
21
Problem 15 p75 H(x) is x is happy. Given ?x
H(x). Conclude H(Lola) Thus Lola happy. What is
wrong?
Could be ?x H(x) only true for x Mary
22
Problem 46 p7 Is this correct?
Answer NO. We showed that if a solution exists
then it is 1 or 1. The steps are not reversible
as they involve taking a square root.Thus we need
to substitute these values to show solutions
exist.
23
Sets We assume you know the elementary concepts
of union ? and intersection ?, as well as the
difference between being an element of a set ? or
a subset ? of a set. 2 other concepts P(A), the
power set of A, is the set of all subsets of
A.A?B, the Cartesian product of A B, is
(a,b) a?A ? b?B
24
Higher order Cartesian Products are defined
similarly,i.e., A?B ?C is (a,b,c) a?A ? b?B
? c?C
  • Problem 7, p85 True or False
  • 0?f, b) f?0, c) 0 ? f
  • d)f?0 e)0?0, f) )0?0,
  • g) f ? f

Answers a)F,b)F,c)F,d)T,e)F,f)F,g)T
25
Problem 17 a) c), p85 How many elements do the
following sets havea) P(a,b,a,b),
c)P(P(f))
Answers a)8 23 as the set a,b,a,b has 3
elements which we represent with 3 boxes
each subset is found by putting a 0, or a 1 in
the box to represent including or excluding the
corresponding element. c)2 as P(f)f, P(f)
f,f
Write a Comment
User Comments (0)
About PowerShow.com