Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 18 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
18
Dung lượng
1,12 MB
Nội dung
Proof by the Well ordering principle 03/22/19 Well Ordering Principle • Every nonempty set of nonnegative integers has a least element 03/22/19 Well Ordering Principle • Every nonempty set of nonnegative integers has a least element 03/22/19 Well Ordering Principle • Every nonempty set of nonnegative integers has a least element 03/22/19 Well Ordering Principle Every nonempty set of nonnegative integers has a least element We actually used this already when arguing that a fraction can be reduced to “lowest terms” The set of factors of a positive integer is nonempty 03/22/19 To prove P(n) for every nonnegative n: • Let C = {n: P(n) is false} (the set of “counterexamples”) • Assume C is nonempty in order to derive a contradiction • Let m be the smallest element of C • Derive a contradiction (perhaps by finding a smaller member of C) 03/22/19 A Proof Using WOP • Given a stack of pancakes, make a nice stack with the smallest on top, then the next smallest, …, and the biggest on the bottom • By using only one operation: Grabbing a wad off the top and flipping it! • Theorem: n pancakes can be sorted using 2n-3 flips (n≥2) 03/22/19 One way to it • Grab under the biggest pancake and bring it to the top • Flip the entire stack over • Repeat, ignoring the bottom pancake 03/22/19 Why does this take 2n-3 flips? • For n≥2, let P(n) := “n pancakes can be sorted using 2n-3 flips” • Suppose this is false for some n • Let C = {n: P(n) is false} • C has a least element by WOP Call it m • So m pancakes cannot be sorted using 2m-3 flips and m is the smallest number for which that is the case 03/22/19 Why does this take 2n-3 flips? • m≠2 since one flip sorts pancakes • But if m>2 then it takes flips to get the biggest pancake on the bottom … • and 2(m-1)-3 to sort the rest since P(m-1) is true (since m-1 < m) … • for a total of 2(m-1)-3+2 = 2m-3, contradicting the assumption that P(m) is false 03/22/19 03/22/19 Summing powers of • Thm: 1+2+22+23+…+2n =2n+1-1 • E.g 1+2+22 = 1+2+4 = = 23-1 03/22/19 Summing powers of • Thm: For every n≥0, 1+2+22+23+…+2n =2n+1-1 • E.g 1+2+22 = 1+2+4 = = 23-1 • Let P(n) be the statement 1+2+22+23+…+2n = 2n+1-1 03/22/19 Summing powers of • Let C = {n: P(n) is false} = {n: 1+2+22+23+…+2n ≠2n+1-1} • Then C is nonempty by hypothesis • Then C has a minimal element m by WOP • m cannot be since P(0) is true: 1=20=20+1-1 • So m > 03/22/19 Summing powers of • But if 1+2+22+23+…+2m ≠2m+1-1 • then subtracting 2m from both sides: 1+2+22+23+…+2m-1 ≠2m+1-1-2m = 2m-1 (since 2m+2m = 2m+1) • But then P(m-1) is also false, contradiction 03/22/19 Summing powers of • Where did we use the fact that P(0) is true, so m > 0? 03/22/19 A Notational Note • Learn to avoid ellipses …! ν P(n) ≡ ∑ = ι ν+1 −1 ι=0 Τηεορεµ : (∀ν)Π(ν) 03/22/19 A geometric “proof” ν ∑2 i =2 ν+1 −1 ≡ i=0 ν+1 ν = 1+ ∑ ≡ ι ι=0 ν ι− ν = + 2 =0 03/22/19 1 1/2 1+ẵ+ẳ++ 1+ẵ+ẳ+ 1+ẵ+ẳ +ẵ 1/2 ...Well Ordering Principle • Every nonempty set of nonnegative integers has a least element 03/22/19 Well Ordering Principle • Every nonempty set of nonnegative... nonnegative integers has a least element 03/22/19 Well Ordering Principle • Every nonempty set of nonnegative integers has a least element 03/22/19 Well Ordering Principle Every nonempty set of nonnegative... bottom pancake 03/22/19 Why does this take 2n-3 flips? • For n≥2, let P(n) := “n pancakes can be sorted using 2n-3 flips” • Suppose this is false for some n • Let C = {n: P(n) is false} • C has a least