Lecture 4. Sorting
Introduction
Sorting is the process of arranging a list of items into a
particular order.
There must be some value on which the order is based
(e.g., increasing numerical order, lexicographic order).
There are many possible sorting a

Lecture 2. Proof Techniques
Two Proof Techniques
1. Proof by contradiction (indirect
proof)
2. Proof by mathematical induction
p, p q q
Direct proof:
Give a direct proof of the theorem:
if n is odd, then n x n is odd
q,q p p
Indirect proof:
Give an indire

Lecture 1. Preliminaries
What is an algorithm?
Origin of the word: al-Khowarizmi, Arabic scholar (780-850),
early textbook on arithmetic operations.
Algorithm: Instruction (a set of rules) for carrying out some
calculations, either by hand, or on a mach

Lecture 3. Elementary Algorithms
Problem Vs. Instance
How to Choose an Efficient Algorithm
The Size of an Instance
Measurements of Storage and Time
Time Complexity of an Algorithm
Average and Worst-Case Analysis
Elementary Operation
Elementary Operation (