+ All Categories
Home > Documents > Section Summary(1.6 1.8)

Section Summary(1.6 1.8)

Date post: 20-Mar-2022
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
45
Section Summary(1.6 – 1.8) 2021/9/9 CSE, NCHU 1 Valid Argument and Rules of Inferences Mathematical Proofs Direct Proofs: by Cases, Existence Proofs (Constructive or Nonconstructive) Indirect Proofs: Contrapositive, Contradiction, Counterexamples, Non-existence Proofs Fallacies of proofs Conjectures and Open Problems
Transcript

Section Summary(1.6 – 1.8)

2021/9/9 CSE, NCHU 1

◆Valid Argument and Rules of Inferences

◆Mathematical Proofs➢ Direct Proofs: by Cases, Existence Proofs (Constructive or

Nonconstructive)➢ Indirect Proofs: Contrapositive, Contradiction,

Counterexamples, Non-existence Proofs

◆ Fallacies of proofs

◆ Conjectures and Open Problems

2

Argument and Argument formAn argument in propositional logic is a sequence of

propositions, or a sequence of statements that end with a conclusion.

◆ For example, “ If you have a current password, then you can log on to the network”., “You have a current password.”, and “You can log onto the network.”

◆ All but the final proposition in the argument are called premises, the final proposition is called the conclusion.

◆ An argument form in propositional logic is a sequence of compound propositions involving propositional variables.

◆ Valid argument means the conclusion must follow from the truth of the premises (no matter which variables are binding to the propositional functions).

2021/9/9 CSE, NCHU

3

Valid Argument ◆ The argument is valid if the premises imply the

conclusion. (邏輯上講得通的)

◆ An argument is valid iff it is impossible for all the premises to be true and the conclusion to be false.

E.g. you have a current password, then you can log onto the network

Let p be “you have a current password” and

q be “you can log onto the network”

2021/9/9 CSE, NCHU

p q

p

q

((p →q) p ) → q

4

Valid Argument

◆ The argument form with premises p1, p2, …, pn and conclusion q is valid

when

q can be derived from (p1˄ p2˄… ˄ pn)

or say,

p1˄ p2˄… ˄ pn → q is a tautology

2021/9/9 CSE, NCHU

5

Inference rules (1/3)

◆ Recall that the reason for studying logic was to

formalize derivations and proofs.

◆ How can we infer facts using logic?

◆ Simplest possible inference: From p → q and p is

TRUE, we can infer that q is TRUE. (Modus Ponens)

◆ Similarly, From p → q, q → r and p is TRUE, we

can infer that r is TRUE. (by Hypothetical syllogism)

◆ Examine rules of inferences in table 1 and 2 of §1.6.

2021/9/9 CSE, NCHU

6

Inference rules (2/3)

◆ Modus ponens (p (p → q)) → q

◆ Modus tollens (¬q (p → q)) → ¬p

◆ Hypothetical syllogism

((p → q) (q → r)) → (p → r)

◆ Disjunctive syllogism ((p q) ¬p) → q

◆ Addition p → (p q)

◆ Simplification (p q) → p

◆ Conjunction ((p) (q)) → (p q)

◆ Resolution (p q) (¬p r) → (q r)2021/9/9 CSE, NCHU

7

Inference rules (3/3)

◆ Universal instantiation

x P(x) → P(c) for any element c

◆ Universal generalization

P(c) for an arbitrary c → x P(x)

◆ Existential instantiation

x P(x) → P(c) for some element c

◆ Existential generalization

P(c) for some element c → x P(x)

2021/9/9 CSE, NCHU

8

Using Rules of Inference to build Arguments

• Using rules of inference to build arguments:

It is not sunny this afternoon and it is colder than yesterday.We will go swimming only if it is sunny. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset.

• The conclusion is “we will be home by sunset”p: It is sunny this afternoonq: it is colder than yesterdayr: we will go swimmings: we will take a canoe tript: we will be home by sunset(1) ¬p q → ¬p simplification(2) r → p → ¬r modus tollens(3) ¬r → s → s modus ponens(4) s → t → t modus ponens

2021/9/9 CSE, NCHU

Hypotheses: , , ,

Conclusion:

p q r p r s s t

t

→ → →

9

Literal, Clause, and Resolution

◆ A variable or negation of a variable is called a literal.

◆ A disjunction of literals is called a sum and a conjunction of literals is called a product.

