Sample Midterm Questions for CS 6505: Algorithm, Computability and Complexity (Fall 2007), Exams of Computer Science

Sample midterm questions for the cs 6505: algorithm, computability and complexity course offered in the fall 2007 semester. The questions cover topics such as turing-recognizable languages, maximum flows in flow networks, and the ford-fulkerson algorithm.

Typology: Exams

Pre 2010

Uploaded on 08/05/2009

koofers-user-v5d
koofers-user-v5d 🇺🇸

9 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 6505: Algorithm, Computability and
Complexity
Fall 2007
Sample Midterm Questions
0
pf3
pf4
pf5

Partial preview of the text

Download Sample Midterm Questions for CS 6505: Algorithm, Computability and Complexity (Fall 2007) and more Exams Computer Science in PDF only on Docsity!

CS 6505: Algorithm, Computability and

Complexity

Fall 2007

Sample Midterm Questions

Turing-recognizable languages are closed under complementation. That is, if language L is Turing-recognizable, then so is its complement L.

Answer: False.

Justification: In class it was shown that the language AT M is Turing- recognizable but its complement is not Turing-recognizable. Thus the state- ment is false.

If the capacity of each edge in a flow network G = (V, E) is multiplied by k, then the value of a maximum flow in G is also multiplied by k. Moreover, if f is a maximum flow in the original network (before the edge capacities are changed), then f ′^ defined as f ′(e) = kf (e) for each edge e ∈ E is a maximum flow in the new network (after the edge capacities are changed).

Answer: True.

Justification: Let G′^ denote the flow network after the edge capacities are multiplied by k. It can be easily seen that for every flow f of G, f ′^ = kf is a flow of G′^ (verify that the capacity constraint and flow conservation hold), and conversely for every flow f ′^ of G′, f = (^1) k · f is a flow of G. Thus the map f 7 → cf gives a one-to-one correpondence between flows of G and flows of G′. Hence if f is a maximum flow of G, then f ′^ = kf is a maximum flow of G′^ and |f ′| = k|f |.

Although the original Ford-Fulkerson algorithm may fail to terminate in the case where edge capacities are arbitrary real numbers, it can be slightly modified so that it is guaranteed to terminate in the case where edge ca- pacities are rational numbers, regardless of how the augmenting paths are chosen. This is an immediate consequence of the statement in Question 3.

Answer: True.

Justification: Let G = (V, E) be a flow with rational capacities. The following modification of Ford-Fulkerson computes a maximum flow of G:

  1. Let k be a common multiple of the denominators of all edge capacities. Multiply the capacity of each edge in G by k, and denote by G′^ the resulting flow network.
  2. Use Ford-Fulkerson to find a maximum flow f ′^ of G′.
  3. Output f = (^1) k · f ′.

Since G′^ has integer-valued capacites, Ford-Fulkerson is guaranteed to terminate and output a maximum flow f ′^ of G′. By Question 3, f = (^1) k · f ′ is a maximum flow of G.