Homework 1 Hints
September 11, 2015
1
Greedy
Visualize the leaks as points l1 , l2 .ln lying along a straight line/pipe,
where ln is the location of the nth leak. Let the length of a strip be s.
Describe what your solution looks like, in terms of where
Homework 5
November 18, 2015
Problem 1
Let G = (V, E) be a ow network with source s, sink t, and integer capacities. Suppose that we are given a
maximum ow in G.
a) Suppose that the capacity of a single edge (u, v) E is increased by 1. Given an O(|V | + |
CSE 6140 Assignment 1
due Sept. 14, 2015 at 5 pm on t-square
Please upload 1) a PDF with solutions of Problems 1 and 2; 2) a PDF of your
report for Problem 3; 3) a single zip le of your code, README, results for
Problem 3.
1
Greedy 1
A 30 foot long water
Minimum_strips (L, length)cfw_ /L represents an array which records each length eaks
position on the seam, length represents the length of the water pipe
i <- 0
/set the first leak on the seam as the start point
S <- Set of repaired leaks
Count<-0 /record
minimum_strip(L,n)cfw_ /n represents a set containing each leak,L represents a list of
distances of adjacent leaks in clockwise order
count = 0/ the number of strips
span = 0/ the biggest distance from the start point to the next point
k.sort() / sort the
Minimum_strips (L, length)cfw_ /L represents an array which records each length eaks
position on the seam, length represents the length of the water pipe
i <- 0 /set the first leak on the seam as the st
CSE 6140:
Computa0onal Science and Engineering
ALGORITHMS
review
Project Presenta0ons
3-4 minutes per team (make sure you do not take more than 4
minutes)
Highlight of approaches you took, and what worked best, ke
CSE6140 Homework 2
September 2015
1
Scheduling with Weights [10 pts]
The deadline for homework 1 is upon us. The TA sits in front of the computer,
with a mountain of emails from students with doubts. Say we have a set of
n emails to answer, where each ema
CSE 6140 Assignment 1 Solutions
September 30, 2015
1
Greedy
4 points for the correct algorithm
1 point for correct time complexity
2.5 + 2.5 points for the optimal substructure and greedy choice property proofs
Else for exchange arguments: 2 points for de
CSE 6140: C OMPUTATIONAL S CIENCE AND E NGINEERING A LGORITHMS (FALL 2014)
I NSTRUCTOR : P ROF. B ISTRA D ILKINA
Homework 1: Solutions
P ROBLEM 1: S TRING P ROCESSING (DP)
(a) Let Q(i ) be the segmentation quality of string y 1 .y i . Observe that if the
Programming Assignment
HAO ZHANG
I used Kruskal algorithm to compute the MST. The data structure I use is
Union-Find. And the time complexity for computeMST function is
O(mlgn). m is the number of edges and n is the number of nodes.
Using Union-Find struc
CSE6140 Fall2015 Project
November 18, 2015
1
Overview
The Minimum Vertex cover (MVC) problem is a well known NP-complete problem with numerous applications in computational biology, operations research,
the routing and management of resources. In this pro
SLS METHODS
Stochastic Local Search (SLS) is a widely used approach to solving hard
combinatorial optimisation problems. Underlying most, if not all, specific SLS
algorithms are general SLS methods that can be applied to many different problems. In this c
CSE6140 - Fall 2015
Computational Science & Engineering (CSE)
Algorithms
Homework 4 Solutions
1
Q1: Approximation For Bin Packing (12 points)
a) 4 points - 2 for reduction, 2 for correctness
We prove the decision version of Bin Packing is NP-Complete. The
cse6140-f15-hw3-solns
November 2015
NP-Complete [15 points]
NP-membership: 4 points (2 for stating constraints that need to be satised, 2 for polynomial
time argument)
Reduction: 3 points
Poly-time of reduction: 2 points
Correctness: 3 points each directi
CSE6140 - Fall 2015
Computational Science & Engineering (CSE)
Algorithms
Homework 4 Solutions
1
Q1: Approximation For Bin Packing (12 points)
a) 4 points - 2 for reduction, 2 for correctness
We prove the decision version of Bin Packing is NP-Complete. The
CSE 6140:
NP-completeness
based partially on course slides from Jennifer
Welch, George Bebis, and Kevin Wayne
Summary
Problems
Decision problems (yes/no)
Optimization problems (solution with best score)
P
Decision problems (decision problems) that can be
CSE 6140
Exchange argument
exchange argument:
one considers any op;mal solu;on to the problem
gradually transforms it into the solu;on found by the greedy
algorithm
without hur;ng its quality.
Used to show that
CSE 6140:
Computa0onal Science and Engineering
ALGORITHMS
Instructor: Bistra Dilkina
Assistant Professor, CSE
Proofs
Proofs by counterexample
Proofs by contradic5on
Proofs by induc5on (including structual)
Induc0ve Pro
CSE 6140:
NP-completeness
based partially on course slides from Jennifer
Welch, George Bebis, and Kevin Wayne
Summary
Problems
Decision problems (yes/no)
Optimization problems (solution with best score)
P
Decision problems (decision problems) that can be
CSE 6140:
NP-completeness
based partially on course slides from Jennifer
Welch, George Bebis, and Kevin Wayne
NP-Completeness
So far we have seen a lot of good news!
Such-and-such a problem can be solved quickly (i.e., in close to
linear time, or at least
CSE 6140 Assignment 1 - Solutions
Please upload 1) a PDF with solutions of Problems 1, 2 and 3; 2) a PDF of
your report for Problem 4; 3) a single zip file of your code, README, results
for Problem 4.
1
Simple Complexity
1. For each pair of functions f an
CSE 6140 Assignment 2 - Solutions
Please upload a PDF with solutions to all the problems. If you handwrite the
solutions first, please make sure all answers are legible; no credit will be given
to illegible answers.
1
Greedy - The Great Ice Cream Sale
Bei
CSE6140/CX4140 - Entry Quiz
Instructions: PLEASE WRITE YOUR NAME and GT ACCOUNT ON EACH
PAGE. NUMBER EACH PAGE.
1
Basics [6 pts] - You can write answers here.
a) (1 pts) If an algorithm takes n3 steps where n is the size of the input, how
much longer will
CSE 6140 Assignment 1
due Wednesday, Sept. 28, 2016 at 11:55pm EDT
on T-Square
Please upload a PDF with solutions to all the problems. If you handwrite the
solutions first, please make sure all answers are legible; no credit will be given
to illegible ans