ECS 222A, Design and Analysis of Algorithms
Fall 2015, Filkov
Course Information Sheet
NOTE: You are responsible for the information on this handout. Please read it.
Goals: In this course we will learn about design techniques, and analysis methods for
alg

ECS 120: Introduction to the Theory of Computation Homework 1
Due Apr 8, by 1pm in the homework box in Kemper 2131
Problem 1. Let A, B, C be three sets. Prove the following: (a) A \ B = A \ (B A). (b) B A if and only if A B = . (c) (A \ B) \ C = (A \ C) \

ECS 222A: Algorithm Design and Analysis
UC Davis Vladimir Filkov
September 25, 2015
Problem Set 1, Due October 6, 2015 @ 11:59PM
Guidelines for writeups
When describing an algorithm rst give a high level overview of your approach, then ll in details
as ne

CS 222 Winter 2011. HW 5, due Tuesday Feb. 15
1. In our treatment of the Min Cost Arborescence problem, a xed root
node r was known, and the arborescence was a directed tree rooted at r.
Let A(r) denote the cost of the Min Cost Arboresence rooted at node

CS 222 Winter 2011 HW 6 Due Thursday Feb. 24
1. Let G be a directed graph with designated nodes s and t. A set of
paths from s to t in G are node disjoint if the only nodes they share are s
and t. Prove that the maximum number of node disjoint s, t paths

CS 222 HW 7 Due Thursday March 31.
The denition of W is in the lecture and videos (both the old video on
sports elimination and the new video). In the old video W is discussed at
the end of the lecture and in the new video, it is discussed at the start of

CS 222A Winter 2011, HW 8 Do the rst three problems at least, and
if you have time, try problem 4. This is due on Monday March 14, but you
can turn it in until March 16.
1. Given a tree T with n nodes, suppose you label the nodes during a
Depth-rst traver

CS 222 - Some sample midterm problems. Closed book.
These problems are typical of the STYLE of problems you will see on the
midterm. They do NOT reect all of the material that might be covered. The
material covered in your midterm will be chosen from divi

Massachusetts Institute of Technology
6.046J/18.410J: Introduction to Algorithms
Professors Michel Goemans and Piotr Indyk
Handout 12
February 26, 2002
Master Theorem Worksheet Solutions
This is a worksheet to help you master solving recurrence relations

-. 1
Ha ém¢¥iald ,HAbovi'l'LIM/LS 0v: Slv'iygl chcs, 61M SCquemced
12.7. The Four-Russians speedup
In this section we will discuss an approach that leads both to a theoretical and to a prac
tical speedup of many dynamic programming algorithms. The idea, c

CS 124 Homework 1. Due October 6, but you can probably dont need
that much time, and I will probably will release the next homework before
then, so the sooner you get to it the better.
This homework is intended to get you going and does not rely on anythi

