ECE 606 : Practice Homework 4
Answer the following questions :
1. Considering the graph in gure 1:
(a) Considering the graph as undirected, list the sets of nodes in each connected
component.
(b) Considering the graph as directed, list the sets of nodes i

ECE 606 : Practice Homework 4
Answer the following questions :
1. Considering the graph in gure 1:
(a) Considering the graph as undirected, list the sets of nodes in each connected
component.
(b) Considering the graph as directed, list the sets of nodes i

22.
rmhhmuKR4ﬂ./7
i
Chapter 1 Introduction: Some Representative Problems
Proof. Our general deﬁnition of instability has four parts: This means that we
have to make sure that none of the four bad things happens.
First, suppose there is an instability of

Chapter 5
Divide and Conquer
In the last chapter we studied greedy algorithms for solving certain problems. We will
now study another commonly studied class of algorithms that are based on the principle
of divide and conquer.
5.1
Mergesort
To motivate the

Chapter 4
Greedy Algorithms
We will now study a commonly used class of algorithms, known as greedy algorithms.
Loosely speaking, a greedy algorithm nds a solution to an optimization problem by
iteratively making decisions that myopically optimize some met

Chapter 3
Graphs
Many problems that we run into can be cast in the language of graphs. We will thus
discuss some necessary concepts pertaining to graphs, as well as some algorithms to infer
certain basic properties of graphs.
3.1
Denitions
A graph G is a

Chapter 2
Measuring E ciency of
Algorithms
We will now discuss some standard ways to quantify the e ciency of algorithms. We will
start by focusing on run-time (i.e., how long it takes the algorithm to nd the answer);
later, we will consider how much memo

Algorithms: Analysis and Design
Mark Crowley
Department of Electrical and Computer Engineering
University of Waterloo
ii
c Mark Crowley
Acknowledgments
These notes are for the graduate course on Algorithms oered at the University of Waterloo. They closely

ECE 606 : Assignment 1
Due Date: November 9, 2015 in class
Answer the following questions showing all of your work and explaining your reasoning. The writeup can be written by hand or using a word processor or LaTeX. Whatever
approach you use please be as