◆ A Clause is a disjunction of literals, i.e. it is a sum.

◆ In the resolution rule: ((p q) (¬p r)) → (q r),

(q r) is called the resolvent.

◆ For any two clauses C1 and C2, if there is a literal L1

in C1 which is complementary to a literal L2 in C2 then delete L1 and L2 from C1 and C2 respectively, we have

a resolvent.

2021/9/9 CSE, NCHU

10

Resolution Principle◆ Definition: Given two clauses C1 and C2, a

resolvent C is a logical consequence of C1 and C2.

◆ The resolution principle Given a set S of clauses, a

resolution deduction of C from S is a finite sequence

C1, C2 ,.., Ck of clauses such that Ci is either a clause in S or a resolvent of clauses preceding C and CK= C. A deduction of empty clause is called a refutation or a (an inconsistent) proof of S.

◆ Consequently, for premises P1,…, Pn, and conclusion C, if put P1,…, Pn in clauses form and add it to ¬C,

then we should get an empty clause. 2021/9/9 CSE, NCHU

11

Examples of Resolutions◆ Show the following argument is correct.

If today is Tuesday, I have a test in Math. or Economics. If my Economics Professor is sick, I will not have a test in Economics. Today is Tuesday and Economics Professor is sick. Therefore, I have a test in Math.

◆ Proof: Let T denote ‘today is Tuesday’

M denote ‘I have a test in Math.’

E denote ‘I have a test in Economics’

S denote ‘My Economics Prof. is sick’

we have T → (M E), S → ¬E, consequently, M should be true.

(Watch out: incomplete inference? the case works in the situation of both “today is Tuesday” and “E. Prof. is sick” are true.)

2021/9/9 CSE, NCHU

12

Fallacies (Mistakes in Proofs)

◆ ((p → q) q) → p is not a tautology.

The type of incorrect reasoning is called fallacy of affirming the conclusion.

◆ ((p → q) ¬p) → ¬q is not a tautology.

The type of incorrect reasoning is called fallacy of denying the hypothesis.

◆ When a statement is proved using itself, or a statement equivalent to it. This mistake is called fallacy of circular reasoning.

2021/9/9 CSE, NCHU

13

Fallacy of Affirming the Conclusion

Q1: If the following argument is valid?

If you do every problem in this book, then you will learn discrete mathematics.

You learned discrete, therefore, you did every problem in this book.

A1: Let p be “you did every problem in this book”

q be “you learned discrete mathematics”

claim: ((p → q) q) → p is a tautology

which is false, when p is F and q is T.

Q2: Prove “if n2 is positive, then n is positive” by

let P(n) be “n is positive”, Q(n) be “n2 is positive”

(n(P(n) → Q(n)) Q(n)) → P(n) is not a tautology

2021/9/9 CSE, NCHU

14

Fallacy of Denying the HypothesisQ1:Is the following argument valid?

Assume that “if you do every problem in this book, then you will learn discrete mathematics.” Is it correct to claim:

“You did not learn discrete mathematics if you did not do every problem in this book.”

A1: P=“you did every problem in this book”

q=“you learned discrete mathematics”

If p → q, and ¬p, then ¬q, or ((p → q) ¬p) → ¬q

which is false, when p is F and q is T. (i.e. it is not a tautology)

Q2: Prove “if n is not positive, then n2 is not positive” by

let P(n) be “n is positive”, Q(n) be “n2 is positive”

(n(P(n) → Q(n)) ¬P(n)) → ¬Q(n) is not a tautology2021/9/9

CSE, NCHU

15

What is wrong with the proof ?

◼ If n2 is positive, then n is positive.

Proof: Suppose that n2 is positive. Because the

conditional statement “If n is positive, then n2 is positive” is true, hence we can conclude that n is positive. (fallacy of affirming the conclusion)

◼ If n is not positive, then n2 is not positive.

Proof: Suppose that n is not positive. Because the

conditional statement “If n is positive, then n2 is positive” is true, hence we conclude that n2 is not positive. (fallacy of denying the hypothesis)

16

What is wrong with the proof ?

◼ n is an even integer whenever n2 is an even integer.

Proof: Suppose that n2 is even. Then n2=2k for some

integer k. Let n = 2l for some integer l. This shows that n is even. (fallacy of circular reasoning)

