* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Problem Set 1 Solutions
Big O notation wikipedia , lookup
Large numbers wikipedia , lookup
Abuse of notation wikipedia , lookup
Karhunen–Loève theorem wikipedia , lookup
Non-standard analysis wikipedia , lookup
Factorization of polynomials over finite fields wikipedia , lookup
Collatz conjecture wikipedia , lookup
Hyperreal number wikipedia , lookup
Factorization wikipedia , lookup
Elementary mathematics wikipedia , lookup
Laws of Form wikipedia , lookup
Non-standard calculus wikipedia , lookup
Problem Set 1 Solutions 1.1.4. Define P (n) to be the statement that for all k ∈ N with 1 ≤ k ≤ n, Q(k) is true. We will apply the principle of (weak) induction to P (n). Note that the assertion ‘P (n) holds for all n ∈ N’ is equivalent to the assertion ‘Q(n) holds for all n ∈ N.’ Base step: We have assumed that Q(1) is true. Q(1) is equivalent to P (1), so we conclude that P (1) is true. Induction step: Assume P (n) is true, so by definition Q(k) is true for all k ∈ N with 1 ≤ k ≤ n. Thus our assumption guarantees Q(n + 1) is true. We see that both P (n) and Q(n + 1) are both true, and since the statement ‘P (n) and Q(n + 1) are both true’ is equivalent to P (n + 1), we conclude P (n + 1) is true. Thus the principle of weak induction applied to P (n) guarantees P (n) holds for all n ∈ N. Thus Q(n) holds for all n ∈ N and the proof is complete. 1.1.5. There are at least two good ways of finding a formula for Pn k k=1 2 . 1. Combinatorial approach: Let A(n) = {S ⊆ {1, 2, . . . , n + 1} : |S| = 3} be the family of all subsets of the first n + 1 natural numbers that have size 3. For example, A(3) = {{1, 2, 3} , {1, 2, 4} , {1, 3, 4} , {2, 3, 4}} . Then from the definition of the binomial function, we have A(n) = n+1 3 (n) (the set A(n) has n+1 members). Let Bk = S ∈ A(n) : max S = k + 1 3 for k ∈ {1, . . . , n}. For example, (4) B4 = {{1, 2, 5} , {1, 3, 5} , {1, 4, 5} , {2, 3, 5} , {2, 4, 5} , {3, 4, 5}} . Then since the largest element in any member of A(n) is at most n + 1 and Sn (n) at least 2 (in fact, at least 3), we have A(n) = k=1 Bk . Furthermore, (n) (n) (n) it is clear that if j 6= k, then Bj ∩ Bk = ∅. How large is each Bk ? Well, if the largest element must be k + 1, then we must still choose 2 more elements the numbers {1, . . . , k}, and any choice will suffice. from (n) (n) Hence Bk = k2 (in particular, note B1 = 12 = 0 since no subsets (n) have largest element 2). Since the sets Bk are disjoint, this immediately yields n n n n + 1 X X k (n) [ (n) (n) = Bk = A = . Bk = 2 3 k=1 k=1 k=1 2. More direct approach: Using the fact that 1 k 2 = k(k−1) 2 and using the identities for sums discussed in class, we compute n X k 2 k=1 ! n n 1 X 2 X = = k −k = k − k 2 2 2 k=1 k=1 k=1 k=1 1 2n3 + 3n2 + n 3n2 + 3n 1 n(2n + 1)(n + 1) n(n + 1) − = − = 2 6 2 2 6 6 3 n −n n(n + 1)(n − 1) n+1 = = = . 6 6 3 n X k(k − 1) n X 1 2 After finding a formula,P our task is now to verify it using induction. So let P (n) n denote the statement “ k=1 k2 = n+1 3 ”. Since 1 X k k=1 2 2(2 − 1)(2 − 2) 2 1+1 1 1(1 − 1) =0= = = , = = 2 6 3 3 2 P (1) is true. Now let us assume that P (n) is true. Then n+1 X k=1 k 2 n X k n+1 n+1 n+1 n(n + 1)(n − 1) n(n + 1) + = + = + = 6 2 2 2 3 2 k=1 = n(n + 1) n(n + 1)(n + 2) ((n − 1) + 3) = = 6 6 n+2 . 3 Hence P(n + 1). So by induction, we have P (n) for all n ∈ N, and so Pn Pk(n) ⇒ n+1 = for all n ∈ N. k=1 2 3 1.1.6. Generalizing the result from 1.1.5 we obtain for all n, k ∈ Z≥0 n+1 = # of ways to pick k + 1 integers from {1, . . . , n + 1} k+1 n X = # of ways to pick k + 1 integers from {1, . . . , n + 1} the biggest one being j + 1 = = j=1 n X # of ways to pick k integers from {1, . . . , j} j=1 n X j=1 j k Fix a k ∈ Z≥0 . For X ∈ Z, X ≥ k we have X X · (X − 1) · · · · · (X − k + 1) = . k k! 2 By expanding the numerator we see that X k considered as a function in X is 1 . a polynomial of degree k with leading coefficient k! X k X = ci X i k i=0 (1) So, for n ∈ Z≥0 we obtain ! X n k k n k n X X X X X n+1 j i = = ci j = ci ji = ci Si (n) k+1 k j=1 j=1 i=0 i=0 j=1 i=0 for suitable ci ∈ Q and ck = 1 k! . We recall from lecture that the Si (n) can be rewritten as polynomials in n of degree i + 1. So, when denoting the leading coefficient of Sk (n) by a the right hand side of the above equation can be rewritten as a polynomial in n of degree k + 1 with leading coefficient ck a = a/k!. As before n+1 is also a polynominal k+1 in n of degree k + 1 with leading coefficient 1/(k + 1)!. Subsequently, 1 1 1 = a ⇒ a= . (k + 1)! k! k 1.2.3. Let x = am am−1 · · · a1 .b1 b2 · · · be a positive real number with a repeating decimal expansion i.e. there is a natural number N and some natural number j such that for all k ≥ N , bj+k = bk . Consider the following two real numbers: 10N −1+j x = am · · · a1 b1 · · · bN +j−1 .bN +j · · · 10N −1 x = am · · · a1 b1 · · · bN −1 .bN bN +1 · · · Note that since bj+k = bk for all k ≥ N , we have 10N −1+j x − 10N −1 x = c1 · · · cm .000 · · · In particular, 10N −1+j x−10N −1 x ∈ Z is an integer. Moreover, 10N −1+j −10N −1 is an integer. Therefore, x= 10N −1+j x − 10N −1 x 10N −1+j − 10N −1 is a quotient of two integers. Hence, x ∈ Q is a rational number. 1.2.4. Let x, y be such that tn (x) = z, tn (y) = w. Since truncation rounds towards 0, let us consider the non-negative and the negative cases separately. Case 1: z, w ≥ 0. We have tn (x) ≤ x < tn (x) + 1/10n and tn (y) ≤ y < tn (y) + 1/10n , so adding these 2 inequalities, we get tn (x) + tn (y) ≤ x + y < tn (x) + tn (y) + 2/10n . 3 Notice the inequality on the right is strict and that all terms above are nonnegative. Taking the truncation gives tn (x + y) = z + w or z + w + 1/10n . Case 2: z, w < 0. We have tn (x) − 1/10n < x ≤ tn (x) and tn (y) − 1/10n < y ≤ tn (y), so adding these 2 inequalities, we get tn (x) + tn (y) − 2/10n < x + y ≤ tn (x) + tn (y). This time, the inequality on the left is strict and that all terms above are negative. Taking the truncation gives tn (x + y) = z + w − 1/10n or z + w. Case 3: z ≥ 0, w < 0. We have tn (x) ≤ x < tn (x) + 1/10n and tn (y) − 1/10n < y ≤ tn (y). Adding these 2 inequalities gives tn (x) + tn (y) − 1/10n < x + y < tn (x) + tn (y) + 1/10n . Taking the truncation gives 1. tn (x + y) = z + w − 1/10n or z + w, if z + w ≥ 1/10n , 2. tn (x + y) = z + w or z + w + 1/10n , if z + w ≤ −1/10n , 3. tn (x + y) = z + w, if −1/10n < z + w < 1/10n (or equivalently, z + w = 0). Of course, we still have the case z < 0, w ≥ 0, but that is essentially the same as case 3 due to commutativity of addition. We have shown above that the only possibilities for tn (x + y) are z + w − 1/10n , z+w and z+w+1/10n . Let us exhibit examples to show that all the possibilities we found above can indeed occur. It should be obvious that tn (x + y) = z + w can always occur regardless of what z, w are (simply take x = z and y = w), so we will omit this in the examples below. Case 1: z, w ≥ 0. Let x = z + (1/10n )/2, y = w + (1/10n )/2, then tn (x + y) = tn (z + w + 1/10n ) = z + w + 1/10n . Case 2: z, w < 0. Let x = z − (1/10n )/2, y = w − (1/10n )/2, then tn (x + y) = tn (z + w − 1/10n ) = z + w − 1/10n . Case 3: z ≥ 0, w < 0. 4 1. Subcase: z + w ≥ 1/10n . Let x = z, y = w − (1/10n )/2, then tn (x + y) = tn (z + w − (1/10n )/2) = z + w − 1/10n . 2. Subcase: z + w ≤ −1/10n . Let x = z + (1/10n )/2, y = w, then tn (x + y) = tn (z + w + (1/10n )/2) = z + w + 1/10n . 5