CS 325 -
HW 1 Solutions Examples
Problem
1
2
3
4
5
6
7
Points
1
NOT GRADED
3
2
3
5
6
Since some problems have multiple right answers I have compiled some possible correct solutions
submitted by students.
Problem 1: 1 point - must include either a graph, table or some explanation as to how they got the
result
n < 44.

CS 325 -
HW 1 Solutions Examples
Problem 2: Not Graded

CS 325 -
HW 1 Solutions Examples
Problem 3: 3 points total- 3 points = Base case, inductive hypothesis and induction correct
2 points = One of the above incorrect
1 point =
Two of the above incorrect
See sample solutions below.
You can assume that n is a power of 2.

CS 325 -
HW 1 Solutions Examples
4.
2 points
-
0.25 point deduction for each one missed.
a.
f(n) = n
0.25
;
g(n) = n
0.5
f(n) is O(g(n))
b.
f(n) = n;
g(n) = log
2
n
f(n) is Ω(g(n))
c.
f(n) = log n;
g(n) = lg n
f(n)
is Θ(g(n))
d.
f(n) = e
n
;
g(n) = 2
n
f(n) is
(g(n))
e.
f(n) = 2
n
;
g(n) = 2
n+1
f(n) is Θ(g(n))
f.
f(n) = 2
n
;
g(n) =
2
2
𝑛
f(n) is O(g(n))
g.
f(n) = 2
n
;
g(n) = n!
f(n) is O(g(n))
h.
f(n) = (n+1)!;
g(n) = n!
f(n) is Ω(g(n))

CS 325 -
HW 1 Solutions Examples

CS 325 -
HW 1 Solutions Examples
5)
