hw2sol

# hw2sol - € € Problem 1 a f R → R f x = 8 x − 3 is...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: € € Problem 1 a) f : R → R, f ( x ) = 8 x − 3 is one‐to‐one. Proof: ∀x1, x 2 ∈ R, 8 x1 − 3 ≠ 8 x 2 − 3 ⇔ x1 ≠ x 2 . f : R → R, f ( x ) = 8 x − 3 is onto. Proof: ∀y ∈ R, ∃x ∈ R, f ( x ) = y . y+3 € ∈ R . f ( x ) = y ⇔ 8 x − 3 = y ⇔ x = 8 y + 3 −1 y + 3 −1 , f ( y) = , f : R → R . € As shown above, x = 8 8 € b) Given g : R → R ,g( x ) = 3x 2 + 4 2 g €( 0) = 3 × 0 + 4 = 0 + 4 = 4 g(1) = 3 × 12 + 4 = 3 + 4 = 7 g( 2) = 3 × 22 + 4 = 12 + 4 = 16 4 c) g−1 (0) = { x ∈ R g( x ) = 0} = x ∈ R 3 x 2 + 4 = 0 = x ∈ R x 2 = − = ∅ 3 € −1 2 2 g ( 4 ) = { x ∈ R g( x ) = 4} = { x ∈ R 3 x + 4 = 4} = { x ∈ R x = 0} = {0} { € € € € € € € € € € € € } { (−1) = { x ∈ R g( x ) = −1} = { x ∈ R 3 x }{ + 4 = −1} = x ∈ R x } g−1 (16) = { x ∈ R g( x ) = 16} = x ∈ R 3 x 2 + 4 = 16 = x ∈ R x 2 = 4 = {2, −2} g−1 2 2 5 = − = ∅ 3 d) g : R → R, g( x ) = 3 x 2 + 4 is not one‐to‐one. Proof by counterexample: 2 2 x1 = −1, g( x1 ) = 3 x1 + 4 = 7 , and x 2 = 1, g( x 2 ) = 3 x 2 + 4 = 7 , g( x1 ) = g( x 2 ) ,but x1 ≠ x 2 . g : R → R, g( x ) = 3 x 2 + 4 is not onto. Proof by counterexample: ∀y < 4,¬∃x ∈ R, g( x ) =€ x 2 + 4 = y . 3 € € 4x + 3 e) h : Z → R, h ( x ) = is one‐to‐one. 2 4 x + 3 4 x2 + 3 ≠ ⇔ x1 ≠ x 2 . Proof: ∀x1, x 2 ∈ Z, 1 2 2 4x + 3 h : Z → R, h ( x ) = is not onto. 2 Proof by counterexample: € 4x + 3 2π − 3 = y . (note: ∉ Z ) y = π ∈ R,¬∃x ∈ Z, h ( x ) = 2 4 f) g f ( x ) = g( f ( x )) = g(8 x − 3) = 3(8 x − 3) 2 + 4 = 3(64 x 2 − 48 x + 9) + 4 = 192 x 2 − 144 x + 31 € 4 ( 3 x 2 + 4 ) + 3 12 x 2 + 19 19 = = 6x 2 + 2 2 2 4 (192 x 2 − 144 x + 31) + 3 127 h ( g f )( x ) = h ( g f ( x )) = h (192 x 2 − 144 x + 31) = = 384 x 2 − 288 x + 2 2 19 19 127 ( h g) f ( x ) = ( h g)( f ( x )) = ( h g)(8 x − 3) = 6(8 x − 3) 2 + = 6(64 x 2 − 48 x + 9) + = 384 x 2 − 288 x + 2 2 2 Problem 2 a) f : N → Z, f (0) = 2, f ( n ) = 5 f ( n − 1) − 4, n ≥ 1 Prove by induction that f ( n ) = 5 n + 1 Proof: 1) Basis Step: By definition f (0) = 2 , and f (0) = 5 0 + 1 = 1 + 1 = 2 , so basic case is true. 2) Inductive Step: Assume f ( n − 1) = 5 n −1 + 1, to prove f ( n ) = 5 n + 1 € By definition f ( n ) = 5 f ( n − 1) − 4 , with above assumption, we have n −1 n −1 n f 1 €( n ) = 5(5 +€) − 4 = 5 ×5 +5 − 4 = 5 + 1. € € 3 9 b) g : N → Z, g(0) = −1, g(1) = 1, g( n ) = g( n − 1) + g( n − 2) + 10, n ≥ 2 € 2 2 € Prove by induction that g( n ) = 3n − 2 Proof: 1) Basis Step: By definition g(0) = −1, and g(0) = 30 − 2 = 1 − 2 = −1, so basic case is true. 2) Inductive Step: Assume g( m) = 3m − 2, ∀m ≤ n − 1, to prove g( n ) = 3n − 2 3 9 € By definition g( n ) = g( n − 1) + g( n − 2) + 10 , with above assumption, 2 2 € € 3 n −1 9 n− 2 g € ( n ) = ( 3 − 2) + ( 3 − 2) + 10€ 2 2 n −1 3× 3 9 × 3n − 2 3n + 3n n € = − 3+ − 9 + 10 = −2 = 3 −2 2 2 2 Problem 3 b€b a) x n = ( x 0 − )5 n + , a = 5, b = 9 1− a 1− a 9 9 9 9 13 9 x n = (1 − )5 n + = (1 + )5 n − = 5 n − 1− 5 1− 5 4 44 4 b) Given x 0 = 1, x1 = 5, x n = 5 x n −1 − 6 x n − 2 , ∀n ≥ 2 n n x n = As1 + Bs2 , where s1, s2 are the roots of s2 − 5 s + 6 = 0 , which is ( s − 2)( s − 3) = 0 . So s1 = 2, s2 = 3 . Then we have x n = A2 n + B 3n . n n € With x 0 = 1, x1 = 5 , substitute n with 0 and 1 in x n = A2 + B 3 , we have € € € A 2 0 + B 3 0 =1 A + B =1 A = −2 h g( x ) = h ( g( x )) = h ( 3 x 2 + 4 ) = € € € € € € € € € € { A 21 + B 31 = 5 ⇔{ 2 A + 3 B = 5 ⇔ { B = 3 € € € , hence x n = −2 × 2 n + 3 × 3n . c) Given x 0 = 2, x1 = 3, x n = 3 x n −1 + 10 x n − 2 , ∀n ≥ 2 n n x n = As1 + Bs2 , where s1, s2 are the roots of s2 − 3s − 10 = 0 , which is ( s + 2)( s − 5) = 0 . So s1 = −2, s2 = 5 . Then we have x n = A(−2) n + B5 n . n n € With x 0 = 2, x1 = 3 , substitute n with 0 and 1 in x n = A(−2) + B5 , we have 0 € =1 A (−2 )0 + B 5€= 2 A +B= 2 € 2A + 2 B = 4 A € 1 1 −2 A + 5 B = 3 −2 A + 5 B = 3 B =1 , € A (−2 ) + B 5 = 3 € n € hence x = 1 × (−2) n + 1 × 5 n = (−2) n + 5€ . { ⇔{ ⇔{ ⇔{ n d) Given x 0 = 1, x n = 3 x n −1 + 2 n, ∀n ≥ 1 x n = A 3n + Bn + C , so x n −1 = A 3n −1 + B( n − 1) + C . € Substitute x n , x n −1 in definition x n = 3 x n −1 + 2 n with above expressions, we have n n −1 € A 3 + Bn + C = 3( A 3 + B( n − 1) + C ) + 2 n € ⇔ A 3n + Bn € C = A × 3 × 3n −1 + 3B( n − 1) + 3C + 2 n + € ⇔ A 3n + Bn + C = A 3n€ 3Bn + 2 n − 3B + 3C + ⇔ A 3n + Bn + C = A 3n + ( 3B + 2) n − 3B + 3C 3 ⇔ B = 3B + 2, C = −3B + 3C ⇔ B = −1, C = − 2 € € € € 3 substitute solved B,C in x n = A 3n + Bn + C , we have x n = A 3n − n − , since we have x 0 = 1, 2 3 3 5 3 x 0 = A 30 − 0 − = 1 ⇔ A − = 1 ⇔ A = , substitute A in x n = A 3n − n − , we have the final solution 2 2 2 2 5 € €3 that x n = 3n − n − . € 2 2 € Problem 4 € a) Each of three letters in the initial has 26 choices, so total number of initials people can have is 26 3 . b) If none of the three letters repeated in the initial, then the first letter has 26 choices, second has 25 choices, and third has 24 choices. In total it is 26 × 25 × 24 . € c) In a lower‐case alphabetical string of length 6, we have 26 lower‐case letters to use. Without repeating letters, the first letter in the string has 26 choices, the second has 25 choices, and so on, € which gives the total as 26*25*24*23*22*21. It can be expressed as C (26, 6) × P (6, 6). d) Take the set of colors as Color = {color1, color2, color 3, color 4, color5, color6}, the set of genders as Gender = {male, female} , and the set of sizes as Size = {S, M , L, XL}. € Then the product set of all different types of shirts can be expressed as Color × Gender × Size . It is the Cartesian product of these three sets. Then the cardinality of the product set is € Color × Gender × Size = 6 × 2 × 4 = 48 . € € € € € (You may list all the combinations as {(color1, male, S ), (color2, male, S ), ..., (color6, female, XL)} with 48 different elements (triple)). 100 e) ‐The number of positive integers less than 100 that are divisible by 4 is − 1 = 25 − 1 = 24 . (The € 4 minus one is because that 100 can not be counted, given the integer has to be less than 100) 100 ‐The number of positive integers less than 100 that are divisible by 7 is floor( ) = 14 . (The largest € 7 among them is 98, so there is NO minus one) ‐The number of positive integers less than 100 that are divisible by both 4 and 7 is the same as the 100 number of positive integers less than 100 that are divisible by 28, which is floor( ) = 3 . € 28 ‐The number of positive integers less than 100 that are divisible by either 4 or 7 is 24 + 14 − 3 = 35 . (Add the number of integers that are divisible by 4 and that are divisible by 7, we counted those numbers which is divisible by both 4 and 7 twice, so minus thenumber of ‘overlapped’ number, € which is 3 here.) € ‐The number of positive integers less than 100 that are divisible by 4 but not 7 is 24‐3=21. f) If siblings from each family which to sit next to one another, then we have two group of kids. One group has 6 kids from one family and the other group has 3 kids from the other family. The number of ways to seat the first group in a row is 6! among this group, and the number of ways to seat the second group in a row is 3! among this group. To arrange these two groups in a row we have 2! different ways. So in total, there are 2!×3!×6! ways to seat them. Problem 5 € a) P (5, 5) = 5! b) P ( n, n ) × P ( n, n ) = n! n!, the first n spots in the line are all women, which has n! permutations among them, while the rest of n spots in the line are all man, which also has n! permutations among those men, so together is n!n!. c) To make a 6‐menber committee, is a case that order does not matter. So it is 10! C (10, 6) = C (10, 4 ) = = 210 . 4!6! d) Note a string can have repeated letters for both consonants and vowels. ‐The number of lower‐case strings of 6 letters containing exactly 1 vowel is 6 × 5 × 215 . The reason is to place one vowel in the string we have 6 choices for the position of the vowel. We have 5 choices for which vowel to use. On the rest 5 positions, for each one we have 21 consonant to choose, which gives 215 choices for remaining 5 letters. In total, it is 6 × 5 × 215 . € ‐The number of lower‐case strings of 6 letters containing exactly 2 vowels is 15 × 5 2 × 214 = 375 × 214 € € € 6! = 15 ways to choose two positions for these two vowels. Second, each 2! 4! of these two positions we have 5 choices for which vowel to use, this gives us 5 × 5 (or 5 2 ). Third, for the remaining 4 spots of the string, each position we have 21 consonant to choose, which gives us 214 choices. Thus, there are 15 × 5 2 × 214 different strings with exactly 2 vowels. € € € ‐The number of lower‐case strings of 6 letters containing at least 1 vowel is 26 6 − 216 . We have 26 6 different 6‐letter strings. Among them, if we subtract the number of strings that does € not have any vowels in it, the remaining would be the number of strings that has at least 1 vowel. And the number of strings that does not have any vowel in it is 216€ , since each of the 6 letters can only be 1 out of 21 consonant. € ‐The number of lower‐case strings of 6 letters containing no vowel at all is 216 . (See above € explanation) € First, we have C (6, 2) = € ...
View Full Document

## This document was uploaded on 10/01/2011.

Ask a homework question - tutors are online