Recall these definitions:
R1: { (a,b), (b,c), (a,c), (c,a) } R2: { (a,b), (b,a) } R3: ∅ (i.e., empty set) R4: { (a,a), (b,b), (c,c), (b,a), (b,c) } R5: { (a,b), (b,c) } |
|
if and only if a particular relationship holds between S1 and S2. What is that relationship?
Hint 1: Use the Pigeonhole Principle.
Hint 2: Consider as two cases one in which there exists a hermit
(i.e., someone having no acquaintances) and another in which
there are no hermits.
S | → | λ | (1) |
S | → | aAb | (2) |
A | → | bSa | (3) |
S is the grammar's start symbol, A is its second variable, and the terminal symbols are a and b.
Describe L(G), the language generated by this grammar. That is, provide a precise characterization of the terminal strings that can be derived from S.
Hint 1: Consider these cases (which cover all possibilities):
Hint 2: Alternatively, you can make an argument that involves the Pigeonhole Principle.