{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

instr - It's very important to describe EXACTLY what's is...

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

View Full Document Right Arrow Icon
SUGGESTIONS FOR WRITING HOMEWORK SOLUTIONS 1. WHAT to write: 1a. An algorithm's solution has 3 parts: description of the algorithm correctness justification complexity analysis In some cases, one or more of these parts may take just 1 sentence, but worth doing it nonetheless. 1b. One counterexample is enough to disprove an algorithm or conjecture. But be sure to describe "why" it's a counterexample. 1c. Proving an algorithm correct requires a formal justification. By formal, we just mean that you should show that the algorithm "always computes what is claimed" and/or runs within the claimed bound. 2. HOW MUCH to write: 2a. In almost all cases, your solution should NOT take more than 1/2 to 1 page.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: It's very important to describe EXACTLY what's is needed, no more, and no less. 2b. Examples: No need to "redescribe" a known algorithm (one covered in class, or something elementary like sorting). If the problem requires you to "modify" an algorithm to do something different, it's enough to describe just what the "modification" is. * But still you should justify the ENTIRE modified algorithm. 2c. A good habit is to always do a draft first, before writing the final answers. It forces you to go over your thoughts a second time and helps figure out redundant, repetitious, or contradictory parts in your solutions....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online