Algorithms - CSE 202
Mathematical Preliminaries and Introductory Problems
Writing Style: We suggest the following steps in writing up your solutions, when they are applicable. For a detailed
writing s
Fundamental Tools for Algorithmic Problem Solving
The collection of problems is designed to test the competency of the students in applying
fundamental mathematical tools for algorithmic problem solvi
CSE 202: Design and
Analysis of Algorithms
Lecture 10
Instructor: Kamalika Chaudhuri
Announcements
Midterm on Feb 14 in class
Material: Greedy, Divide and Conquer, Dynamic
Programming, Flows (includin
CSE 202 Spring 2010
Solution Set 1 7 April 2010
Chapter 1, Problem 1: The statement is false, which is evident due to the following counterexample with 2 men (m1 and m2 ) and 2 women (w1 and w2 ). The
CSE 202 Homework 2 Solutions
1 Kleinberg & Tardos, problem 26, page 202. Time-varying Minimum Spanning Tree.
Connected graph G = (V, E ).
Each edge e E has a time-varying edge cost fe = ae t2 + be t
Greedy Method
1
Introduction
Context In general, when you try to solve a problem, you are trying to find a solution from among a large
space of possibilities. You usually do this by making a series of
Algorithms: CSE 202 Homework II
Problem 1: Nesting Boxes (CLRS)
A d-dimensional box with dimensions (x1 , x2 , . . . , xd ) nests within another box with dimensions (y1 , y2 , . . . , yd )
if there ex
Dynamic Programming
1
Least Weight Subsequence
Problem 1: Maximum sum among nonadjacent subsequences
Find an efficient algorithm for the following problem:
We are given P
an array of real numbers V [1
Network Flows
1
Topics
Max-ow
Min-Cut
2
Exercises
3
Problems
Problem 1: Problem 26.1-9, page 650; (CLRS)
Professor Adam has two children who, unfortunately, dislike each other. The problem is so sev
Network Flows
1
Topics
Max-ow
Min-Cut
2
Exercises
3
Problems
Problem 1: Problem 7-8, Page 418, KT
Statistically, the arrival of spring typically results in increased accidents and increased need for
Algorithms: CSE 202 Homework IV
Solve problems 2, 4, 6, 7, and 8
Problem 1: Graphical Steiner tree (KT 8.38)
Consider the following version of the Steiner Tree Problem, which well refer to as Graphica
Algorithms: CSE 202 Homework III
Problem 1: Job scheduling (KT 7.41)
Suppose youre managing a collection of processors and must schedule a sequence of jobs over time.
The jobs have the following chara
Greedy Method
1
Topics
Greedy algorithms
Minimum spanning trees
Human codes
2
Exercises
Problem 1: Removing edges (DPV)
Design a linear-time algorithm for the following task.
Input: A connected, un
Network Flows
1
Network flow problems
Problem 1: Blood supply (KT)
Statistically, the arrival of spring typically results in increased accidents and increased need for emergency
medical treatment, whi
Graph Algorithms
1
Topics
Graphs
Depth-rst search
Strongly connected components
Breadth-rst search
2
Exercises
Problem 1: Reverse of a graph (DPV)
The reverse of a directed graph G = (V, E) is ano
Graph Algorithms
1
Topics
Graphs
Depth-rst search
Strongly connected components
Breadth-rst search
2
Exercises
Problem 1: Reverse of a graph (DPV)
The reverse of a directed graph G = (V, E) is ano
Algorithms: CSE 202 Homework II
Solve problems 2, 3, 4, 6, and 7.
Problem 1: The tramp steamer problem (DPV)
You are the owner of a steamship that can ply between a group of port cities V . You make m
Introduction to Algorithms
Jon Kleinberg
Eva Tardos
Cornell University
Spring 2003
c Jon Kleinberg and Eva Tardos
2
Contents
1 Introduction
1.1 Introduction: The Stable Matching Problem
1.2 Computatio
Dynamic Programming
1
Topics
Dynamic Programming
2
Exercises
Problem 1: MAX-SUM among nonadjacent subsequences
Find an ecient algorithm for the following problem:
We are given an array of real number
Algorithms: CSE 202 Practice Problems for Dynamic
Programming
1. You have a data structure S that is too large to store on one machine, so you plan to store
the n dierent elements on k identical machi
Series, Functions, and Recurrence Relations
1
Topics
1. Arithmetic and geometric series
2. Functions
3. Order notation
4. Recurrence relations
2
Exercises
Problem 1: Function growth
Suppose you have a
CSE 202 Calibration Homework
Fall, 2012
All parts are worth 20 points. Due October 4, start of class
Recurrence Let T (n) be the function given by the recursion: T (n) = nT ( n )
k
for n > 1 and T (1)
Divide and Conquer Technique
1
Topics
1. Divide and conquer technique
2
Exercises
Problem 1: Integer multiplication (DPV book)
Use the divide-and-conquer integer multiplication algorithm to multiply t
Dynamic Programming
1
Topics
Dynamic Programming
2
Exercises
Problem 1: MAX-SUM among nonadjacent subsequences
Find an ecient algorithm for the following problem:
We are given an array of real number
Fundamental Tools for Algorithmic Problem Solving
The collection of problems is designed to test the competency of the students in applying
fundamental mathematical tools for algorithmic problem solvi
Design and Analysis of Algorithms Undergraduate Level
The collection of problems is designed to test the studentscompetency in the design and analysis
of algorithms at the undergraduate level. Solving
NP-Completeness and Approximation Algorithms
1. Problem 34.2-11, Page 983 (CLRS)
2. Problem 34.4-7, Page 1003 (CLRS)
3. Problem 34.5-1, Page 1017 (CLRS)
4. Problem 34.5-2, Page 1017 (CLRS)
5. Problem
Algorithms: CSE 202 Homework III Solutions
Problem 1: Job scheduling (KT 7.41)
Suppose youre managing a collection of processors and must schedule a sequence of jobs over time.
The jobs have the follo
Algorithms: CSE 202 Homework IV Solutions
Problem 1: Hamiltonian path (KT 10.3)
Suppose we are given a directed graph G = (V, E), with V = cfw_v1 , v2 , . . . , vn , and we want to decide
whether G ha
Algorithms: CSE 202 Homework 2
Problem 1: Nesting Boxes (CLRS)
A d -dimensional box with dimensions (x 1 , x 2 , , x d ) nests within another box with
dimensions ( y 1 , y 2 , , y d ) if there exists
Algorithms: CSE 202 Homework 1
Problem 1: Next greater element
Given an array, print the Next Greater Element (NGE) for every element. The Next Greater Element of an
item is the first greater ele
Algorithms: CSE 202 Homework 2
Problem 1: Nesting Boxes (CLRS)
A -dimensional box with dimensions ($ , & , , ( ) nests within another box with
dimensions ($ , & , , ( ) if there exists a per