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. 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.