hw1 - CSc 445: Homework Assignment 1 Assigned: Wednesday...

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

View Full Document Right Arrow Icon
CSc 445: Homework Assignment 1 Assigned: Wednesday Jan 23 2008, Due: 10:30 AM, Monday Feb 4th 2008 Clear, neat and concise solutions are required in order to receive full credit so revise your work carefully before submission, and consider how your work is presented. If you cannot solve a particular problem, state this clearly in your write-up, and write down only what you know to be correct. For involved proofs, first outline the argument and the delve into the details. 1. (10 pts) Consider the problem of determining whether an arbitrary sequence x 1 ,x 2 ,...,x n of n numbers contains repeated occurrences of some number. (a) Design an efficient algorithm for the case where you are not allowed to use additional space (i.e., you can use a few temporary variables, or O (1) storage). What’s the running time? Why? (b) Design a more efficient algorithms for the case where you’re allowed to use additional memory (i.e., additional O ( n ) storage). What’s the running time? Why? 2. (10 pts) Prove by induction that the sum of the degrees of all the nodes in any graph is an even number.
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.

Page1 / 2

hw1 - CSc 445: Homework Assignment 1 Assigned: Wednesday...

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