# hw1 - Homework 1 Due Tuesday 1/26 before 10:30 CSE 450/598...

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

Homework 1 CSE 450/598 Spring 2010 Arizona State University Due: Tuesday 1/26 before 10:30 1. Get the html or pdf ﬁle of the Python tutorial from http://docs.python.org/download.html . Read sections 1, 2, 3, 4.1, 4.2, 4.3, 4.6, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6 or as needed to answer the questions 4 and 6 that require basic understanding of Python. Work through examples in the tutorial. (Nothing to be handed in for this question.) 2. Consider the following algorithm: def isprime(n): for i = 2, . .., sqrt(n): if n is divisible by i return false return true What does the algorithm do? What is the running time of the algorithm expressed as a function of n ? Suppose n is represented as a binary number. Is this algorithm polynomial? Is it exponential? 3. Order the following functions from asymptotically smallest to asymptotically largest, in- dicating ties if there are any: n 2 n ! n 2.376 lg ( n ! ) n 2 lg n lg 2 n lnln n n 1 / lg n n lglg n ln n 1 n 2 lg n ( lg n ) lg n 4 lg n ( n + 1 ) ! p

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 - Homework 1 Due Tuesday 1/26 before 10:30 CSE 450/598...

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

View Full Document
Ask a homework question - tutors are online