Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Increasing Order of Growth Rate - Discrete Mathematics - Solved Exam, Exams of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Increasing Order of Growth Rate, Two Basic Rules, Relation Between Functions, Definition of Big- O, Set of Positive Integers, Overlapping in Uence, Real Numbers, Exponent, Cantor's Diagonalization Method

Typology: Exams

2012/2013

Uploaded on 04/27/2013

atmaja
atmaja 🇮🇳

4.2

(45)

182 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 173: Midterm Exam II Solutions
Spring 2004
Name:
NetID:
Lecture Section:
General Directions
1. Make sure your name is on every page.
2. There are 7 pages. Make sure that you answer all 13 questions.
3. Remember to write clearly and legibly. Unreadable answers will receive no credit.
4. This is a closed book exam. No notes of any kind are allowed.
5. Remember to time yourself.
Question Points Out of
1 6
2 6
3 6
4 6
5 6
6 6
7 6
8 6
9 10
10 10
11 10
12 10
13 12
Total 100
Page 1 of 10
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Increasing Order of Growth Rate - Discrete Mathematics - Solved Exam and more Exams Discrete Mathematics in PDF only on Docsity!

CS 173: Midterm Exam II Solutions

Spring 2004

Name:

NetID:

Lecture Section:

General Directions

  1. Make sure your name is on every page.
  2. There are 7 pages. Make sure that you answer all 13 questions.
  3. Remember to write clearly and legibly. Unreadable answers will receive no credit.
  4. This is a closed book exam. No notes of any kind are allowed.
  5. Remember to time yourself.

Question Points Out of

1 6

2 6

3 6

4 6

5 6

6 6

7 6

8 6

9 10

10 10

11 10

12 10

13 12

Total 100

Multiple Choice

Problem 1 (6pts)

When sorted in increasing order of growth rate, which one of the following functions would be second?

a)

b)

c)

d) 

Solution

(c) is second. The growth rate in these problems can be determined by two basic rules:

  1. Theorem: Suppose that  is ! "#$ and &% is ! % $. Then '(

&%#) is *,+&-/. "0. 1 .% 0. $.

  1. Theorem: Suppose that  is ! "#$ and &% is ! % $. Then '(2&%#) is ! 3#4 % $.

Applying our rules, we can work the problem as follows:

a)

b)

c)

d) 

Problem 2 (6pts)

Which of the following equalities describe(s) the relation between functions @

A %

BC

and 

? (Choose all that apply)

a) @

ED

b) 

ED

c) @

d) 

Problem 4 (6pts)

Given (

]<^&_`

(a

, &b is:

a)

c

b)

d%

c)

b

 d%

d)

fe$g

Solution

(d) is correct.

\

f` % a

5 <h

 a

`

i

G

d%

G

5 \

i

G

a

`

`h b

e fg

&b

\

kj b a

`

l 4m

e

fe$g

Problem 5 (6pts)

The set n is defined by oqpCn and rts#utpCn , whenever rvpCn and utpCn. Which of the following elements does NOT

belong to n? (Choose all that apply)

a) 7 #w

b)

V

x

c) w&o

d)

x y w

Solution

(b) does not belong to n.

All the elements of n can constructed using o, which happens to be

x

. Thus, all elements of n must have the form

x%  , where

is a positive integer.

a) 7 #w

Ex&G

. Alternatively, we can construct it using ozs0o.

b)

V

x65Ex b

. The exponent is odd, so it cannot belong to n.

c) w&o

Ex e

. Using our result from (a), we can construct it using ozs(7#w.

d)

x y w

5 Ex

c

. Using our result from (a), we can construct it using 7 #w{s7#w.

Problem 6 (6pts)

The function F

 is big-  of which of the following functions? (Choose all that apply)

a) ^

b) 

c) 

d) 

Solution

(b), (c), (d) are all correct.

F

x   €

x  |   ~

  €. Furthermore, if @

| ~ , then it is also 

of any function that grows faster than |   ~. This means that  is also 

 and 

Problem 7 (6pts)

Which of the following sets is/are countable?

a) The set of integers.

b) The set of real numbers.

c) The set of rationals.

d) The set of natural numbers.

Solution

(a), (c), (d) are all countable.

a) The set of integers. We can count these by mapping the non-negative integers to the even natural numbers, and

the negative integers to the odd numbers.

b) The set of real numbers. The set of reals is uncountable by Cantor’s Diagonalization method.

