Tom Kelliher, CS 315
Jan. 25, 1999
Read Section 1.1.1--1.1.3.
Foundations: asymptotic analysis, mathematical induction.
Using fewer processors, the bit model, lower bounds.
Four characteristics:
Consider the following sorting algorithm which sorts the n elements
of data (the elements are indexed
):
for i := n downto 2 do
largest := i;
for j := i-1 downto 1 do
if data[j] > data[largest]
largest := j;
swap(data[largest], data[i]);
Prove that the algorithm sorts the elements of the array data into ascending order.
First, demonstrate the algorithm on the array
int data[] = { 12, 19, 6, 15 };
A linear array:

Cell properties:
Communication properties:
Example: sort 12, 19, 6, 15.
How many steps to sort? How many steps to output?
How can we measure a parallel algorithm? Apply following to sorting on the linear array.
be the running time of the fastest sequential
algorithm. Then:

What is linear speedup?
Say you have P processors. Speedup is at most P. Why? (Hint: a parallel algorithm that runs in T steps on P processors can be simulated on a sequential machine in how many steps?)
Measures algorithm inefficiencies due to idle processors.

Example: consider two algorithms for solving a problem of size M:
steps on an
processor machine.
processor machine and need to run the algorithm X
times, which algorithm should we use? Assume the
processor machine
may be split in M M processor machines.
(Recall:
.)