
Title:
0713 Super Hard Quiz Of Doom Solution

Description:

Well, let's try to reason these out since they're extra complicated.

Suppose you give me your finite state machine A.

Here I've drawn all these dots to mean it could be bigger in the middle.

I don't get to know what it is. This is going to have to work for any finite state machine.

But I do know that it has a start state and an end statea final state.

Here's what I'm going to do. I'm going to draw another copy of A on my paper.

Then I'm going to go back to the first one and where it was a final state,

I'm going to make it not a final state, so I change this part.

Then I'm going to add an epsilon transition here, and I'm going to erase this other start state arrow.

Now I have a new finite state machine that accepts strings of the following form

there has to be some part x here that would've been accepted by A.

Then there's some possibly different part y here that would be accepted by A again,

so in general I accept x epsilon y or just xy.

In fact, I can always do this.

If you give me any finite state machine, I can always make a twice as big finite state machine

that accepts one string from you followed by one independent, separate string from you.

However, for this one it's going to be a little more complicated.

It turns out that the answer is only sometimes.

Let me give you an example for yes and an example for no.

Let's say the finite state machine you give me for big B just has one string in itlowercase b.

I'll do the same trickery as before, and now I have a new finite state machine that accepts bb.

Since there is only one string in the language, I've now doubled it. This works fine.

I can do it at least once, but now here comes the evil part.

This upper examplethis blue exampleof B totally worked.

Now I'm going give you an example for B that does not.

Here, B is a*x.

This finite state machine accepts the regular expression a*x.

Any number of a's, possibly zero, but then you need an x.

Now, note the difference between this sentence and its earlier copy.

This requires exactly the same string double.

Let's imagine that I do complete this finite state machine construction

the same sort of thing I've done before.

Now I'm going to write out some of the strings that would be in a*x twice.

Well, I could have no a's, so then I have no a's followed by an x.

Or I could have one athat's looking okay so far.

Or I could have two a's, or I could have three a's.

This pattern should be looking ominous.

Or in general, if I were able to double this machine so that it accepted the same string both times

rather than a new string each time, I would be recognizing (a^n)x(a^n)x.

For the same reason that a^Nb^n can't be recognizedit's not regularneither can this.

Here we have one positive example and one negative example,

so it only holds sometimes.

This was super tricky. Do not feel bad if you didn't see this the first time.