Problème 1.

Give regular expression for the languages bellow

1.a

1.b

1.c

Problème 2.

Minimize the number of states in this DFA via quotient construction. Show all your steps, specifically in your table where you are “marking” nodes indicate which iteration you marked them on.

Final states , and non-final states are

Initial table with all pairs:

      0 1 2 3 4 5 6 7 8 9
    ---------------------
0   |   *       * *
1   | *   *       *
2   |   *   *       *
3   |     *   *       *
4   |       *   *     *
5   | *       *   *   * *
6   | * *       *   *   *
7   |     *       *   * *
8   |       * * *   *   *
9   |           * * * *

Mark based on final/non-final states:

      0 1 2 3 4 5 6 7 8 9
    ---------------------
0   |   ✓       ✓ ✓
1   | ✓
2   |       ✓
3   |     ✓   ✓       ✓
4   |       ✓
5   | ✓
6   | ✓
7   |
8   |       ✓
9   |

first iteration.

{0,2} -(a) {1,3}: not marked {0,2} -(b) {6,7}: not marked {0,3} -(a) {1,4}: not marked {0,3} -(b) {6,8}: not marked {0,4} -(a) {1,5}: not marked {0,4} -(b) {6,8}: not marked {0,7} -(a) {1,9}: not marked {0,7} -(b) {6,8}: not marked {0,8} -(a) {1,9}: not marked {0,8} -(b) {6,5}: not marked {0,9} -(a) {1,7}: not marked {0,9} -(b) {6,6}: not marked

      0 1 2 3 4 5 6 7 8 9
    ---------------------
0   |   ✓       ✓ ✓
1   | ✓
2   |       ✓
3   |     ✓   ✓       ✓
4   |       ✓
5   | ✓
6   | ✓
7   |
8   |       ✓
9   |

second iteration.

{1,2} -(a) {2,3}: marked so we mark {1,2} {1,5} -(a) {2,0}:

      0 1 2 3 4 5 6 7 8 9
    ---------------------
0   |   ✓       ✓ ✓
1   | ✓
2   |   x   ✓
3   |     ✓   ✓       ✓
4   |       ✓
5   | ✓
6   | ✓
7   |
8   |       ✓
9   |

sorry I gave up

Problème 3.

Your friend is looking at the formal definition of the pumping lemma and they think something is wrong

They understand the argument it is crafted around, that is, due to the fact that strings are arbitrarily long and a DFA has finite states there must be a segment of accepted strings which “loop” in the machine. However, they claim for the pumping lemma above to hold, must be infinite, because if was finite the argument about “looping” no longer holds. Therefore, the pumping lemma only holds when is infinite.

You can see where your friend is coming from, but they are incorrect. Why? Be precise in your argument, that is, show how if is finite, then

evaluates to true. (hint: If is finite, there is a “longest string”)

Solution

Let be the length of the longest string in . We can choose a pumping length such that .

Now let’s evaluate the following statement

Since , there doesn’t exist a string such that . Therefore, antecendent of the implication is always false.

Therefore, the entire inner implication is vacuously true, and the entire statement is true. Therefore, the pumping lemma holds for finite languages.

Problème 4.

Using the Pumping Lemma, prove the following languages are not regular. Make your steps in the “game” and variable choices very clear for each question.

Pumping Lemma

There exists a pumping length such that , we can write such that

i.

ii.

iii.

4.a

Assume is regular.

Let . since choosing , and for .

By the pumping lemma, we can write satisfying conditions i) and iii). Since , must consist of only ‘s. Let for .

Consider string . From condition iii), this must be in .

However, has the first block of to length and last block of length . To be in , we must have for some integer . But for , so there is no such exists, which means .

Thus, it contradicts the pumping lemma, and is not regular.

4.b

Assume is regular.

Let . since chos\sin g and for .

By pumping lemma, we can write satisfying conditions i) and iii). Since , must consist of only ‘s. Let for .

Consider the string . By condition iii) of the pumping lemma, this must be in .

However, to be in , it must be the for of for some . But the first half of is and the second half is . Since . So .

Thus, it contradicts the pumping lemma, and is not regular.

4.c

Assume is regular.

Let . since choosing , and for .

By the pumping lemma, we can write satisfying conditions i) and iii). Since , must consist of only ‘s. Let for .

Consider the string . By condition iii) of the pumping lemma, this must be in .

However, to be in , it must be of the form for some . , which means is not a perfect cube, so .

Thus, it contradicts the pumping lemma, and is not regular.