Hint: “Let n = 2l for some integer l” is invalid, since no argument has been given to show that n can be written as 2l for some integer l.

17

Universal Modus Tollens◆ [x (P(x) → Q(x)) ¬Q(a)] → ¬P(a)Q: Which rules are used in the following argument?

No man is an island. Manhattan is an island. Therefore, Manhattan is not a man.

A: Let M (x) be “x is a man”, I(x) be “x is an island”. Domain of x is “all things”. The premises are:

x (M(x) → ¬I(x))

I(Manhattan) (Note that Manhattan is an instance)

Therefore, by universal modus tollens, we can conclude that ¬M(Manhattan).

2021/9/9 CSE, NCHU

18

Universal Modus Ponens◆ (x (P(x) → Q(x)) P(a)) → Q(a)

◆ Assume that “For all positive integers n, if n is greater than 4, then n2 is less than 2n” is claimed.

Want to prove 1002 < 2100

◆ Let P(n) denote “n > 4”

Q(n) denote “n2 < 2n”

Assume that x (P(x) → Q(x)) is true,

Note that P(100) is true, by universal modus

ponens, we have proved 1002 < 2100

2021/9/9 CSE, NCHU

19

Remarks on and ◆ Verify whether the followings are true or not :

(i) x (P(x) Q(x)) ≡ x P(x) x Q(x) (F)

(ii) x (P(x) Q(x)) ≡ x P(x) x Q(x) (T)

(iii) x (P(x) Q(x)) ≡ x P(x) x Q(x) (T)

(iv) x (P(x) Q(x)) ≡ x P(x) x Q(x) (F)

Check if the domain is {2,3} or {all prime numbers} or integers.

P(x) denotes “x is a multiple of 2” or Even numbers

Q(x) denotes “x is a multiple of 3” or Odd numbers

2021/9/9 CSE, NCHU

20

Remarks on and ◆ Verify whether the followings are true or not :

x (P(x) Q(x)) ≡ x P(x) x Q(x) is F

f.g.1 D={2,3}, P(x)= “x is a multiple of 2” , Q(x)= “x is a multiple of 3”

f.g.2 D=Z, P(x)=“x is an even number”, Q(x)=“x is an odd number”

x (P(x) Q(x)) ≡ x P(x) x Q(x) is Ff.g.1 D={2,3}, P(x)= “x is a multiple of 2” , Q(x)= “x is a multiple of 3”

f.g.2 D=Z, P(x)=“x is an even number”, Q(x)=“x is an odd number”

2021/9/9 CSE, NCHU

21

First-Order Logic (optional)

For a fixed vocabulary Γ, each formula of first-order logic (FO) is a string of symbols taken from the alphabet consisting of:

1. v1, v2, … variables

2. ¬ and for not and or

3. existential quantifier

4. =, (,), equality and parentheses

And, all symbols are in Γ.

2021/9/9 CSE, NCHU

22

Terminology for Proofs

◼ Axioms – statements we assume to be true

◼ Proposition, Lemma(引理), Theorem –statement that can be shown to be true.

◼ Corollary(推論) – theorem that can be

established directly from a proven theorem

◼ Conjecture(推測) – statement that is being

proposed to be a true statement, usually based on the basis of some partial evidence, a heuristic argument, or an intuition of an expert.

23

Why Proof?

◼ Introduction to Proofs.

◼ What is a (valid) proof?◼ A proof is a valid argument that establishes the

truth of a theorem

◼ Why are proofs necessary?◼ Verifying programs and OS, making inference in

AI, showing system specs are consistent, etc.

24

Introduction to Proof Techniques

• In a proof, one uses axioms/definitions, premises and proven theorems

• Proof methods: direct, indirect, trivial, contradiction, proof by cases (exhaustive proof), proof of equivalence, existence proofs (constructive or non-constructive), proof by counterexamples, backward/forward reasoning

• Open Problems – famous unsolved problems

25

Direct/Indirect Proof◆ A direct proof of a conditional statement p →

q is constructed when the first step is the assumption that p is true, subsequent steps using rules of inference, with the final step showing q must also be true.

◆ Indirect proof – if we prove the theorem without starting with the premises and end with the conclusion.

◆ E.g. If n is an odd integer, then n2 is odd.

◆ E.g. If n is an integer and 3n+2 is odd, then

n is odd. (using indirect proof, contraposition)

26

Proof by Contraposition

