Computer Science 4602, Fall 2019
Assignment 1

Assigned: Friday, August 30
Due: Monday, September 9
  1. Write each of the following using set notation.

    1. The set that contains only string aab
    2. The set containing only the empty string
    3. The empty set
    4. The set containing all natural numbers that are greater than 10
    5. The set containing all strings over alphabet {a, b}
    1. What is {1, 3, 5, 6} {2, 3, 5, 9}?
    2. What is {1, 3, 5, 6} ∩ {2, 3, 5, 9}?
    3. What is {1, 3, 5, 6} − {2, 3, 5, 9}?
    4. What is |{ab, bbb}|?
    5. What is |{ε, a, b}|?
    6. Is ε {}?
    7. Is {} {}?
    8. Is {} ⊆ {}?
    9. Is {ε} ⊆ {}?
    10. Is {} ⊆ {ε}?

  2. Is {} S = S for every set S? Justify your answer.

  3. Briefly define the following.

    1. What is the definition of an alphabet?
    2. What is the definition of a string over alphabet Σ?
    3. What is the definition of a language?
  4. Explain the error in the following proof that 1 = 2.

    Consider equation a = b. Multiply both sides by a, obtaining a2 = ab. Subtract b2 from both sides to get a2b2 = abb2. Factor each side, giving (a + b)(ab) = b(ab). Divide each side by (ab), giving a + b = b. Now choose a = 1 and b = 1, giving 2 = 1.

  5. Prove that, in every simple graph with at least two vertices, there are two vertices that have the same degree.

  6. A number is rational if it is the ratio of two integers. Prove that √2 is not rational. (Hint. Reason by contradiction. Suppose that there exist two integers x and y so that x/y = √2. Square both sides. Think about prime factorizations of integers. Two positive integers are equal if and only if they have the same prime factorization.

  7. Draw a transition diagram of a DFA that accepts exactly each of the following languages over alphabet Σ = {a, b, c}.

    1. {w Σ* | w begins with a and ends with b}
    2. {w Σ* | w has at least three c's}
    3. {w Σ* | w has aab as a contiguous substring}
    4. {w Σ* | w does not have aab as a contiguous substring}
    5. {w Σ* | w is any string except ab and bba}
    6. {w Σ* | w ends with cc}
  8. Show that each of the following languages is not regular. Do not use the Pumping Lemma. ak is a string of exactly k a's.

    1. {www | w {a, b, c}*} (That is, any string written three times in a row.)
    2. {ak | k is a power of 2}
    3. {aibjci + j | i > 0, j > 0, k > 0}