Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving...
-
Upload
mervyn-ford -
Category
Documents
-
view
219 -
download
0
Transcript of Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving...
![Page 1: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/1.jpg)
CS322Week 3 - Friday
![Page 2: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/2.jpg)
Last time
What did we talk about last time? Proving universal statements
Disproving existential statements Rational numbers Proof formatting
![Page 3: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/3.jpg)
Questions?
![Page 4: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/4.jpg)
Logical warmup
An anthropologist studying on the Island of Knights and Knaves is told that an astrologer and a sorcerer are waiting in a tower
When he goes up into the tower, he sees two men in conical hats
One hat is blue and the other is green The anthropologist cannot determine which man is
which by sight, but he needs to find the sorcerer He asks, "Is the sorcerer a Knight?" The man in the blue hat answers, and the
anthropologist is able to deduce which one is which
Which one is the sorcerer?
![Page 5: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/5.jpg)
Logical cooldown
After determining that the man in the green hat is the sorcerer, the sorcerer asks a question that has a definite yes or no answer
Nevertheless, the anthropologist, a naturally honest man, could not answer the question, even though he knew the answer
What's the question?
![Page 6: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/6.jpg)
Rational Numbers Review
![Page 7: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/7.jpg)
Another important definition
A real number is rational if and only if it can be expressed at the quotient of two integers with a nonzero denominator
Or, more formally,r is rational a, b Z r = a/b and b 0
![Page 8: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/8.jpg)
Prove or disprove:
The reciprocal of any rational number is a rational number
![Page 9: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/9.jpg)
Using existing theorems
Math moves forward not by people proving things purely from definitions but also by using existing theorems
"Standing on the shoulders of giants" Given the following:
1. The sum, product, and difference of any two even integers is even
2. The sum and difference of any two odd integers are even3. The product of any two odd integers is odd4. The product of any even integer and any odd integer is even5. The sum of any odd integer and any even integer is odd
Using these theorems, prove that, if a is any even integer and b is any odd integer, then (a2 + b2 + 1)/2 is an integer
![Page 10: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/10.jpg)
Divisibility
![Page 11: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/11.jpg)
Definition of divisibility
If n and d are integers, then n is divisible by d if and only if n = dk for some integer k
Or, more formally: For n, d Z,
n is divisible by d k Z n = dk We also say:
n is a multiple of d d is a factor of n d is a divisor of n d divides n
We use the notation d | n to mean "d divides n"
![Page 12: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/12.jpg)
Transitivity of divisibility
Prove that for all integers a, b, and c, if a | b and b | c, then a | c
Steps: Rewrite the theorem in formal notation Write Proof: State your premises Justify every line you infer from the
premises Write QED after you have demonstrated
the conclusion
![Page 13: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/13.jpg)
Prove or disprove:
For all integers a and b, if a | b and b | a, then a = b
How could we change this statement so that it is true?
Then, how could we prove it?
![Page 14: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/14.jpg)
Unique factorization theorem For any integer n > 1, there exist a
positive integer k, distinct prime numbers p1, p2, …, pk, and positive integers e1, e2, …, ek such that
And any other expression of n as a product of prime numbers is identical to this except, perhaps, for the order in which the factors are written
kek
eee ppppn ...321321
![Page 15: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/15.jpg)
An application of the unique factorization theorem
Let m be an integer such that 8∙7 ∙6 ∙5 ∙4 ∙3 ∙2 ∙m = 17∙16 ∙15
∙14 ∙13 ∙12 ∙11 ∙10 Does 17 | m? Leave aside for the moment that we
could actually compute m
![Page 16: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/16.jpg)
Quotient Remainder Theorem and Proof by Cases
![Page 17: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/17.jpg)
Proof by cases
If you have a premise consisting of clauses that are ANDed together, you can split them up Each clause can be used in your proof
What if clauses are ORed together? You don't know for sure that they're all true In this situation, you use a proof by cases Assume each of the individual possibilities is
true separately If the proof works out in all possible cases, it
still holds
![Page 18: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/18.jpg)
Proof by cases formatting For a direct proof using cases, follow the
same format that you normally would When you reach your cases, number
them clearly Show that you have proved the
conclusion for each case Finally, after your cases, state that,
since you have shown the conclusion is true for all possible cases, the conclusion must be true in general
![Page 19: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/19.jpg)
Quotient-remainder theorem For any integer n and any positive integer d,
there exist unique integers q and r such that n = dq + r and 0 ≤ r < d
This is a fancy way of saying that you can divide an integer by another integer and get a unique quotient and remainder
We will use div to mean integer division (exactly like / in Java )
We will use mod to mean integer mod (exactly like % in Java)
What are q and r when n = 54 and d = 4?
![Page 20: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/20.jpg)
Even and odd
As another way of looking at our earlier definition of even and odd, we can apply the quotient-remainder theorem with the divisor 2
Thus, for any integer n n = 2q + r and 0 ≤ r < 2
But, the only possible values of r are 0 and 1 So, for any integer n, exactly one of the
following cases must hold: n = 2q + 0 n = 2q + 1
We call even or oddness parity
![Page 21: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/21.jpg)
Consecutive integers have opposite parity
Prove that, given any two consecutive integers, one is even and the other is odd
Hint Divide into two cases: The smaller of the two integers is even The smaller of the two integers is odd
![Page 22: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/22.jpg)
Another proof by cases
Theorem: for all integers n, 3n2 + n + 14 is even
How could we prove this using cases?
Be careful with formatting
![Page 23: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/23.jpg)
Floor and Ceiling
![Page 24: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/24.jpg)
More definitions
For any real number x, the floor of x, written x, is defined as follows: x = the unique integer n such that n ≤
x < n + 1
For any real number x, the ceiling of x, written x, is defined as follows: x = the unique integer n such that n –
1 < x ≤ n
![Page 25: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/25.jpg)
Proofs with floor and ceiling
Prove or disprove: x, y R, x + y = x + y
Prove or disprove: x R, m Z x + m = x + m
![Page 26: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/26.jpg)
Examples
Give the floor for each of the following values 25/4 0.999 -2.01
Now, give the ceiling for each of the same values
If there are 4 quarts in a gallon, how many gallon jugs do you need to transport 17 quarts of werewolf blood?
Does this example use floor or ceiling?
![Page 27: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/27.jpg)
Upcoming
![Page 28: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/28.jpg)
Next time…
Indirect argument Proof by contradiction
Irrationality of the square root of 2 Infinite number of primes
![Page 29: Week 3 - Friday. What did we talk about last time? Proving universal statements Disproving existential statements Rational numbers Proof formatting.](https://reader036.fdocuments.in/reader036/viewer/2022062409/5697bf751a28abf838c80579/html5/thumbnails/29.jpg)
Reminders
Turn in Assignment 2 by midnight tonight!
Keep reading Chapter 4