COS 423, SPRING 2013
THEORY
OF
ALGORITHMS
KEVIN WAYNE
www.cs.princeton.edu/courses/archive/spring13/cos423
Algorithm denitions
A procedure for solving a mathematical problem (as of nding
the greatest common divisor) in a nite number of steps that
frequen

CS CS 473g: Algorithms, Fall 2007
Homework 3 (due Tuesday, October 23, 2007 at 11:59.99 p.m.)
Version 1.02
Required Problems
1. The good, the bad, and the middle.
[20 Points]
sh is
ar stu
ed d
vi y re
aC s
o
ou urc
rs e
eH w
er as
o.
co
m
Suppose youre lo

A Taxonomic Introduction to Exact Algorithms
Thore Husfeldt
Lecture notes for AGAPE 2009 Spring School on Fixed Parameter and
Exact Algorithms, May 25-29 2009, Lozari, Corsica (France).1
This document attempts to survey techniques that appear in exact,
ex

CMPT 405 Design and Analysis of Algorithms
Outline Solutions to Exercises on Dynamic Programming
1. The residents of the underground city of Zion defend themselves through a combination of kung fu, heavy
artillery, and efficient algorithms. Recently they

CMPT 705 Design and Analysis of Algorithms
Date : 4th Oct. 2016
Shweta Mazumder
Sfu id: 301285153
Solution1:
Algorithm: We assume that Query(D, k) is the function to return the
k
th
smallest value in database
D. Then we can run the following function Find

CMPT 705 Design and Analysis of Algorithms
Outline Solutions to Midterm
1. Explain how to find a negative cycle in an edge weighted graph.
Lecture 6.
2. Describe Prims or Kruskals algorithm (or both).
See Lectures 3.
sh is
ar stu
ed d
vi y re
aC s
o
ou ur

CS 218, Fall 2012
Posted: November 27th, 2012
Homework 5
Due: December 13th, 2012 (Final exam)
Write on the first page your full name with upper-case LAST name, assignment number, student
ID, login
You are expected to work on this assignment on your own

CMPT 771
InternetArchitecture and
Protocols
Transport Layer Issues
Spring 2015
CMPT771 Transport Layer
1
Transport Layer Issues
Contents:
overview principles
behind transport
layer services:
multiplexing/demulti
plexing
reliable data
transfer
flow contro

CMPT816
Assignment 2
Spring 2016
Due: Friday, Feb 26, before the end of the class. Please type your answers. There are 10 points in
this assignment.
1. (1 point) Give a traffic grooming scheme for the minimum traffic grooming problem on the
all-to-all com

CMPT816
Assignment 3
Spring 2016
Due: March 18 (Fri.), before the end of the class. There are 15 points in this assignment.
1. (2 points) The partial set cover problem is that: Given a set U of n elements and subsets
Sj U, 1 j m, a weight wj 0 for each Sj

Shweta Mazumder
Sfu id: 301285153
CMPT816
Email: smazumde@sfu.ca
1.Give a traffic grooming scheme for the minimum traffic grooming problem on the
all-to-all communication pattern on the UPSR with 6 nodes and a grooming factor 4.
Answer: Here the grooming

CMPT816 16-1 Routing on Ring Qianping Gu
1
Routing on Ring Networks
Ring networks
A ring network Cn of n nodes is defined by V (Cn ) = cfw_i|0 i n 1 and E(Cn ) =
cfw_(i, j)|i = j 1 mod n, 0 i, j n 1. The edges in Cn can be undirected (undirected
ring) or

CMPT816 16-1 Optical Network Components Qianping Gu
1
Optical Network Components
The note is mainly based on Chapter 2 of Multiwavelength Optical Networks and Chapter
7 of Optical Networks, A Practical Perspective.
Layered structure Optical networks con

D ATA S TRUCTURES I I
binary heap demo
Algorithms
FOURTH
EDITION
R OBERT S EDGEWICK | K EVIN W AYNE
Copyright 2013 Kevin Wayne
http:/www.cs.princeton.edu/~wayne/kleinberg-tardos
Last updated on Sep 8, 2013 7:00 AM
Binary heap demo
heap ordered
6
10
8
12

D ATA S TRUCTURES I I
heapify demo
Algorithms
FOURTH
EDITION
R OBERT S EDGEWICK | K EVIN W AYNE
Copyright 2013 Kevin Wayne
http:/www.cs.princeton.edu/~wayne/kleinberg-tardos
Last updated on Sep 8, 2013 7:13 AM
Heapify demo
Heapify. For each element in re

D ATA STRUCTURES I , I I, I II, A ND I V
I.
Amortized Analysis
II.
Binary and Binomial Heaps
III. Fibonacci Heaps
IV. Union-Find
Copyright 2013 Kevin Wayne
http:/www.cs.princeton.edu/~wayne/kleinberg-tardos
Last updated on Sep 8, 2013 7:00 AM
Data structu

CMPT816 Assignment 1 Spring 2016
1
Due: Friday, Feb. 5, by the end of the class. Please type your answers. There are 15 points in
this assignment.
1. (1 point) Give the numbers of cross points in a 64 64 Benes network, a three-stage 64 64
Clos network wit

Shweta Mazumder
Student Id: 301285153
Email: smazumde@sfu.ca
Assignment #3
CPMT 816
Answer: The partial set cover problem as ILP :
The dual program of the primal ILP for the partial cover problem:
Shweta Mazumder
Student Id: 301285153
Email: smazumde@sfu.

CMPT816 16-1 Optical Networks Qianping Gu
1
Optical Networks
The note is mainly based on Chapter 11 of High Performance Communication Networks,
Chapter 1 of Multiwavelength Optical Networks, and Chapter 1 of Optical Networks, A
Practical Perspective.
Ov

CMPT816 16-1 RWA Qianping Gu
1
Routing and Wavelength Assignment
The note is mainly based on Chapter 6 of Multiwavelength Optical Networks.
RWA problem
A general goal in the study of wavelength routed networks is to determine the number
of wavelengths n

CMPT816 16-1 Logical Topology Qianping Gu
1
Logical Topology Design Problem
The note is mainly based on Chapter 7 of Multiwavelength Optical Networks.
Logical networks
A logical network is a virtual network with nodes connected by logical links on the o

CMPT816 16-1 Overview Qianping Gu
1
Overview of Networks
The note is mainly based on Chapters 1-2 of High Performance of Computer Networks and
Data and Computer Communications, William Starlings, 2011 Edition.
Computer/communication networks:
Telephone

CMPT816 16-1 Communication on Optical Networks Qianping Gu
1
Communications on Optical Networks
The note is mainly based on Chapter 3 of Multiwavelength Optical Networks and Chapter
8 0f Optical Networks, A Practical Perspective.
SONET/WDM networks
The

CMPT816 16-1 Traffic Grooming Qianping Gu
1
Traffic Grooming
Traffic grooming problem
A communication problem on a WDM optical network can be partitioned into three subproblems: logical topology subproblem, RWA subproblem, and traffic grooming subproblem