Download Sample Test 2 | Discrete Structures for Computer Science | CSCI and more Exams Discrete Structures and Graph Theory in PDF only on Docsity!
C 241 Sample Test 2 (CH4-CH6)
Name: __________________________ Date: _____________
- Suppose you wish to prove that the following is true for all positive integers n by using the Principle of Mathematical Induction: 1 3 5 (2 n 1) n^2. (a) Write P (1) (b) Write P ( k ) (c) Write P ( k 1) (d) Use the Principle of Mathematical Induction to prove that P ( n ) is true for all positive integers n
- Use the Principle of Mathematical Induction to prove that 1 1 2 22 23 ( 1) 2 2 ( 1)^1 3
n n n n
for all positive integers n.
- (^) Use the Principle of Mathematical Induction to prove that 3 ( n^3 3 n^2 2 n ) for all n
- (^) A T-omino is the tile that is pictured below. Prove that every 2 n^ 2 n ( n 1) chessboard can be tiled with T-ominoes.
Use the following to answer questions 5-7:
In the questions below give a recursive definition with initial condition(s).
- The function f ( n ) = 2n, n = 1, 2, 3, ....
- The Fibonacci numbers 1, 1 , 2 , 3 , 5 , 8 , 13 , ….
- (^) The set 0 3 6 9 … .
- (^) Find f (2) and f (3) if f ( n ) 2 f ( n 1) 6 , f (0) 3.
Use the following to answer questions 9-11:
In the questions below suppose that a “word” is any string of seven letters of the alphabet, with repeated letters allowed.
- How many words are there?
- How many words begin with A or end with B?
- How many words have no vowels?
- (^) How many permutations of the seven letters A B C D E F G are there?
- (^) How many permutations of the seven letters A B C D E F G have the two vowels before the five consonants?
Use the following to answer questions 14-15:
In the questions below suppose you have 30 books (15 novels, 10 history books, and 5 math books). Assume that all 30 books are different. In how many ways can you
- In how many ways can you get a bunch of four books to give to a friend?
- In how many ways can you put the 30 books in a row on a shelf if the novels are on the left, the math books are in the middle, and the history books are on the right?
- Suppose you pick two cards, one at a time, at random from an ordinary deck of 52 cards. Find the probability that (a) p (both cards are diamonds). (b) p (the cards form a pair).
- In a certain lottery game you choose a set of six numbers out of 54 numbers. Find the probability that none of your numbers match the six winning numbers.
- (^) A die has the numbers 1 2 2 3 3 3 on its six sides. If the die is rolled, what is the expected value and variance of the number showing?
- (Bonus) Each of 26 cards has a different letter of the alphabet on it. You pick one card at random. A vowel is worth 3 points and a consonant is worth 0 points. Let X the value of the card picked. Find E ( X ), V ( X ), and the standard deviation of X.
Answer Key
- (^) (a) 1 12. (b) 1 3 (2 k 1) k^2. (c) 1 3 (2 k 1) ( k 1)^2. (d) P (1) is true since 1 12. P ( k ) P ( k 1): 1 3 (2 k 1) k^2 (2 k 1) ( k 1)^2.
- P (1):
2 ( 1)^2
(^) , which is true since both sides are equal to 1. P ( k ) P ( k
1 1 1 1 1 2 22 ( 1) 1 2 1 2 ( 1)^1 ( 1) 1 2 1 2 ( 1)^1 3( 1)^2 3 3
k k k k k k k k k k ^ ^ ^ ^ ^ ^ ^ ^
2 1 ( 1) (1 3( 1)) 1 2 1 ( 1) ( 2) 1 2 2 ( 1) 1 1 3 3 3
k (^) k (^) k (^) k (^) k (^) k ^.
- (^) P (1): 3 13 3 12 2 1 , which is true since 3 6. P ( k ) P ( k 1): ( k 1)^3 3( k 1)^2 2( k 1) ( k^3 3 k^2 2 k ) 3( k^2 3 k 2), which is divisible by 3 since each of the two terms is divisible by 3.
- (^) P (2): The figure below shows a tiling of a 4 4 board. P ( k ) P ( k 1): Divide the 2 k^ ^1 2 k^ ^1 board into four quarters, each of which is a 2 k^ 2 k^ board. P ( k ) guarantees that each of these four 2 k^ 2 k^ boards can be tiled. Put these four tiled boards together to obtain a tiling for the 2 k^ ^1 2 k^ ^1 board.
- f ( n ) = 2 f ( n - 1), f (1) = 2.
- (^) an an 1 an 2 , a 1 1 , a 2 1.
- (^0) S ; x S x 3 S.
- (^) f (2) 30 , f (3) 66.
- 266 + 26^6 - 26^5.
- (^7) .
- 2 5 .
- 30 4
16. C (95).
- The same hand is counted twice. (Getting a pair of kings first and a pair of sevens second is the same as getting a pair of sevens first and a pair of kings second.) To obtain