Week 3: Solving recurrences
Agenda:
I
Divide and Conquer and analyzing recursive programs
I
Solving recurrences
I
Iterated substitution
I
Recursion tree method
I
Guess and test method
I
Master Theorem method
CLRS pages: 30-39, 65-67, 83-97
1/28
Divide and
CMPUT 291
SQL Basics
Textbook: Sec. 5.2
Jrg Sander
*Disclaimer: The slides used in the course may contain some of the slides
provided by the authors of the adopted textbook (present and past) and those
used in previous editions of this course by other ins
ACID Properties of Database
Transactions
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of this course by different instructors.
Query Optimization Basics &
Database Tuning
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of this course by different instructor
Indexes
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of this course by different instructors.
1
Tree-Structured Indexes
2
Suppo
Relational Normalization Theory
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of this course by different instructors.
1
Limitat
Week 9: Dynamic Programming
Dynamic programming introduction:
Week 9: Dynamic programming
Agenda:
I
Introduction
I
0/1 Knapsack (briefly mentioned on page 425 of CLRS)
I
Chain Matrix Multiplication (pages 373-378 of CLRS)
I
Longest Common Subsequence (pag
Week 8: More Divide and Conquer
Example 1: Multiplication of large integers :
Week 8: More Divide and Conquer
I
Suppose we are dealing with integers that have hundreds of (binary) bits
(e.g. 256 or 512 bits).
I
Such integers are too big to fit into one me
Week 10: Graphs and Graph Traversals
Agenda:
Week 10: Graphs
Graphs basic definitions
I Graphs Representation
I Graph Traversals: Breadth First Search (BFS) and applications
Reading:
I CLRS: 589-602; also 1168-1172 (Appendix B.4)
I
Q: Why study graphs?
A
Week 8: Greedy Algorithms
Agenda:
I
Week 8: Algorithm Design Techniques
Greedy Algorithms
I
Fractional Knapsack
I
Activity Selection
I
Job Scheduling on Multi-processors
Algorithm Design Techniques:
I Three major design techniques are:
1. Divide and Conqu
Divide and Conquer and recursive programs
I
Week 3: Solving recurrences
I
Agenda:
I
Divide and Conquer and analyzing recursive programs
I
Solving recurrences
I
Iterated substitution
I
Recursion tree method
I
Guess and test method
I
Master Theorem method
A
Week 5: QuickSort
Recall QuickSort :
I
I
Week 5: QuickSort, Randomness, Lower bound
I
I
Agenda:
I
QuickSort : Worst, Best and Average case
I
Random QuickSort
I
Lower bound for sorting
I
Pick one key
Compare to others: partition into smaller and greater su
Week 4: Heaps
Heaps data structure (recall):
Week 4: Heapsort, Quicksort
I
Agenda:
I
I
Heaps:
I
I
I
I
Max-Heapify
Build-Max-Heap
Heapsort
I
Priority Queues
I
Quicksort
I
I
CLRS: 151-169
CLRS: 170-190
A[2j] is the left child of A[j]
A[2j + 1] is the right
Week 2: Insertion Sort
Week 2: Types of analysis of algorithms, Asymptotic notations
Insertion sort pseudocode (recall)
Agenda:
I
Worst/Best/Avg case analysis
I
InsertionSort example
I
Loop invariant
I
Asymptotic Notations
I
Refreshment on logs and exps
I
CMPUT 204
Department of Computing Science
University of Alberta
Notes on Growth of Functions
Here are some justifications for the order of growth given in the lecture notes. Sometimes we igve a
formal proof, sometimes we give an intuitive argument, and so
week 1: Introduction
Official course information
Week 1: Introduction, Basic Concepts
I
I
CMPUT204: Introduction to Algorithms
Lectures: MWF, 10:00-10:50 (TEL 150)
Seminars (starting from the second week of the term)
I
I
I
Agenda:
I
Course information
I
A
Insertion sort pseudocode (recall)
Week 2: Types of analysis of algorithms, Asymptotic notations
InsertionSort(A) *sort A[1.n] in place
Agenda:
I
Worst/Best/Avg case analysis
I
InsertionSort example
I
Loop invariant
I
Asymptotic Notations
I
Refreshment on
CMPUT 291
Relational Algebra
Textbook: Sec. 5.1
Jrg Sander
*Disclaimer: The slides used in the course may contain some of the slides
provided by the authors of the adopted textbook (present and past) and those
used in previous editions of this course by o
CMPUT 291
SQL Updates, Views, NULL
Values, and Constraints
Textbook: Sec. 5.3
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of t
Week 8: More Divide and Conquer
Agenda:
I
More on the Divide and Conquer technique
I
I
Multiplication of large integers (Karatsubas Algorithm)
Matrix multiplication (Strassens Algorithm) (CLRSpages 75-82)
Divide and Conquer :
I
Have already seen some exam
Week 9: Dynamic programming
Agenda:
I
Introduction
I
0/1 Knapsack (briefly mentioned on page 425 of CLRS)
I
Chain Matrix Multiplication (pages 373-378 of CLRS)
I
Longest Common Subsequence (pages 390-396 of CLRS)
1/23
Week 9: Dynamic Programming
Dynamic p
Week 4: Heapsort, Quicksort
Agenda:
I
Heaps:
I
I
I
Max-Heapify
Build-Max-Heap
Heapsort
I
Priority Queues
I
Quicksort
Reading:
I
CLRS: 151-169
CLRS: 170-190
1/33
Week 4: Heaps
Heaps data structure (recall):
I
An array A[1.n] of n comparable keys (either or
Week 1: Introduction, Basic Concepts
CMPUT204: Introduction to Algorithms
Agenda:
I
Course information
I
Algorithms concepts
I
Induction proofs
I
Pseudo-code, RAM model
Textbook: pages 3-29, Cmput 272 material on Induction.
1/27
week 1: Introduction
Offic
Week 5: QuickSort, Randomness, Lower bound
Agenda:
I
QuickSort : Worst, Best and Average case
I
Random QuickSort
I
Lower bound for sorting
Reading:
I
CLRS: 170-193
1/34
Week 5: QuickSort
Recall QuickSort :
I
The ideas:
I
I
I
I
Pick one key
Compare to othe
UNIVERSITY OF ALBERTA
CMPUT 204
Midterm, 10:00-10:50am, Feb 17 2017
Last Name:
First Name:
Do not turn this page until you have received the signal to start. In the meantime, please
write your name above.
When starting, first write your ID on top of nex
Midterm
CMPUT 204
Department of Computing Science
University of Alberta
Length: 50 min
Your name and CCID:
Note: All logarithms are in base 2 unless specified otherwise. We denote R+ = cfw_x R : x > 0
Problem 1. (50 pts) Small questions.
(i) (10 pts) Part
CMPUT 229 - Computer Organization and Architecture I
Homework #2
Prof. Jose Nelson Amaral - Computing Science - University of Alberta
Question 1:
A computer program takes 800 seconds to execute 2.5 1012 instructions. If the CPI is 0.80
clock cycles per in
CMPUT 229 - Computer Organization and Architecture I
Homework #1
Prof. Jose Nelson Amaral - Computing Science - University of Alberta
Question 1: Assume that B is an array of 32-bit unsigned integers, N is a constant that has
been stored in register $s0,
Data Organization on
Disks
Jrg Sander
*Disclaimer: The slides used in the course are a mix-and-match of the slides
provided by the authors of the adopted textbook and slides used in previous
editions of this course by different instructors.
1
Physical Dis
CMPUT 291
The Relational Data
Model
Textbook: Sec. 2.1, 2.2, Chapter 3 (except
3.3.4-3.3.6, 3.3.8, 3.3.11-3.3.12 covered later)
Jrg Sander
*Disclaimer: The slides used in the course may contain some of the slides
provided by the authors of the adopted tex