Final Exam

December 7th, 2007

The much awaited final is here. There are 6 problems, and all must be solved. Each problem is worth 20 points, and I’ll normalize to 100 later on.

The final is due Tuesday Dec 11 @ 5pm. You may submit the solution electronically or physically (if the latter, slide it under my door). As usual, this post will be the clearing house for question, and you can always email me directly.

The LaTeX for the final is here.

Good luck !

42 Responses to “Final Exam”

  1. L. Vegas Says:

    Do you want what we hand in to be the same format as the Midterm (i.e., one page per problem)?

  2. A. Star Says:

    Problem 4: Is a sequence of numbers consisting of just one number considered oscillating?
    For example, is the following true?:
    {1} is oscillating
    {2, 1} is oscillating
    {1, 2} is not oscillating

  3. admin Says:

    L. Vegas: the format is not important. It’s just cleaner for me to lay them out that way
    A. Star: your labelling of sequences as oscillating or not is correct.

  4. Sarvani Says:

    Hi,

    Question 2: When Monte rolls a die the first time and jumps based on the outcome of the die … This is the normal 6 faced die and when the outcome is say 4, he jumps 4 miles … Is this right?

  5. admin Says:

    ah. I changed things and forgot that. No, there’s no die. he merely evaluates a random variable whose expectation is g(x). I’ll email a clarification

  6. Sarvani Says:

    I am still confused with problem 2… By monotonically increasing .do you mean that if x1 > x2 then g(x1) > g(x2)? Also, is a random value generated for the very first jump also? Given the fact that the first jump can be atmost half the total destination, can we assume that the generated random numbers are always within acceptable range after every jump?

  7. Sarvani Says:

    Question 1(a) : Do we assume no variable is flipped more than once?

  8. admin Says:

    By monotonically increasing .do you mean that if x1 > x2 then g(x1) > g(x2)?

    Yes. Maybe it’s easiest to think about what happens in the “deterministic” case. Each rabbit starts at N and “tosses a coin” whose value is N/2. It then moves to N-N/2 = N/2, “tosses a coin” whose value is N/4, and then moves to N/2-N/4 = N/4. and so on

    The same thing happens in the randomized case. You can also assume that if at some point you are at position x, and g(x) > x, then in the next move you’re done, because you’ve reached Carrotopia. So assuming that the g(x) values are “in range” is a worst-case assumption, since you’ll always do at least as well, and so it’s safe to assume that the g(x) values are always in range.

  9. Monte C. Says:

    For problem 3, can we use any algorithm as long as we can achieve in poly-time?

  10. admin Says:

    Sure. As usual, closer to the ideal garners more marks. BUt shouldn’t you be out jumping towards Carrotopia ?

  11. Lame Foot Says:

    On problem 3 can we assume that the weights and profits are rational numbers?
    Better yet can we assume division of the weights and profits to be a polynomial time operation?

  12. confused Says:

    Two things:
    Problem 4,
    consider sequence A = {3, 10, 1, 2} and a subsequence in A, a = {10, 1, 2},
    a is the only oscillating sequence and as such is the longest oscillating subsequence in A, correct? or is it that 3 in A has index 1 and 10 in A has index 2 and so on in A and so in a 10 still has index 2? if it is the second case the largest oscillating subsequence in A is zero.

    Problem 2,
    I am not understanding the discussion of ‘range’ above, is it really meant that g(x1) (this is when Monte C. is at N) can never return a value greater than N/2? If this is the case than I don’t believe that Monte C. will ever get to where he desires.
    I am getting confused by all this monotonically increasing (for I keep thinking it should be decreasing), is this merely a fancy way of saying the rabbits never lose hope, that they never return home that they always move toward the carrots?

    I will have another question, about 6, when I can think of how to form a question.

  13. admin Says:

    Lame Foot: yes, you can assume that. just state it

    confused: Problem 4: No, the first case is correct. In other words, once you construct a subsequence, you “renumber” so that the first element has index 1 etc. In your example, 10 has index 1, 1 has index 2, and 2 has index 3 in a. in A, 10 has index 2, 1 has index 3, and 2 has index 4.

    Problem 2: Don’t worry about the monotonically increasing for now if it’s bothering you (you’ll need to use the fact that if x1 > x2, then g(x1) > g(x2) later on though). Intuitively, what it’s saying is that in the beginning, the rabbits can jump far (because g(x) is large), and the closer they get to 0, the smaller the jumps get.

    Remember that the rabbits *always* have hope since the value of the random variable is always positive (which means they always go in the right direction).

    As for the range of values, don’t worry if you’re not following the above discussion. The main point is this: The rabbit jumps by a certain amount, and clearly unless the amount it jumps is “reasonably large”, the rabbit will never get to the origin in a reasonable time. This is why we say that the expected value of the random variable is g(x). g(x) essentially says that things are reasonable.

    does that help ?

  14. admin Says:

    Sarvani: as for question 1, we don’t assume anything; the random procedure does independent coin tossing at each step.

  15. confused Says:

    Yes, very,
    Just to clarify, you said above about the rabbits:

    in the “deterministic” case. Each rabbit starts at N and “tosses a coin” whose value is N/2

    why would the rabbit toss a coin, if he knows it will jump by N/2?
    I think you mean that the coin always comes up true and only if the coin came up false would the rabbit not jump (procrastinate)
    or am I still missing something?

  16. Sarvani Says:

    yes! got it!

  17. admin Says:

    no no. I think I said too much. When I talked about deterministic rabbits, i was referring to what the *other* rabbits were doing, where you could “pretend” that they tossed a coin that always gave the same value. If you understand basically what needs to be done, ignore my comment about deterministic rabbits.

  18. Sarvani Says:

    Question 5: I did not get how can we multiply two sqrt(n) bit integers in constant time … Will we not need atleast O(n^log3/2) time according to the formula to muliply integers?

  19. admin Says:

    What I’m saying is, ASSUME that you can do this. how does this then change the running time ?

  20. M. Flow Says:

    6.2. If we look at the bipartite graph k_{3,3}, there 9 paths from s to t that have one edge between L and R. What does it mean to “augment by all such paths”?

  21. admin Says:

    Augment by all *edge-disjoint* paths (of which there are three)

  22. L. O'st Says:

    6.1: “Prove that this implies that this graph consists of cycles and paths, . . .”
    If we say M = {a = v1->v2}
    And M’ = {b = v3->v4, c = v5->v6}
    The graph induced by M \Deta M’ has three edges, which don’t form a cycle.
    Is that not what you mean by “this graph”?

  23. M. Flow Says:

    “Augment by all *edge-disjoint* paths (of which there are three)”
    Which three?
    Or is question 6.2
    “Given any set S of edge-disjoint paths from s to t with one edge going from L to R such that |S| is maximized, show that the matching we obtain by augmenting all paths in S is a 1/2-approximation”?
    So, for example, k_{3}{1} has 3 paths of length 1 (not including edges touching s or t). However, the maximal set of edge disjoint paths from s to t is 1 (since there’s only one vertex in R, thus only one edge to t, which all paths must use). Is that the right thinking? Or is there some way of getting “all edge-disjoint paths” given a graph and I’m not seeing?

  24. admin Says:

    L’ost: the graph induced has three disjoint edges (v1->v2, v3->v4, and v5->v6). these are three paths, are they not ? each of length 1 ?

    M. Flow: Replace “maximized” by “maximal”, and then your restatement of 6.2 is correct. maximal means that you can’t add another edge without destroying the disjointness property. maximum is the largest possible (necessarily maximal) set. maximal suffices for this case.

  25. Halo-99 Says:

    Question 2: I am not really sure what this questionis asking. Is it asking for expected number of jumps Monte C will take to reach to Carrotopia?

  26. admin Says:

    Halo-99: that is correct.

  27. M. Flow Says:

    6.2: What does it mean to have a path that is a “vertex-disjoint augmenting path with respect to M”? I get the vertex-disjoint augmenting path (I hope), but “with respect to M”?

  28. admin Says:

    Remember that when we define an “augmenting path” in this bipartite graph, it is defined with respect to a matching, because the augmenting path must alternate between edges not in M and edges in M. So you can’t talk about an augmenting path without talking about the matching it is an augmenting path with respect to

  29. Sarvani Says:

    For problem 4: By efficient algorithm do you mean a polynomial time algorithm?

  30. admin Says:

    Sarvani: yes, efficient == polynomial time :). As always, the more efficient, the more points.

  31. Matthew Says:

    Question 6.1 asks to show that the graph induced by the symmetric difference of M and M’ consists of cycles and paths. I’m confused because doesn’t every graph consist of cycles and paths? Plus, the induced graph may not have any edges, if M and M’ contained all the same edges to begin with. Or, are we assuming M and M’ do not have all the same edges?

  32. admin Says:

    the symmetric difference consists of a collection of cycles and paths that are vertex disjoint (i.e eac of the paths is disjoint from each of the cycles). If you take (say) a tree, this is not true in general, since a node of degree three might decompose the tree into paths that overlap.

    If the graph is empty, then it contains the empty cycle and/or the empty path, so that’s consistent.

  33. Sarvani Says:

    When you say vertex disjoint augmenting paths : do you mean that an augmenting path has no vertex repeated or that two augmenting paths do not have a common vertex?

  34. admin Says:

    well an augmenting path is a *path* so by defn there are no repeated vertices. I mean that two augmenting paths do not share common vertices

  35. Sarvani Says:

    Not clear about the matching with respect to M (I did read the previous blog). If an augmenting path alternates between edges in M and M’, then we cannot call it an augmenting path wrt to M or M’?. An augmenting path wrt M must hence have edge only from M?

  36. admin Says:

    remember, the first edge is NOT from the matching. that breaks the apparent symmetry between M and M’

  37. Sarvani Says:

    6.4 : Show that there are at most sqrt(n) augmenting paths remaining … Can we assume these augmenting paths are vertex disjoint too?

  38. admin Says:

    You don’t really have to. Think about what 6.1 is telling you.

  39. CarrotPhobia! Says:

    Should we obtain a closed form for Carattopia problem, would we receive no carrots(points)? Does a closed form strictly not exist?

  40. admin Says:

    no no. there isn’t a compact closed form as far as I know. if you find one, more power to you. I only mentioned the lack of a closed form so people don’t go crazy trying to find one.

    Here’s an example of an answer that isn’t a closed form, but it sort of what i’m talking about:

    E[T] = \sum_0^N g(x)^3

    It’s not a closed form soln because of the summation, but it only involves N and g(x)

  41. Lost in Vegas Says:

    Hello Prof, I am still lost in Vegas(prob 1)! Could you make at least one question optional?

  42. admin Says:

    nope, sorry.

Leave a Reply