If (pq) (p+q)/2, then p q

Direct proof ?? (not trivial)Using Contrapositive:

If p = q, then (pq) = (p+q)/2

It follows by:

(pq) = (pp) = (p2) = p

(p+p)/2 = (p+q)/2 = p.

27

Vacuous and Trivial Proof

◆ Vacuous proof – in p → q, if we know p is

false already, the conditional statement must be true.

E.g. Let P(n) be “if n > 1, then n2>n”, the domain

consists of all integers. P(0) is true.

◆ Trivial proof – in p → q, if we know q is

already true.

E.g. P(n) is “If a and b are positive integers with a≧ b, then an ≧ bn “. Prove P(0) is true.

In fact, the hypothesis is not necessary.

28

Proof by cases (1/2)

If n is an integer, then n(n+1)/2 is an integer

◼ Case 1: n is even.

or n = 2a, for some integer a

So n(n+1)/2 = 2a*(n+1)/2 = a*(n+1),

which is an integer.

◼ Case 2: n is odd.

n+1 is even, or n+1 = 2a, for an integer a

So n(n+1)/2 = n*2a/2 = n*a,

which is an integer.

29

Proof by cases (2/2)

If n is an integer, then n2 ≧ n

◼ Case 1: n =0

◼ Case 2: n ≧ 1, n*n ≧ n*1 = n

◼ Case 3: n ≦ -1, n2 ≧ 0, 0 ≧ n

30

Proof by Contradiction

2 is irrational◼ Suppose 2 is rational. Then 2 = p/q,

such that p, q have no common factors other than 1.

Squaring and transposing,

p2 = 2q2 (even number)

So, p is even (if x2 is even, then x is even)

that is, p = 2x for some integer x

hence, 4x2 = 2q2 or q2 = 2x2

So, q is even (if x2 is even, then x is even)

So, p,q are both even – they have a common

factor of 2. CONTRADICTION.

So 2 is NOT rational. Q.E.D.

31

Indirect or Contradiction

If n is an integer and n3 +5 is odd, then n is an even

Indirect proof (contrapositive) : Let n= k+1, n3 +5 = 2(4k3 +6k2 +3k+3)

Proof by Contradiction:Suppose that n3 +5 is odd and n is odd

5 = (n3 +5) - n3 should be even, because of the difference of two odds, but it is an odd.

p → q: p and q are true, leading to a contradiction.

32

Existence Proofs (1/2)

E.g.1 There exists (distinct) integers x,y,z satisfying x2+y2 = z2

Proof: x = 3, y = 4, z = 5. (by constructive existence proof)

E.g.2 There is a positive integer that can be written as the sum of cubes of positive integers in two different ways.

Proof: 1729 = 103+93 = 123+13

33

Existence Proofs (2/2)

There exists irrational b,c, such that bc is rational

By nonconstructive proof:

Consider 22. Two cases are possible:

◼ Case 1: 22 is rational – DONE (b = c = 2).

◼ Case 2: 22 is irrational –

Let b = 22, c = 2.

Then bc = (22)2 = (2)2*2 = (2)2 = 2

34

The Use of Counterexamples

EX1. All prime numbers are odd (false)

Proof: 2 is an even number and a prime.

EX2. Every prime number can be written

as the difference of two squares, i.e.

a2 – b2. (false)

Proof: 2 can’t be written as a2 – b2

EX3. Every positive integer is the sum of the square of two integers. (false)

Proof: 3 can’t be the sum of two integers.

35

Proof by Equivalence

◼ n is even iff n2 is even

Proof (by equivalence)

Let P be “n is even”, Q be “n2 is even”

P and Q are equivalence can be proven by “P→ Q and Q → P”

36

Exhaustive Proofs and Proof by Cases

◼ (p1p2…pn→q) is logically equivalent to

(p1→q) (p2→q) … (pn→ q)

⚫ (p1p2…pn→q) is an exhaustive proof,

while (p1→q) (p2→q) … (pn→ q) is called

a proof by cases.

37

Proofs by Exhaustion (1/2)

◼ Prove that (n+1)3 ≧ 3n if n is a positive integer with n ≦4

◼ Proof: taking n=1,2,3,4 and check the inequalities

◼ Show that there are no solutions in integers x and y of x2 + 3y2 = 8

Proof: Since x2 ≦ 8 when -3 < x < 3, and 3y2 ≦ 8 when -2 < x < 2, so this leaves the cases when x equals

