This preview shows pages 1–2. Sign up to view the full content.
CS 173: Discrete Structures, Spring 2010
Homework 7 Solutions
This homework contains 4 problems worth a total of 40 regular points. It is due on Friday,
March 19th at 4pm. Put your homework in the appropriate dropbox in the Siebel basement.
1.
BigO proofs [10 points]
For both parts of this problem, make sure your proof is presented clearly, in forward order,
and spells out the (maybe 45 steps of) algebra clearly.
(a) Prove that 3
x
is
O
(
x
2
x
+2
).
Solution:
We need to prove that for some
c
and
k
that

3
x

< c

x
2
x
+2

for all
x > k
.
Let
k
= 9
and
c
= 4
.

3
x

<

3
x
+ (
x

8)

= 4

x

2

= 4

x

2
x
+4
x
+2

<
4

x

2
x
x
+2

= 4

x
2
x
+2

This inequality proves that

3
x

<
4

x
2
x
+2

for all
x >
9
.
Alternate Solution:
Without loss of generality we may assume
k >
0. Since we always take
x > k
this
allows us to ignore absolute values and avoid multiplication and division by negative
numbers and zero. Observe that for all
x
≥
k
the following inequalities are equivalent
(but we are NOT assuming them to be true yet):
3
x
≤
c
·
x
2
x
+ 2
3
x
(
x
+ 2)
≤
c
·
x
2
3(
x
+ 2)
≤
c
·
x
3
x
+ 6
≤
c
·
x
So to prove the ﬁrst inequality holds for all
x
≥
k
, it suﬃces to choose
c
and
k
so
that the last inequality is satisﬁed for all
x
≥
k
. Choosing
c
= 6 and
k
= 2 obviously
works.
(b) Use a proof by contradiction to show that
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '08
 Erickson

Click to edit the document details