CME 323 Midterm Solutions
May, 2016
Problem 1
(15 points) Consider scheduling a sequence of jobs J1 , J2 , . . . , Jt on m machines. We wish to
minimize the time it takes for the heaviest loaded machine to finish, i.e. we wish to minimize
the makespan.
Gi
CME 305: Discrete Mathematics and Algorithms
The following lecture notes are based heavily on the paper by Spielman and Srivastava, sometimes following
it literally.
1
Introduction
The goal of sparsification is to approximate a given graph G by a sparse g
CME 305: Discrete Mathematics and Algorithms
1
Computation and Intractability
In this series of lecture notes, we have discussed several problems for which there exist polynomial time
algorithms for producing solutions min-cut, shortest s-t path, whether
CME 305: Discrete Mathematics and Algorithms
Instructor: Reza Zadeh ([email protected])
HW#2 Due at the beginning of class Thursday 02/09/17
1. (Kleinberg Tardos 7.27) Some of your friends with jobs out West decide they really
need some extra time each d
CME 305: Discrete Mathematics and Algorithms
Instructor: Reza Zadeh ([email protected])
HW#3 Due at the beginning of class Thursday 03/02/17
1. Consider a model of a nonbipartite undirected graph in which two particles (starting
at arbitrary positions) f
CME 305: Discrete Mathematics and Algorithms
Instructor: Reza Zadeh ([email protected])
Final Review Session 03/20/17
1. Let G = (V, E) be an unweighted, undirected graph. Let 1 be the maximum eigenvalue
of the adjacency matrix (A) of G. Suppose
is the m
CME 305: Discrete Mathematics and Algorithms
Instructor: Reza Zadeh ([email protected])
HW#1 Due at the beginning of class Thursday 01/26/17
1. Prove that at least one of G and G is connected. Here, G is a graph on the vertices of
G such that two vertice
Discrete Mathematics and Algorithms
June 2015
Qualifying Exam
1. (10 points) Consider a graph G on 2n vertices where every vertex has degree at least
n. Prove that G contains a perfect matching.
2. (20 points) At lunchtime it is crucial for people to get
Discrete Mathematics and Algorithms Qualifying Exam
September 2015
1. (10 points) Prove that a graph with 2n nodes and minimum degree n must be connected.
2. (15 points) The problem of maximum clique is to find the largest clique in a given graph.
This is
Discrete Mathematics and Algorithms
June 2016
Qualifying Exam
1. (15 points) Prove that a tree T has a perfect matching if and only if for every vertex
v the graph T v has exactly one odd component (a component with an odd number
of nodes).
2. (15 points)
Discrete Mathematics and Algorithms
June 2014
Qualifying Exam
1. (10 points) Show that every graph on m edges has a subgraph on at least m/2 edges
which is bipartite.
2. (15 points) The hypercube graph Qh is an undirected regular graph with 2h vertices,
w
Discrete Mathematics and Algorithms Qualifying Exam
September 2014
1. (10 points) A vertex cover of a graph is a subset C of the vertices such that each edge of
the graph is incident to at least one vertex of C. Formulate an Integer Linear Program
to find
Discrete Mathematics and Algorithms
September 2016
Qualifying Exam
1. (10 points) Let X be a non-negative random variable with expectation E[X] = 0
and variance 2 . Prove that for all > 0,
+ 2
P r[X ] 2
+ 2
2. In a graph G(V, E) a dominating set S is a
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#3 - Due at the beginning of class May 18th.
1. Download the following materials:
Slides: http:/stanford.edu/~rezab/dao/slides/itas_workshop.pdf
Spark and Dat
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#3 - Due at the beginning of class May 18th
1. Download the following materials:
Slides: http:/stanford.edu/~rezab/classes/cme323/S15/slides/itas_workshop.
pdf
CME 192
Assignment 1
Due: October 11, 2016
10:00am
Introduction
Eigenvectors and eigenvalues come up in many very different contexts and if you arent already familiar
with them, you probably soon will be, whether you study economics, ecology, physics, or
function C = f_matMult(A,B,type)
%C = f_matMult(A, B, type)
%This function will multiply two matrices, element wise or matrix wise
%
%Input: A, B - matrices to be multiplied
%
type - a string containing the multiplication type "elem" or "mat"
%
%Output: C
%Test script for the function f_matMult
% Test element-wise multiplication
%cfw_
%Define two matrices
A = rand(5,6);
B = rand(5,6);
%Call function
C = f_matMult(A,B,'elem');
%Check result again Matlab's implementation
C_check = A.*B;
check = isequal(C, C_
CME 323: Distributed Algorithms and Optimization, Spring 2015
http:/stanford.edu/~rezab/dao.
Instructor: Reza Zadeh, Matroid and Stanford.
Lecture 18, 5/25/2016.
Landreman.
Scribed by Vishakh Hegde, Alex Williams and Patrick
Lecture outline:
Matrix multi
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#4 - Due 5/25
1. Consider solving connected components via the Pregel framework. In general the naive
algorithm works well because the diameter of the graph is
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#1 Solution
1. The Karatsuba algorithm multiplies two integers x and y. Assuming each has n bits
where n is a power of 2, it does this by splitting the bits of
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#2 Due at the beginning of class April 27th
1. List Prefix Sums As described in class, List Prefix Sums is the task of determining
the sum of all the elements b
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#2 Due at the beginning of class April 27th
1. List Prefix Sums As described in class, List Prefix Sums is the task of determining
the sum of all the elements b
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#1 Due at the beginning of class April 11th
1. The Karatsuba algorithm multiplies two integers x and y. Assuming each has n bits
where n is a power of 2, it doe
CME 323: Distributed Algorithms and Optimization, Spring 2015
http:/stanford.edu/~rezab/dao.
Instructor: Reza Zadeh, Matroid and Stanford.
Lecture 9, 4/25/2016. Scribed by Max Bodoia, Erik Burton, and Nikhil Parthasarathy.
9
Lecture 9
9.1
9.1.1
Scheduling
CME 323: Distributed Algorithms and Optimization, Spring 2016
http:/stanford.edu/~rezab/dao.
Instructor: Reza Zadeh, Matroid and Stanford.
Lecture 1, 3/28/2016. Scribed by Jane Bae, Sheema Usmani, Andreas Santucci.
1
Overview
Course Outline In the first h
CME 323: Distributed Algorithms and Optimization
Instructor: Reza Zadeh ([email protected])
HW#4 - Due at the beginning of class May 24th
1. Consider solving connected components via the Pregel framework. In general the naive
algorithm works well because