Algorithms
Lecture 21: NP-Hard Problems
The wonderful thing about standards is that there are so many of them to choose from. Adm. Grace Murray Hopper If a problem has no solution, it may not be a pro
Algorithms for External Memory Sorting
Milind Gokhale
[email protected]
December 10, 2014
1. Abstract
Sorting has been one of the fundamental operations for processing data in any database
for a ve
CSCI 503B:
Sample Midterm
1. Which vertices in a ow problem have their incoming ow not equal
to outgoing ow? Explain. What is a capacity, what is ow on an
edge, what is residual capacity on an edge? (
jn2004.07.13
7. Complexity: P & NP
Goals of this chapter: Given a model of computation and a measure of complexity of computations, it is
possible to define the inherent complexity of a class of probl
Fall 2015
CSCI-B503: Algorithms Design and Analysis
Homework Assignment #2
Assigned: Tuesday 09/22/2015; Due: Thursday 10/08/2015 by 11:59pm through Oncourse.
total: 100 points
Problem 1
SOLUTIONS FOR HOMEWORK 6
Question 1
HALF-HAMILTON is in NP-Complete.
Consider the graph G = (V, E) where n = |V | is even, the certicate is the
sequence of n/2 vertices (v1 , v2 , . . . , vn/2 ) that
CSCI 503B: Homework 5
1. Dene half-hamilton as the problem that, given a graph on n nodes,
asks whether the graph has a simple cycle of length n/2. If you like
you can assume that n is even or round n
Homework Assignment 6
Each question has equal weight.
1. Define half-hamilton as the problem that, given a graph on n nodes, asks whether the
graph has a simple cycle of length n/2. If you like you ca
Homework Assignment 5
Each question has equal weight.
1. Solve or bound the following two recurrences:
a. T(1) = 1 and T(n) = 2T(n/4) + n log n for n > 1.
a=2
b=4
f(n) = n logn
nlogba = nlog42
Compari
Question 1
a. Direct application of Master Theorem where a = 2, b = 4, f (n) = n log n. The
solution is T (n) = (n log n).
b. This equation can be expanded directly due to the fact that f (n) = 0:
T (
CSCI 503B:
Sample Midterm
1. Let f (x) = (g(x). Give an example for f and g where log(f (x) =
(log(g(x). Give an example for f, g where log(f (x) = O(log(g(x).
Is it possible to have f, gwhere log(f (
CSCI 503B: Homework 5
Solve ALL questions.
1. Solve or bound the following two recurrences:
(a) T (1) = 1 and T (n) = 2T (n/4) + n log n for n > 1.
(b) T (1) = T (2) = T (3) = 1 and T (n) = 2T (n 3) f
b` n n Y e j g (do~m7f)U71k#m X b n n Yl g ge n rqpdoDm7)kjihefdrqDm )r yu m us I)UfIs C p ` o y b n n Y e j g rapdo~m")1k# A G Pssr"rG e j g Q TG A TA S QA Q g s ys u x v fd7kd# q q"PsrBq fI fR1DRUA