# hw1 - CSc 445 Homework Assignment 1 Assigned Wednesday Due...

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

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, ﬁrst 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 eﬃcient 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 eﬃcient 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.

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.

{[ snackBarMessage ]}

### Page1 / 2

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

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

View Full Document
Ask a homework question - tutors are online