c) The set of rationals. The set of rationals is countable by the chart constructed on page 235, shown below without

guiding arrows.

Short Answer Problems

Problem 9 (10pts)

Use the pigeonhole principle to argue that any set of 10 nonempty strings over ‹XŒ1/Z#1/J0 have two different strings

whose starting letters agree and ending letters agree.

Solution

Nonempty strings over ‹XŒ1/Z#1/J# can be any size greater than 0, can use any combination of letters, and can have any

order. Fortunately, we are only concerned with the starting and ending letters of the strings. There are 9 possible

combinations of starting and ending letters for strings. We use * to denote the interior of the string. We also note that

if a string is of length 1, then it’s single letter is both the starting and ending letter.

  1. a*a
  2. a*b
  3. a*c
  4. b*a
  5. b*b
  6. b*c
  7. c*a
  8. c*b
  9. c*c

Since there are only 9 possible combinations, and 10 strings, by the pigeonhole principle, at least two of the strings

must have the same starting and ending letter.

Problem 10 (10pts)

Let Ž[1/ސ%1[‘0‘[‘ be a sequence of countable sets. Show that ’“

is countable.

Solution

We can show that ’,“”!•^ 

(^) is countable by constructing a bijection from the set to the natural numbers. We can do this

by enumerating the members of the sets as follows:

‹XŒ$01/X–d%1/XŒ  1 fXŒ G 1 0‘‘ ‘—ސ%

‹#X"%)[1/XM%f%1/X"%  1 /XM% G 1 0‘‘ ‘‘‘ ‘

Then we can construct a bijection like the one used to count the rationals on page 235 of the textbook:

XŒ$ XŒd% XŒ (^)  XŒ (^) G ‘‘‘

X"%2 X"%f% X"% (^)  X"% (^) G ‘‘‘

X  X% X$ X <G ‘‘‘

X G XG% XGf X G$G ‘‘‘

d) Yes. Suppose we have an arbitrary element X¨pWž. Then YX"

X¥ is also an element of ž. But then we have

YX ¥ 

YX ¥ ¥

X, so every element in ž has an element that maps to it.

e) No. As a counterexample, X"Z)Z/X and XMZ)Z)Z will both map to Z2Z2X.

f) Yes.  is onto, and so is. This means that  will map to all elements of ž , and will map to all elements of

ž. Suppose we have an element Jp©ž. Then there is an element ª«p¦ž that will map to it, since is onto.

Furthermore, there is an element ¬6pW that will map to ª under , since  is onto. Therefore 'F$ is onto.

Long Problem

Problem 13 (12pts)

We will use mathematical induction to show that a

x &UWV& board can be completely covered using L-shaped tiles.

a) Show by induction that the proposition holds for

x A9V& and

V

AWx& boards. (Hint: Both of these proofs should

be very short.)

b) Using part(a) and induction, show that the original proposition is correct.

Solution

a) Basis step: Combine two tiles to get a

x AWV and

V

AWx board.

Inductive Step: Assume the inductive hypothesis, that

x 9¦V and

x &RV boards can be tiled. We wish to

prove then that

x vV 

 and

V

tvx 

 boards can be tiled. We can do this by realizing that a

x tvV 

board is really a

x |BV& space with an extra

x |BV space on the end. We can tile the

x AV space by the inductive

hypothesis, and we can tile the remaining

x 6qV space with two tiles. Therefore a

x 6qV 

B

 (^) board is tileable.

Likewise, a

V

,8x 

q 7 # board is a

V

,8x& space with a

V

,8x space at the end. Once again, the

V

,8x& space

is tileable by the inductive hypothesis, and we can tile the remaining

V

q«x space with two tiles. Therefore a

VA9x 

# board is tileable.

b) Base Case: From part (a), we know that both

x |AV& and

V

|Ax& boards are tileable, and a

x |AV board is tileable.

Inductive Step: Assume the inductive hypothesis, that a

x &¨,V& boards can be tiled. We then wish to prove that

x 

q 7 

8V

q 7  boards are tileable. To show this, we note that a

x 

q 7 

8V

q 7  board is a

x &U8V

space, a

x &©CV space, a

V

&¦Cx space, and a

x ¨CV space. The

x ¦UV& space is tileable using the inductive

hypothesis. Furthermore, the

x &CV space and the

V

¦šx space are tileable as base cases. Finally, the

x CV

space is tileable using two tiles. Therefore a

x &U9V& board is tileable.