-2,-1,0,1,2 and y= -1,0,1. The possible values for x2

are 0,1, and 4, and possible values for 3y2 are 0,1. The largest sum of x2 and 3y2 is 7. Consequently, it is impossible for x2 + 3y2 = 8 to hold when x, y are integers.

38

Proofs by Exhaustion (2/2)

◼ Prove that the only consecutive positive integers not exceeding 100 that are perfect powers are 8 and 9.

Note that: x is perfect power if x = na , a is a positive integer.

Proof: The squares of positive integers not greater than 100 are 1,4,9,16,25,36,49,64,81,and 100. The cubes of positive integers not greater than 100 are 1,8,27,64. The fourth powers of positive integers not exceeding 100 is 1,16,81. The fifth powers of positive integers not exceeding 100 is 1,32. There are no positive integers higher than the sixth power not exceeding 100. So we see that n=8 is the only perfect power

n, since 23=8, 32=9 are two consecutive perfect powers.

39

Proofs by Backward◼ Prove that two people play a game taking turns

removing one, two, or three stones at a time from a pile that begins with 15 stones. The person who removes the last stone wins the game. Show that the first player can win the game no matter what the second player does.

◼ Q:How about the rule is : taking the last stone loses the game?

Proof: Work backward. The first player can win the game if this player is left with a pile containing one, two, or three stones. That is, the second player has to start with 4 stones. Similarly, the second player has to pick stones from a pile of 8 and 12 stones. That is to say, the first player needs to pick 3 stones at the first time, so the second player is left 12 stones, and so on.

40

Fermat’s Last Theorem

◼ Fermat’s Last Theorem

xn + yn = zn has no solution in (positive)

integers x,y,z with xyz =! 0 whenever n is an integer and is greater than 2.

x, y, z, n (such that) xn + yn = zn ?

domain of x, y, and z is Z+ (True)

domain of n is {k\k > 2, k Z+} (False)

41

The 3X + 1 Conjecture

◼ 3x+1 conjecture

Game: Start from a given integer n. If n is even, replace n by n/2. If n is odd, replace n with 3n+1. Keep doing this until you hit 1.

e.g. n=5 → 16 → 8 → 4 → 2 → 1

Q: Does this game terminate for all n?

42

Formulate a Conjecture

◼ Formulate a conjecture about the final decimal digit of the square of an integer and prove your result.

Sol: the smallest perfect squares are 1, 4, 9, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, etc. We note that the final digits are 0,1,4,5,6,9 with 2,3,7,8 are never appeared. So, we guess that the final digit of a perfect square is 0,1,4,5,6, or 9. Since any integer n2 can be written as (10a+b)2 = 10(10a2+2b)+b2, with b in {0,1,2,…,9}. We also notice that the final digit of the square of 10a+b is the same as the b2. In addition, (10-b)2 has the same final digit as b2. Consequently, we can reduce our proof to the 6 cases of final digit of n, that is , 0, 1&9, 2&8, 3&7, 4&6, 5. Doing case by case, we can verify the conjecture.

43

Which Mean?

For two positive real numbers x and y, ◼ Arithmetic mean

Is (x+y)/2, A(x,y)

◼ Geometric mean, G(x,y)

Is Sqrt(xy) (G ≦ A)

◼ Harmonic mean, H(x,y) (we have G2 = HA)

Is 2/(1/x + 1/y)= 2xy/(x+y)

◼ Quadratic mean, Q(x,y)

Is Sqrt((x2 + y2)/2)

44

Which Mean?

For n numbers x1+x2+…+xn

◼ Arithmetic mean, (x1+x2+…+xn)/n

◼ Median, taking the middle number

E.g.1. 0,0,5,50,50,60,80

Arithmetic mean = 35, while median is 50.

E.g.2. 10,15,20,80,95

Arithmetic mean = 55, median = 20.

Conclusion: 1. Mean is average or median.

2. Other than the mean, the variance is also a matter.

45

MEMO

◼ Read section §1.6 - §1.8

◼ Be familiar with rules of inferences and basic proving techniques.

◼ Be aware of perfect power.

◼ HW #7-9,15-17 of §1.6, #11-13,18-20,27-29 of §1.7, #11,12,15,16,25,26,31,32 of §1.8

2021/9/9 CSE, NCHU


Recommended