University of Nevada Las Vegas
Howard R. Hughes College of
Engineering
School of Computer Science
My Home Page
UNLV CSC 302 Fall 2014 Assignment 1

CS 302 Assignment 1
Due date: Tuesday, January 28, 2014, 10:00 PM in class.
All written assignments must be handwritten
(not typed or printed from a
computer file) in your own handwriting, on 8.5 by 11 inch paper, or on A4
paper. Write your name on each sheet, and do not fold the pages or crimp the
corners. (You may use a paper clip or a staple.)
Turn the pages in to me or to the graduate assistant on the due date.
For each problem that comes from the textbook,
I'll give the problem and page number for both the
third
and
fourth
edition.
Work
Problem 2.7 on page 64 of the third edition.
Problem 2.7 on page 72 of the fourth edition.
Out of books in the bookstore?
For each of the six code fragments:
-
Guess the asymptotic complexity of sum,
in terms of n.
-
Run the code on a computer, with a small number of
appropriately chosen values of n.
(Choosing appropriate values is part of the assignment.)
You are not required to submit your
computer code.
-
Make a table showing values of sum for each
value of n.
-
Revise (or retain) your guess, based on those outputs.