CSE 2320 - Assignments - Assignment 2

Submit to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.

IMPORTANT: By submitting your answers, you are certifying that these answers have been exclusively your own work. All students enrolled in this course are expected to adhere to the UT Arlington Honor Code:

I pledge, on my honor, to uphold UT Arlington's tradition of academic integrity, a tradition that values hard work and honest effort in the pursuit of academic excellence. I promise that I will submit only work that I personally create or contribute to group collaborations, and I will appropriately reference any work from other sources. I will follow the highest standards of integrity and uphold the spirit of the Honor Code.


Task 1 (5 pts.)

(This is Problem 2.10 from the textbook).

Add columns to Table 2.1 for N(log N)2 and N3/2.


Task 2 (5 pts.)

(This is Problem 2.11 from the textbook).

Add rows to Table 2.1 for 107 and 108 instructions per second.


Task 3 (5 pts.)

(This is Problem 2.14 from the textbook).

How many digits are there in the decimal representation of 1 million factorial?


Task 4 (5 pts.)

(This is Problem 2.15 from the textbook).

How many bits are there in the binary representation of log(N!)?


Task 5 (10 pts.)

(This is a modification of Problem 2.19 from the textbook).

Give the largest value of N for which you can solve a problem that requires at least f(N) instructions on a machine that can execute 109 instructions per second, for the following functions f(N): N3/2, N5/4, 2NHN, N log N log log N, and N2 lg N. Assume that your program running time cannot exceed 24 hours.


Task 6 (10 pts.)

(This is Problem 2.22 from the textbook).

Show that (N + 1)(HN + O(1)) = N ln N + O (N).


Task 7 (10 pts.)

(This is Problem 2.23 from the textbook).

Show that N ln N = O(N3/2).

NOTE: In your answer, feel free to use the fact that ln(N) = O(N), you do not have to prove that.


Task 8 (10 pts.)

(This is a modification of Problem 2.30 from the textbook).

You are given the information that the running time of one algorithm A is always about N log N and that the running time of another algorithm B is always about N3. For example, for N=5:

Calculate the ranges of N under which each algorithm will run faster than the other one.


Task 9 (10 pts.)

(This is a modification of Problem 2.36 from the textbook).

Suppose that fN is proportional to a constant and that:

Show that CN is proportional to log N.


Task 10 (10 pts.)

(This is Problem 2.40 from the textbook).

Solve the recurrence:

            CN = CN/2 + N2,       for N >= 2, with C1 = 0,

when N is a power of 2.


Task 11 (10 pts.)

(This is Problem 2.42 from the textbook).

Solve the recurrence:

            CN = α CN/2,       for N >= 2, with C1 = 1,

when N is a power of 2.


Task 12 (10 pts.)

(This is Problem 2.43 from the textbook).

Solve the recurrence:

            CN = (CN/2)2,       for N >= 2, with C1 = 1,

when N is a power of 2.


How to submit

The assignment should be submitted via Blackboard. Submit a file called answers.xxx, that is a PDF or Word file containing your solutions for all tasks (there are no programming tasks in this assignment).

IMPORTANT: Pay close attention to all specifications on this page, including file names and submission format. Even in cases where your answers are correct, points will be taken off liberally for non-compliance with the instructions given on this page (such as wrong file names, wrong compression format for the submitted code, and so on). The reason is that non-compliance with the instructions makes the grading process significantly (and unnecessarily) more time consuming. Contact the instructor or TA if you have any questions.


Back to the list of assignments.