UMBC CMSC451, Automata Theory & Formal Languages, Spring 2007
Homework Assignments
   -  Draw the transition diagram for a DFA D1 for the language:
   
      L1 = { w ∈ {0,1}* | w does not contain the substring 11 }.
    
-  Prove that your DFA D1 does indeed recognize L1. That is,
   L(D1) = L1.  
 Note: you must prove set containment in both direction,
   that L(D1) ⊆ L1 and that L1 ⊆ L(D1).
-  Draw the transition diagram for a DFA D3 for the language:
   
      L3 = { w ∈ {0,1}* | w contains an even number of 0's and at most one 1 }.
    
-  Prove that your DFA D3 does indeed recognize L3. That is,
   L(D3) = L3.  
 The note in Question 2 applies equally here.
   -  Exercise 2.3.2.
   
-  Exercise 2.3.4, part b. 
   
-  Exercise 2.3.4, part c.
   
-  Construct an NFA with 3 states for the following language:
 
 L = { ab, abc }*
 
 That is, L is the set of strings w such that w is either the empty
     string, or w = w1w2w3...wm
     where each wi is either ab or abc.
   -  Exercise 3.1.1, parts b & c.
   
-  Exercise 3.1.2, part b.
   
-  Exercise 3.2.3.
   
-  Exercise 3.2.6, parts c & d.
   -  Exercise 4.1.1, part e.
   
-  Exercise 4.1.2, part c.
   
-  Exercise 4.1.2, part e.
   
-  Exercise 4.1.2, part h.
   -  Exercise 4.2.6, parts a & b.
   
-  Exercise 4.2.13, part b.
   
-  Exercise 4.3.2.
      
 Note: You do not have to worry about the
      algorithm being efficient. However, you should make sure
      that your algorithm doesn't run forever.
-  Exercise 4.3.4.
       
When you are asked to provide a context-free grammar (CFG), briefly
describe the purpose of each variable of your CFG and comment the
"interesting" productions.
   -  Exercise 4.4.2.
   
 
 
-  Provide CFGs for the following languages:
    
       
 
-  L = { w ∈ {a, b}* | the number of a's in w does
not equal the number of b's in w }
       
 
 
-  L = { anbmck | n = m
or m ≠ k }
       
 
 
-  L = { anbmck | n + 2m
= k }
        
 
 
-  Prove that your grammar for 2a above correctly
        generates the specified language.
   
 
 
-  Exercise 5.1.1, part d. 
Note:
When the question asks you to "design a PDA", you should give a brief
high-level English description of your PDA first. (E.g., "push X whenever
a 0 is read...") Then, give the transition diagram, transition table or
mathematically defined transition function.
   -  Exercise 6.1.1, parts b & c.
   
-  Exercise 6.2.1, parts b & c.
   
-  Exercise 6.2.3, parts a & b.
   
-  Exercise 6.2.6, parts a & b.
   -  Exercise 7.2.1, part b.
   
-  Exercise 7.2.1, part c.
   
-  Exercise 7.2.1, part e.
   
-  Exercise 7.2.1, part f.
   -  Exercise 7.4.1, part b.
   
-  Exercise 7.4.2, part b.
   
-  Exercise 8.2.2, parts b & c.
   
-  Exercise 8.2.3, parts a & b.
   -  Exercise 8.4.3, part b.
   
 
 
-  Exercise 8.4.9. 
        
 N.B.: a k-head TM does not "know" whether two (or more)
        of its tape heads are reading the same tape cell --- it only
"knows" that the heads
    are reading the same symbol, which could be from different tape cells
holding the
    same symbol.
 
 
-  Exercise 8.4.10.
   
 N.B.: a multi-tape TM can have only a constant 
   number of tapes --- i.e., you are not allowed to have more 
   tapes for longer inputs or to increase the number
   of tapes in the middle of a computation.
 
 
-  Exercise 8.5.1, part d. 
   
 N.B.: by definition (in this textbook)
   a counter machine is deterministic.
 Hint: store 2i3j5k
   in one counter using a second counter as a "helper".
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
   -  Exercise 9.1.3, part b.
   
-  Exercise 9.2.6, parts c & d.
   
-  Exercise 9.3.3.
   
-  Exercise 9.3.7, part b.
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
   
   
-  Exercise 9.3.4, part a. 
   
    
-  Exercise 9.3.4, part b. 
   
    
-  Define the language SQUARE as follows:
     
        SQUARE = { < M > | M is a TM and for all n, M halts
    in ≤ n2 steps on inputs of length n }
      Show that for
     Le = { < M > | M is a TM and L(M) = ∅ },
     Le ≤m SQUARE.
    
-  Consider the following language concerning pushdown automata
(PDAs):
     
        DOUBLE = { < P > | P is a PDA and L(P) contains at least one
      string of the form zz for some z ∈ {0,1,#}* }
      Show that DOUBLE is undecidable. Hint: use computation
histories twice.
Note: Recall that the lowest homework grade is dropped
only from the first 10 homework assignments.
   -  In each of the following languages, <Gi>
   is an encoding of a context-free grammar. State whether
   each language is decidable or undecidable. Justify briefly.
   
      - 
      La = { < G1, G2 > | 
      L(G1) ⊆ L(G2). }
      
- 
      Lb = { < G1, G2 > | 
      L(G1) ∩ L(G2) = Σ*. }
      
- 
      Lc = { < G1, G2 > | 
      L(G1) ∪ L(G2) = Σ*. }
      
- 
      Ld = { < G1 > | 
      the complement of L(G1) equals Σ*. }
   
 
    
-  Exercise 9.3.4, part c.  
   
 Note: You may use the fact that we already know certain
   languages are not recursively enumerable, (e.g., Le,
   the complement of Lu, and the complements of the different
   versions of the halting problem K).
    
-  A set X is cofinite if its complement is
   finite. Every cofinite set is infinite, but some infinite sets
   are not cofinite. For example, the set of natural numbers larger than
   10 is cofinite, but the set of even numbers is not. Define
     
        COFINITE = { < M > | M is a TM and L(M) is cofinite }
      Express COFINITE using ∃ and/or ∀ quantifiers over
   strings and/or numbers and a decidable predicate.
    
-  Prove that COFINITE is not decidable.
   Note: Prove this directly, do not use Rice's Theorem.
Last Modified:
22 Jul 2024 11:27:48 EDT
by
Richard Chang
 to Spring 2007 CMSC 451 Homepage
to Spring 2007 CMSC 451 Homepage