You must finish this exam within 24 hours of when you first read this. You can consult the textbook for the course and any notes or assignments from the course; you are not permitted to consult any other sources. You are not permitted to discuss anything about the test with anyone except the instructor until after the final deadline of Wednesday at 9:00.

This is a good time to review the suggestion at the top of page 27. Remember, you don't start at 100 and lose points, you start at 0 and earn points. I can only give you points if you provide me with a reason to.

  1. Let L = { (a UNION b)* such that number of a’s equals the number of b’s}
  2. If L is regular, then since the set of regular languages is closed under finite transduction, we can proceed by building the following finite state transducer:

    This yields the language L’ = {(a)* such that the number of a’s is even}

    Since there is a DFA for L’, notably:

    We conclude that L is regular.

    What is wrong with this argument? (it is the argument, not the conclusion that you need to discuss)

  3. Stan, Kyle and Cartman have started their own business selling computing machines. They have introduced a new machine, the CHEF 3000 onto the market. The CHEF 3000 comes with a control, an input device, and a counter. Having learned design techniques from Bill Gates, their machine has one oddity: every third increment operation (starting with the third one) increments the counter by two instead of one.
  4. The sales literature for the CHEF 3000 says "For an additional $1000 we will include a patch to the system which will fix the increment problem."

    Explain why buying the patch would be a waste of money.

  5. Let MIN(L) be the set of strings x in L such that no proper prefix of x is also in L, e.g.,

    MIN({a, ab, bb}) = {a, bb}.

    MIN({ab, abba, bab, bba}) = {ab, bab, bba}.

    Is the class of regular languages closed under MIN?

  6. Given two DFRs, each of which recognizes a regular language, describe how to construct a DFR which recognizes the language which results from the intersection of the two languages.
  7. This is part of the actual test given by Microsoft to prospective employees.
  8. "U2" has a concert that starts in 17 minutes and they must all cross a bridge to get there. All four men begin on the same side of the bridge. You must help them across to the other side.

    It is night.

    There is one flashlight.

    A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc.

    Each band member walks at a different speed. A pair must walk together at the rate of the slower man's pace:

    Bono: - 1 minute to cross

    Edge: - 2 minutes to cross

    Adam: - 5 minutes to cross

    Larry: - 10 minutes to cross

    For example: If Bono and Larry walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Larry then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission.

    Notes: - There is no trick behind this. It is the simple movement of resources in the appropriate order. There are two known answers to this problem. This is based on a question Microsoft gives to all prospective employees.

    Note: Microsoft expects employees to answer this question in under 5 minutes!

    Your job is to solve it using the methodology of this course.

    If you can't stand it the solution can be found here.

    a) Describe (in sufficient detail) how to create an NFA to solve this problem. Naturally you may use as many controls as necessary. Provide a few sample instructions. Just to be clear - you are creating an NFA, you may not use counters.

    b) What is the input to your NFA?

    c) Describe the dead states in the state space.

    d) Describe the unreachable states.

    e) Draw the standardized DFR that would result from converting your NFA and applying standardization techniques.

  9. Design a finite transducer whose output will be Brittany Spears' next album.