Sample Test 2 | Discrete Structures for Computer Science | CSCI, Exams of Discrete Structures and Graph Theory

Material Type: Exam; Professor: Duncan; Class: DISCRETE STRUCTURES FOR COMPUTER SCIENCE; Subject: Computer Science; University: Indiana University - Bloomington; Term: Spring 2012;

Typology: Exams

2013/2014

Uploaded on 05/07/2014

mdegges
mdegges 🇺🇸

4

(3)

14 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
C 241 Sample Test 2 (CH4-CH6)
Name: __________________________ Date: _____________
1.
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  (2n 1) n2.
(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
2.
Use the Principle of Mathematical Induction to prove that
1
23 2 ( 1) 1
1 2 2 2 ( 1) 2 3
nn
nn 

for all positive integers n.
3.
Use the Principle of Mathematical Induction to prove that 3 (n3 3n2 2n) for all n
1.
4.
A T-omino is the tile that is pictured below. Prove that every 2n 2n(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).
5.
The function f (n) = 2n, n = 1, 2, 3, ....
6.
The Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, .
7.
The set 0369.
pf3
pf4
pf5

Partial preview of the text

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: _____________

  1. 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
  2. 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.

  1. (^) Use the Principle of Mathematical Induction to prove that 3  ( n^3  3 n^2  2 n ) for all n
  2. (^) 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).

  1. The function f ( n ) = 2n, n = 1, 2, 3, ....
  2. The Fibonacci numbers 1, 1 , 2 , 3 , 5 , 8 , 13 , .
  3. (^) The set  0  3  6  9  .
  1. (^) 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.

  1. How many words are there?
  2. How many words begin with A or end with B?
  3. How many words have no vowels?
  4. (^) How many permutations of the seven letters ABCDEFG are there?
  5. (^) How many permutations of the seven letters ABCDEFG 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

  1. In how many ways can you get a bunch of four books to give to a friend?
  2. 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?
  1. 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).
  2. 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.
  3. (^) 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?
  4. (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

  1. (^) (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.
  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     ^.

  1. (^) 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.
  2. (^) 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.
  3. f ( n ) = 2 f ( n - 1), f (1) = 2.
  4. (^) anan  1  an  2 , a 1  1 , a 2  1.
  5. (^0)  S ; xSx  3  S.
  6. (^) f (2)  30 , f (3)  66.
  7. 266 + 26^6 - 26^5.
  8. (^7) .
  9. 2  5 .
  10. 30 4

   

16. C (95).

  1. 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