This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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? 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 . Name:__________________________________________________...
View Full Document
- Spring '08