Speeding up dynamic programming
The Four Russians
1
Unit Cost Edit distance
The unit cost edit distance of two strings X[1.n] and Y[1.m]
can be computed in time and space O(nm) by simple dynamic
programming based on this recursion:
D(i, j) = min
D(i-1, j-

The LCA Problem Revisited
Michael A. Bender
Martn Farach-Colton
SUNY Stony Brook
Rutgers University
May 16, 2000
Abstract
We present a very simple algorithm for the Least Common Ancestor problem. We thus dispel the frequently held notion that an optimal L

526 Chapter 12 Pol
ynomials and Matrices
do signicantly fewer
e are algorithms that, for large matrices,
mn */s. However, ther
than Winograds.
multiplications and :lzs
lication
atrices to be multiplied are n X n square
the m
divide-and-conquer algorithm.

A Simple Min-Cut Algorithm
MECHTHILD STOER
Televerkets Forskningsinstitutt, Kjeller, Norway
AND FRANK WAGNER
Freie Universitat Berlin, Berlin-Dahlem, Germany
Abstract. We present an algorithm for finding the minimum cut of an undirected edge-weighted gra

138 Selection and Adversary Arguments
A Lower Bound for Finding
the Median
s a list of n keys and that'n is odd. We will establish a
ber of key comparisons that must be done by any key-
nd median, the (n+l)/2th key. Since we are establishing a
lower bound

CS 222 HW 4 Due Thursday Feb 3 (extension to Tuesday Feb. 8) Because
of the midterm on Feb. 3 you have a lot of time for this homework, but dont
leave it to the last minute. In particular, it is good to start on problem 4
early so you have time to let it

HW 3 CS 222 Winter 2011 Due Weds. January 26 (extension date to
Friday Jan. 28)
1. Write a complete explanation (proof) for the following claim made in
the discussion of the adversary argument for median nding: After any algorithm has correctly found the

ECS 120: Intoduction to the Theory of Computation Problem Set 4
Practice only, do not submit!
Problem 1. Prove that the following languages are not regular (using the pumping lemma or closure properties). You can use the fact that L = cfw_0n 1n |n 0 is no

ECS 120: Introduction to Theory of Computation Homework 3
Problem 1. Suppose that L is DFA-acceptable. Show that the following languages are DFA-acceptable, too. Part A. Max (L) = cfw_x L : there does not exist a y + for which xy L. Part B. Echo(L) = cfw_

cfw_
cfw_ '
t | cfw_ y x v t ~8gz8wus
o q r o pt v m bnl
h W9 1 ckSR T i h "R a5 d R T 7 3 "RR 1% 2 d 1 2 f R 2 9 75 9 9 1 H H 7 5 2 H 1 2 H 7 3 H 3 R y x y x j&66!d6g&f6Se!4!"4Sd!S#d4dP#$&dS&c&Gw v u t r q BsGp h fe a (F !&g`dcb!X`Y 7 5 2 9 @!648 i

ECS 120: Introduction to the Theory of Computation Homework 5
Problem 1. Describe the language of the following CFG grammar S aSb | bY | Y a, Y bY | aY | . Problem 2. Prove that the class of Context Free Languages (CFLs) are not closed under intersection

ECS 120: Introduction to Theory of Computation Homework 6
Problem 1. Prove that La = cfw_ai bj ck : j = maxcfw_i, k is not context free. Problem 2. Show that the following languages are context-free by designing push-down automata that recognize them. (a)

ECS 120: Introduction to Theory of Computation Homework 7
Problem 1. A Stay-put Turing Machine is defined as a TM which after reading/writing to a tape cell can move the tape head either left, right, or leave it put in the same cell. Show that a Stay-put

ECS 120: Theory of Computation Homework 8
Problem 1. Sipser, Exercise 3.7. Problem 2. Sipser, Problem 3.16, b) and c). Problem 3. Prove that a language L is decidable if and only if some enumerator enumerates L in lexicographic order. Problem 4. Classify

ECS 120: Introduction to the Theory of Computation Homework 9
Problem 1. In the movie The Matrix there is a TM called The Oracle which can solve problems that other TMs cannot (even some that the TM Neo couldn't!), although, as she states herself, there a

ECS 120: Introduction to the Theory of Computation Homework 9
Problem 1. In the movie The Matrix there is a TM called The Oracle which can solve problems that other TMs cannot (even some that the TM Neo couldn't!), although, as she states herself, there a

ECS 120: Theory of Computation Homework 8
Problem 1. Sipser, Exercise 3.7. The description is not a legitimate Turing machine because the reject condition in step 3 has to wait for potentially all settings of integers to the k variables to happen and be e

ECS 120: Introduction to Theory of Computation Homework 6
Problem 1. Prove that La = cfw_ai bj ck : j = maxcfw_i, k is not context free. Suppose for contradiction that La were context free. Let N be the "N " of the pumping lemma for context free languages

ECS 120: Introduction to the Theory of Computation Homework 5
Problem 1. Describe the language of the following CFG grammar S aSb | bY | Y a, Y bY | aY | . To describe the language of this grammar we first notice that row (2) above is a grammar that can d