{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment#1

# Assignment#1 - Homework set#1 will be due on the third...

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

Homework set #1 will be due on the third Thursday of the semester (9/16/10) at the beginning of class (4pm; NO late homework accepted!), and will consist of 3 problems: 1.1 ("1.1" means "problem #1 in HW set #1"): Problem 1.4 (on Page 61 of Baase). Note that you are allowed to use parts 1 through 7 of Lemma 1.1 (Page 15) in order to prove part 8. You only have to prove part 8, but make sure you do not leave out any step (explicitly cite reasons for each step of your proof). Note that to get a feel for the procedure, you typically would start with the assertion and simplify it until you reach something like x=x. Such a reduction is NOT a proof, but with luck, it looks very much like the proof 'written backward'. A real proof will start with simple facts you know to be true (such as x=x), and become progressively more complicated until you reach the desired conclusion (as stated in part 8 of Lemma 1.1). 1.2: Suppose you are given integers a, b, c, and d, and you must compute the quantities x = ab-cc+bd and y = bb-cc+ad. As written, the formulas suggest doing six multiplications, though clearly if cc is computed and stored in an intermediate variable, then only five multiplications are needed. This could be expressed algorithmically as: temp1 = c*c x = a*b - temp1 + b*d y = b*b - temp1 + a*d which clearly illustrates how to compute the result with five multiplications.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.
• Spring '10
• carroll
• Analysis of algorithms, Computational complexity theory, worst case analysis, Best, worst and average case, Mailing list

{[ snackBarMessage ]}