UID: Quiz 2 : CSE 173
Name: Handed on Saturday: 04-12-2021 at 9:40 AM
Due on Saturday: 04-12-2021 at 11:00 AM
Answering Guideline
1. Scan the answer script with name and ID on the top sheet and submit the scanned
version with file name (id_firstName.pdf).
2. It is not allowed to consult textbooks and online sources. Keep your meet video on
during the examination for proper proctoring.
3. It is not allowed to consult with any person who has knowledge of this subject,
including other students of this course. You may ask question to the instructor if you
do not understand the question, but not more than that. All solutions have to be your
own work.
4. You must show all work for each problem to receive full credit.
CODE OF HONOR PLEDGE
I pledge on my honor that I have not given or received any unauthorized
assistance on this assignment.
__________________________
Signature
__________________________
Date
Page 1 of 2
Answer any 6 of the following questions Marks: 6×10=60
1. Let P(n) be the statement that 2 + 4 + 6+・ ・ ・+2n = n(n + 1) for the positive 10
integer n.
a) Show that P(1) is true, completing the basis step of the proof.
b) What is the inductive hypothesis?
c) What do you need to prove in the inductive step?
d) Complete the inductive step, identifying where you use the inductive
hypothesis.
2. Use mathematical induction to show that 2n > n2 + n whenever n is an 10
integer greater than 4.
3. 10
Consider the following recursive definition:
0 if m 1 and n0
m 1 and n 1
2 if
f (m, n)
2n if m0 ;
f (m 1, f (m, n 1)) if m 1 and n2
Find f(1,3) and show the steps
10
4. Give a recursive definition of F(n) where F(n) =1 + 2 + 3 + ... + n.
10
5. Give Big O estimate of the number of operation used in this segment of
code.
t=0
for i := 1 to 3
for j := 1 to 4
t = t + i*j
2n 2
6. Find the big O of the function f (n) n nn 10
7. How many bit strings of length eight begin with three 0s and end with three 10
1s?
8. How many numbers must be selected from the set {1, 2, 3, 4, 5, 6, 7, 8} to 10
guarantee that at least one pair of these numbers add up to 9?
Page 2 of 2