{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

COT 3100 Spring 2010-Midterm2_practice

COT 3100 Spring 2010-Midterm2_practice - Name UFID COT 3100...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Name:__________________________________________________ UFID:___________________________ _ 1 COT 3100 Spring 2010 Practice for Midterm 2 For the first two questions #1 and #2, do ONLY ONE of them. If you do both, only question #1 will be graded. 1. (20 pts) Give iterative and recursive algorithms for reversing a bit string. 2. (20 pts) Give iterative and recursive algorithms for calculating the term of the sequence * + where . Which algorithm is more efficient and why?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Name:__________________________________________________ UFID:___________________________ _ 2 3. (10 pts.) Use mathematical induction to show that ( ) , whenever n is a positive integer. 4. (20 pts) Let ( ) . Use induction to show that a) for .
Background image of page 2
Name:__________________________________________________ UFID:___________________________ _ 3 b) ( ) ( ) . 5. (10 pts) Give the recursive definition of the sequence {a n }, n = 1,2,3,… if a. b. ( ) 6. (10 pts) How many ways are there to seat 6 people around a circular table, where seatings are considered to be the same if they can be obtained from each other by rotating the table?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Name:__________________________________________________ UFID:___________________________ _ 4 7. (20 pts) Show that among any group of 20 people (where any two people are either friends or enemies),
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}