HW4-W07-full - Homework Four CS 191 Discrete Structures I...

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

View Full Document Right Arrow Icon
Homework Four CS 191 : Discrete Structures I Mar. 6 , Winter 2007 Due Date: Mar. 20, 2007, Tuesday, before the class meeting. Section 4.2, p155 ___________________________________________________ Exercise (15) Write an algorithm whose input is a sequence s 1 , …, s n sorted in nondecreasing order and a value x . (Assume that all the values are real numbers.) The algorithm inserts x into the sequence so that the resulting sequence is sorted in nondecreqsing order. Example: If the sequence is 2, 6, 12, 14, and x = 5, the resulting sequence is 2, 5, 6, 12, 14. ____________________________________________________ Exercise (18) Describe the worst case input for algorithm 4.2.1. _____________________________________________________ Section 4.3, p168 Select a theta notation from Table 4.3.3 for each expression in exercises 1-12. Exercise (6) 4 6 6 + + n n _______________________________________________________________ Exercise (9) (6 n + 4)(1+lg n ) __________________________________________________________ Exercise
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/12/2008 for the course CS 191 taught by Professor Shen during the Winter '06 term at University of Missouri-Kansas City .

Page1 / 4

HW4-W07-full - Homework Four CS 191 Discrete Structures I...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online