T H E P R I Z E I N E C O N O M I C S C I E N C E S 2 0 12
INFORMATION FOR THE PUBLIC
Stable matching: Theory, evidence, and practical design
This years Prize to Lloyd Shapley and Alvin Roth extends from abstract theory developed in the 1960s,
over empiri
* File "miles.dat" from the Stanford GraphBase (C) 1993 Stanford University
* Revised mileage data for highways in the United States and Canada, 1949
* This file may be freely copied but please do not change it in any way!
* (Checksum parameters 696,29599
CS:3330 Spring 2017: Homework 8
Due at the start of class on Tue, April 18
Traveling Salesman Problem (TSP)
Given a set P of points (e.g., a bunch of cities) and pairwise distances between these points, the
Traveling Salesman Problem (TSP) seeks to find a
CS:3330 Exam 2 Solution, Spring 2017
1. (a) cfw_1, 8, 12, 3, 16, 10
(b) 1.
2.
3.
4.
5.
6.
7.
t ; S
while there is an interval that starts at or after t do
if there is no interval I such that start(I) t < f inish(I) then
t start time of earliest interval
CS:3330 Homework 9, Spring 2017
Due at the start of class on Thursday, April 27th
1. In Problem 11, Lecture 1 from Jeff Ericksons notes, there is pseudocode for a recursive
function called StoogeSort.
(a) Write down the recurrence relation for the running
CS:3330 Homework 9, Spring 2017
Due at the start of class on Thursday, April 27th
1. (a) Let T (n) denote the running time of StoogeSort on an input of size n. This running
time is given by the following recurrence relation
T (2) = 1
T (n) = 3T (2n/3) +
CS:3330 Spring 2017: Homework 4
Due at the start of class on Tue, Feb 21
Vertex Cover Algorithms
In this assignment you will implement the different algorithms we discussed in class for the minimum vertex cover (MVC) problem and analyze their performance
CS:3330 Spring 2017: Handout 1
Review of Common Classes of Running Times
Sriram V. Pemmaraju
Shreyas Pai
We will spend a substantial amount of time in this course analyzing the running time of
algorithms. The running time of an algorithm is expressed as a
CS:3330 Solutions to Homework 10, Spring 2017
1. Consider Problem 1 from Lecture 5 in Jeff Ericksons notes.
(a) Since 91 4 + 52 = 416, we can make change for 416 using 5 bills. However, the
greedy algorithm uses 365, 28, 13, 7, 1, 1, 1 which is 7 bills.
(
CS:3330 Homework 7, Spring 2017
Due in class on Thursday, March 30th
1. Consider the GenericSSSP algorithm on Page 4 of Lecture 21 (from Prof. Jeff Ericksons
notes). (In class, I have been calling this the Dantzig-Ford algorithm (version 2). As
you know,
CS:3330 Exam 1, Fall 2015
Thursday, Sept 24 2015, 6:30 pm to 8:30 pm
1. Here are two problems on understanding the growth rate of functions that represent running
times of algorithms and the use of asymptotic notation.
(a) Take the following list of funct
CS:3330 Spring 2017: Solutions to Homework 7
Sriram Pemmaraju
Problem 1
Initially: dist(s) = 0, dist(v) = for all v 6= s, pred(v) = N U LL for all v.
Phase 1: Queue at the start of Phase 1: (s); Edges that are relaxed (in this order): (s, a), (s, b);
New
CS:3330 Homework 1, Spring 2017
Due in class on Thu, Jan 26
1. Decide whether you think the following statement is true or false. If it is true, give a short
explanation. If it is false, give a counterexample.
True or false? In every instance of the Stabl
Pseudocode and Analysis of the Greedy Algorithm for the Minimum Dominating Set problem
CS:3330, Spring 2017, Sriram Pemmaraju
(a) The greedy algorithm in Problem 3 with input adjacency list can be implemented in the following way:
Algorithm 1 Dominate(L)
CS:3330 Exam 2, Spring 2017
Tuesday, April 4 2017, 6:30 pm to 8:30 pm
1. Let X be a set of n intervals on the real line. A subset of intervals Y X is called a tiling path
if the intervals in Y cover the intervals in X, that is, any real value that is cont
CS:3330 Homework 10, Spring 2017
Due at the start of class on Thursday, May 4th
1. Consider Problem 1 from Lecture 5 in Jeff Ericksons notes.
(a) Solve Problem 1(a) from Jeff Ericksons notes.
(b) Now we want to solve the problem of using the fewest number
Sec. 9.5 Properties mm ualm iransfnrm
Example 9.16 .
m: miuid-andn-vduemeomcanbeusedmeheckingthewnmsofie
.2. Liphce transform calculations for a signal. For example. consider the signal x(:) in
Example 9A From eq. (924). we see that x(0+) = 2, Also. using
'I
'I
U1
10.5.9
nx[n]
R
-z-;JZ
dX(z)
At least the intersection of R and
lzl > 1
_l_X(z)
1 - z- 1
Initial Value Theorem
If x[n] = 0 for n < 0, then
x[O] = limX(z)
z-x
Differentiation
10.5.8
in the z-domain
Accumulation
(1 - z- 1 )X(z)
X1 (z)Xz(z)
R
At leas
Computational Geometry
The systematic study of algorithms and data structures for
geometric objects, with a focus on exact algorithms that are
asymptotically fast.
Two key ingredients of a good algorithmic solution:
Thorough understanding of the problem
Balanced Trees
Balanced trees have height
Height-balanced trees
At each node, height of left and right subtrees are close.
e.g. AVL trees, B-trees, red-black trees, splay trees
Weight-balanced trees
At each node, number of nodes in left and right subtrees
(Notes partially modified from Dr. Fernandez-Bacas)
Graph
A graphis a set of vertices (nodes) and a set of
edges which are pairs of vertices.
vertex
edge
12 vertices
13 edges
A Directed Graph
In a directed graph (digraph), edges are ordered pairs.
DL 435
Edge Relaxation
Test if the shortest path to found so far can be improved by
going through .
w
Relax u, v
if
then
pred() =
Shortest path algorithms differ in
the number of times the edges are
relaxed and the order in which they
are relaxed.
pred(v)
u
pred
Depth-First Search
Idea: Keep going forward as long as there are unseen nodes
to be visited. Backtrack when stuck.
is completely traversed
before exploring and .
Color Map & Predecessor
Just like in BFS:
color() = green: is undiscovered and unprocessed
Graph Traversals
Visit vertices of a graph to determine some property:
Is connected?
Is there a path from vertex to vertex ?
Does have a cycle?
Will removing a single edge disconnect ?
If is directed, what are the strongly connected components?
If is the
Infix Notation
Each binary operator is placed between its operands.
Each unary operator precedes its operand.
-2 + 3 * 5
(-2) + (3 * 5)
Postfix expressions are easy to evaluate:
no subexpressions
precedence among operators already accounted for
But this i
Map
k 2 v2
k1 v1
k3 v3
If keys are integers in a small range,
use an array indexed by key.
v2
v1
v3
k2
k1
k3
What if keys are from a large range or not even integers?
Hash Tables
A hash table is a lookup table that acts as if it had random access into
an
Binary Search Trees
Storage of elements for efficient access.
Support for dynamic set operations.
The binary-search-tree property (satisfied at every node):
1. The data (or key) values in the left subtree are less than
the value of the node.
2. The data (
Preorder Traversal
1. Visit the node.
2. Traverse the left subtree.
3. Traverse the right subtree.
a
Traversal order: abdce
b
c
d
e
Notes by Yan-Bin Jia
Postorder Traversal
1. Traverse the left subtree.
2. Traverse the right subtree.
3. Visit the node.
a
Open Quick Links
Quick Links
Page Landmarks
Content Outline
Keyboard Shortcuts
Logout
Global Menu
Luke SternhagenActivity Updates
Home
Help
Top Frame Tabs
My ISU Tab Courses Tab 2 of
1 of 6
6 (active tab)
Organizations Tab Content Collection
3 of 6
Tab