Induction Proofs
Note: This document is based on
http:/www.purplemath.com/modules/inductn.htm
Let P(n) be a predicate (a proposition, usually a formula, which is either true or not) defined for integers n
and let a be a nonnegative integer. A proof by mat
General (Strong) mathematical induction
Let P(n) be a predicate defined for integers n, and let a and b be fixed integers with a < b. A proof
by general or strong mathematical induction has two steps, just like regular induction:
1.
Basic Step. Show that
Course Information
CS575
Instructor and TA contact information
Instructor: Michal Cutler
Office: Q07
Office hours: M, 2:00PM-4:00PM
Email: Cutler Michal [email protected]
Teaching assistant:
Office:
Office hours:
Email:
Prerequisites
Undergraduate dat
Floors and ceilings formulas and proofs
Page 51 in second edition of text, page 54 in the third edition.
floor(x) is the largest integer not greater than x and ceiling(x) is the smallest integer not less than
x.
1. x-1< x x x < x+1 (3.3 in Cormen)
Proof f
Heap Sort
The Heap Data Structure
Basic Heap Property
Complete binary tree
All internal nodes have two children
All leaves have depth d
Essentially complete binary tree
It is a complete binary tree down to a depth of d-1
The nodes with depth d are as far
Algorithm Design Strategy
Divide and Conquer Revisit
Notes on Brute-force approach
More example by using Divide
and Conquer method
Introduction of D&C Approach
Finding closest pair of points
Quicksort
Matrix Multiplication Algorithm
Large Integer Multipli
Recurrences
Execution of a recursive program
Deriving & solving recurrence equations
Recursion
What is the recursive definition of n! ?
if n is 0 or 1
1
n!
n ( n - 1)! ) otherwise
Program
int fact(int n) cfw_
if (n<=1) return 1;
else return n*fact(n-1);
Design and Analysis of Algorithms
Math preparation
It is very important that you have the Math skills needed for this class. Often
students receive a low a grade in an exam because of Math related errors.
The goal of this document is to make you aware of
CS575
Fall 2015
Design and Analysis of Algorithms
Theory Assignment 1
Due: September 17, 2015 at 8:30AM
Please submit a paper copy of your answers.
Note lg denotes log to base 2, and e denotes the base of the natural logarithm function.
Part I [30%]
2
1.
Renaming Worksheet
Your name: _
MUL result: P_ = _
Dst
Fetch
Decode
Adder
Dep 0 Dep2 Dep 4
Src1
ADD R1,R2,R3
ADD P_,P_,P_
Dep 1 Dep 3 Dep 5
Src2
1
1
2
2
3
3
Dst
P2
Dep 6 Dep 8 Dep 10
Free List:
4 5 6 7
Src1
11
Dep 7 Dep 9 Dep 11
Src2
4
Dependency Slot
0
Speculative Execution
Main Idea
General: Execute instructions that may not be
needed, before it is known whether or not they
will be needed.
Optimistic: Execute instructions whose
correctness is uncertain.
If execution turns out to be incorrect or
unneces
Official Release
CS 520: Computer Architecture and Organization
Spring 2017: Prof. Timothy N. Miller
Homework 1
Deadline: TBA, but sooner than you expect
This is the final version of the assignment. All further clarifications will appear as
announcements
Computer Architecture
& Organization
CS 520
Timothy N. Miller
(Course materials from Kanad Ghose)
1
About the Instructor
Timothy Normand Miller
16 years of industry experience
Chip design, embedded systems, software
PhD from Ohio State, 2012
Speciali
Memory Systems
Memory Hierarchy
Smaller and closer are faster
Flipflops
Register files
Larger and further away are cheaper
DRAM
Hard disks
STORAGE
Fastest
Slowest
DELAYS: Absolute
DELAY: in CPU clocks
Isolated latches
a few psecs to a few nsecs
< 1
CS 520
Part II
Instruction Pipelines
Timothy N. Miller
Terminology
Instruction issuing: D/RF -> EX
Scalar pipeline: Issue one ins/cycle
Functional unit: Pipeline stage or logic
unit that implements operations
Terminology
Sequential Execution Model
Ex
Arithmetic progression
From Wikipedia, the free encyclopedia
In mathematics, an arithmetic progression or arithmetic sequence is a sequence of numbers
such that the difference of any two successive members of the sequence is a constant. For
instance, the
Design and Analysis of Algorithms
Practice Final Exam
NAME _
1. [Dynamic programming 25%]
a. Apply dynamic programming to algorithm X [10%]
b. Given the recurrence equation for Y write pseudo code for a recursive and
memoized algorithm that solves the pro
Definitions for permutations and combinations:
Page 1095 in second edition of Cormen.
1. Definition: k-permutations ordered subsequence of k distinct elements of set S.
For example when S=cfw_a, b, c the 2-permutations are ab, ac, ba, bc, ca, cb.
n ( n1 )
Algorithm Design Strategy
Divide and Conquer Revisit
Notes on Brute-force approach
More example by using Divide
and Conquer method
Introduction of D&C Approach
Finding closest pair of points
Quicksort
Matrix Multiplication Algorithm
Large Integer Multipli