hw5 - 6. Section 3.4 Problem 24 on page 209 (12 points) 7....

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI 2011: Homework 5 Due: March 26, 2010 before class. No late submissions. This assignment must be completed individually, on your own. The homework contains 7 questions worth a total of 100 points. You can solve the two bonus questions to get extra credit of up to 15 points. You must obtain at least 50 points to pass this homework. When answering questions, always justify your answer. The exercises below are from the 6 th edition of Rosen. 1. Section 3.2 Problem 24 on page 191 (5x4 = 20 points) 2. Section 3.2 Problem 36 on page 192 (12 points) 3. Section 3.3 Problem 8 on page 199 (7+10 points) 4. Section 3.4 Problem 12 on page 209 (12 points) 5. Section 3.4 Problem 22 on page 209 (12 points)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6. Section 3.4 Problem 24 on page 209 (12 points) 7. Section 3.5 Problem 18 on page 218 (15 points) Extra Credit Questions: 1. You are given S, an infinite non-decreasing sequence of positive integers in which each integer is repeated finitely many times, and an integer x. Design an algorithm which returns the location of x if it is in S, and -1 otherwise. Explain your algorithm in plain English first, then present it in pseudo-code and analyze its running time. The number of points you receive will be determined by the efficiency of your algorithm (8 points) 2. Section 3.5 Problem 32 on page 218 (7 points)...
View Full Document

Ask a homework question - tutors are online