CSE331 HW2 - CSE 331: Introduction to Algorithm Analysis...

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

View Full Document Right Arrow Icon
CSE 331: Introduction to Algorithm Analysis and Design Fall 2011 Homework 2 Due Friday, September 23, 2011 by 1:15pm in class IMPORTANT: Please submit each problem separately, i.e. each problem should begin on a new page and only the pages for one problem should be stapled together. Failure to do so might result in some problem(s) not being graded. For general homework policies and our suggestions, please see the policy document. Sections 2.2 and 2.4 from the textbook might be useful for this homework. For this homework, you can assume that addition, subtraction, multiplication and division of two numbers can be done in O (1) time. (Side question: Is this assumption justified?) Do not turn the first problem in. 1. ( Do NOT turn this problem in ) This problem is just to get you thinking about asymptotic analysis and input sizes. An integer n 2 is a prime, if the only divisors it has is 1 and n . Consider the following algorithm to check if the given number n is prime or not: For every integer 2
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

CSE331 HW2 - CSE 331: Introduction to Algorithm Analysis...

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