Common language (yes or no)

I was tasked with verifying the correctness of this language:

L = {w∈{a,b,c}* | where the number of a is less than the number of b+c.}

I can find neither a regular expression for this, nor a deterministic (or not) state machine. On the other hand, I did not find a way to prove the converse with the pumping lemma theorem.

Any ideas?

+5
source share
1 answer

Renouncement

I know that the official proof using the pumping lemma has been published above. However, I will go for a completely unofficial explanation, because, in my opinion, it usually helps to have some intuition about the problem before making an official decision.

General intuition

, - , , , , . , . .

?

, DFS . , a b c ( D_abc). DFS . 10 a 100 a. . , a ( D_abc), , , .. .

: ?

. () , () . :

  • (.. D_abc = 0), , (.. a D_abc <- 1, , b c D_abc <- -1).

  • a (.. D_abc > 0), a , (.. D_abc <- D_abc + 1, else a (.. D_abc <- D_abc - 1).

  • , b c (.. D_abc < 0), a b c , (.. D_abc <- D_abc - 1), (.. D_abc <- D_abc + 1).

, D_abc, , . , , .

+3

All Articles