ASSIGNEMNT 2
Asymptotic Analysis
Due Sep 25 at 11:30 pm
For each of the following, show that O(g)
1) f(n) = 12n^2 + 2500
g(n) = n^3
2) f(n) = 3(log(n) + 1)
g(n) = 2n
3) f(n) = 7n
g(n)= n/15
4) Runtime Analysis
For each of the following program fragments,
CS 3340.502 Computer Architecture Homework 1
Assigned: Thursday September 1
Due: Thursday September 8
In this homework, you will demonstrate that you have MARS running on your
computer and get practice with load, store and add instructions.
Program descri
Chapter 1
Computer Abstractions and
Technology
Progress in computer technology
Underpinned by Moores Law
Makes novel applications feasible
1.1 Introduction
The Computer Revolution
Computers in automobiles
Cell phones
Human genome project
World Wide Web
Se
Calling procedures
Chapter 2 Instructions: Language of the Computer 1
Steps required
1.
2.
3.
4.
5.
6.
Place parameters in registers
Transfer control to procedure
Acquire storage for procedure
Perform procedures operations
Place result in register for cal
2.10
MIPS ADDRESSING
Chapter 2 Instructions: Language of the Computer 1
MIPS instructions
MIPS instructions are limited to 32 bits
This keeps the hardware simple but puts a
limit of 16 bits for constants for load
immediate, branch and jump instructions
Ch
CSE 3345: Data Structures and Introduction to Algorithmic Analysis
Math Review
Mathematical induction
Suppose P(n) is some predicate (mentioning integer n)
Example: n n/2 + 1
To prove P(n) for all integers n n0, it suffices to prove
1. P(n0) called the b
CS 3345: Data Structures and Algorithms
Lecture 3: Asymptotic Analysis
Asymptotic Analysis
A() cfw_
int i, j
for (i=1 to n)
for (j=1 to n)
print("java")
i = 1.n
j = 1.n
O(n^2)
A() cfw_
i=1, s=1;
while (s <= n) cfw_
i+
s = s + i;
print("Java")
O(logN) -