finite automatons: is my grammar correct and has no context?

I have this language

$ L = {a ^ n b 3n} c 2m: m, n ge 1 }.

I have to determine a free context grammar that generates L.
It seems easy BUT I have a question about the grammar I found.
First things first, this is my grammar:

$ S Rightarrow BC $

$ B Rightarrow aBbbb backslash abbb $

$ C Rightarrow Ccc backslash cc $

It seems easy and clean to me. I already tried it with chains of different lengths and it seems to work well. In addition, in fact, it only creates chains contained in L and no other chains.

My question is:

This is the first time that I generate a grammar without any production that contains $ S $ itself (an example would be to add $ S Rightarrow B $ and solve my problem, because B only generates $ to $& # 39; s and $ b $& # 39; s and the number of these characters is dependent on each other but indifferent to the number of $ c $it's inside the chain).

Speaking recursively, this works fine but using $ S $ it would induce me to create a non-contractual language (because I would be forced to invest some non-terminals to produce both $ to $& # 39; s and $ b $it is correct if something is wrong in my grammar).
Is this way of creating grammars correct? Can I describe what I wrote as a real "grammar"? Is it context free?

Besides, can I really derive $ to $ through $ B $ without a non-terminal $ A $ and without generating it with the $ S $ production?

For every 4 & # 39; c & # 39; at the entrance, press a & # 39; c & # 39; on the battery (press down on the automatons)

Given the following language: L = {$ a2m $ c 4n $ $ d ^ $ $ bm : m, n> = 0}
I am trying to design a PDA. My approach is:

-for every 2 ‘a’ press ‘a’

-for every 4 ‘c’ press a ‘c’

-Then, review them to solve the second half of the language.

This is the first part that counts 2 & # 39; a & # 39 ;, but the part & # 39; c & # 39; It is not very clear:enter the description of the image here

Any clue or solution to the problem: ‘’ For every 4 ‘c’ push a ‘c’ into the stack ‘’

Thank you!

automatons – How do I replace a D Flip Flop with a JK Flip Flop?

enter the description of the image here

Hi, I have this circuit with this, I want to learn about Mealey and Moore.

Is this a Mealy automaton? I would say yes because the top LED depends on the variables I obtained.

Otherwise, isn't the J line the next state? So, is it a Moore because it only depends on his states?

Now I want to replace the D Flip Flop with a JK, how could I do this?

I would simply implement a JK to change it, but I suppose there are things that must be done for automata to have the same results.
Any suggestions on how to do this?

Thank you

automatons: how should I specifically describe (in words) the language of a regular expression?

For regular expression (alicensed in lettersyes)a I want to learn to describe it in words. I know there is an even number of bs, but how much do I need to explain it? Do I need to explain it enough that each possible chain can be produced from my explanation?
Another example is (a * (baC)) where I would describe it as a string on {a, b, c} where there is the same number of a & # 39; s and c & # 39; s.

Thank you.

Formal languages: test of two automatons with disjoint terminal states

I need help with the next demonstration, I'm a bit stuck. The statement is as follows:

There are two automatons $ A = ( Sigma, s, F, s_0, F_A) $ Y $ B = ( Sigma, s, F, s_0, F_B) $ ($ A $ Y $ B $ they are identical, but only differ in their final sets). If we know that all the states of both are accessible from $ s_0 $.

How to prove that: yes $ L (A) cap L (B) = emptyset Rightarrow F_A cap F_B = emptyset $

I am a little bad at demonstrations, and I don't know where to start, I know that if the terminal states are different, then the words accepted by both automatons would be different, therefore $ F_A cap F_B = emptyset $ It would be true.

PS: English is not my mother tongue: P

automatons – Regular language – Context-free language

I know this is not a question and answer post site, but to explain my question, I would like to post a question

Leave $ A $ be a $ regular $ $ language $ Y $ B $ be a $ CFL $ about the alphabet
$ sum ^ * $which of the following about language
$ R = overline {A} -B $ it is $ TRUE? $

to. $ R $ is necessarily $ CFL $ but $ no $ necessarily $ regular $

yes. $ R $ is necessarily $ regular $ but $ infinity $

C. $ R $ is necessarily $ no $ $ regular $

re. $ None $

me. $ phi $

Now I have addressed this problem in 2 ways and I am getting 2 different results.

The first way I've approached is that, since $ A & # 39; -B = A & # 39; cap B & # 39; $, so is $ Reg $ $ L $ $ cap $ $ CSL = CSL $ , then the answer is $ NONE $

On the other hand, I have thought so, since $ A $ it is $ Regular $ its complement is also $ regular $, Now we know that

enter the description of the image here

So $ regular $ $ language $ being a subset of $ CFL $ must give us $ phi $ when we are doing $ A & # 39; -B $so this time I'm getting $ phi $ as a reply

My question is which of my approaches is correct? Is the first one correct? If so, why is the second one wrong?

Or is it the second correct? If so, why is the first one wrong?

I think the second method I have shown is incorrect, since we have normal language. $ A = phi $, so $ overline {A} = sum ^ * $ and say $ B = a ^ nb ^ n $

then $ overline {A} -B = a ^ xb ^ y $, where $ x neq y $, then it is a $ CFL $ but no $ phi $.

So where was I wrong in my second test using $ Chomsky $ $ hierarchy? $

Negative voters (if applicable) mention the reason for the negative vote in the comment. Thank you.

automatons: are DFAs with a unary alphabet strictly less powerful than DFAs with a binary alphabet?

Are DFAs with a unary alphabet strictly less powerful than DFAs with a binary alphabet? Is this even a significant question?

For example, yes $ Sigma = { texttt {0}, texttt {1} } $, we can encode any larger alphabet using $ Sigma $, but yes $ Sigma = { texttt {0} } $, this can define a DFA (that is, recognize $ L = { texttt {0} ^ k mid k> 0 } $) … but a DFA could never recognize more "complex" regular expressions. For example, there is no way to code $ texttt {0011} $ using a unary alphabet that a DFA would recognize (we could use, say, Godel's numbering, but that would require a more powerful machine that could "count").

If DFA with a Unary alphabet less powerful than DFA with a binary alphabet, is there a name for this language / grammar? I recognize that this is a strange question, since the DFA that recognizes $ L = { texttt {0} ^ k mid k> 0 } $ recognize all unary languages ​​… but technically there is still an infinite amount of DFA in this class ($ L = { texttt {0} ^ 1 } $, $ L = { texttt {0} ^ 2 } $, etc.)

Note that, of course, I guess for $ Sigma = { texttt {0} } $, which does not contain the empty symbol $ varepsilon $.

automatons – $ a ^ mb ^ n $ where $ m = n ^ 2 $ to $ CFL? $

$ a ^ mb ^ n $ where $ m = n ^ 2 $ a $ CFL? $

I have a question about this problem. Say if we explode $ n $ number of $ a & # 39; s $ of the battery for each $ b $ then it is a $ CFL $ (to be exact $ DCFL $) right?

On the other hand I have this doubt, do we know the number of $ b & # 39; s $ we are provided, if not, how can we blow up? $ n $ number of $ a & # 39; s $ for each $ b $? So this case does not make it a $ CFL $ Right?

Which of these 2 cases are applicable? Are we always aware of the amount of $ b & # 39; s $ we have? Then it shouldn't be a $ regular $ $ language $?

automatons: how to find a context-free grammar of a difficult language?

Some languages ​​are trivial to find their respective context-free grammar. For example $ L = {a ^ nb ^ n: n geqslant 0 } $. However, some are really hard to solve. I would like to have some advice on how I can address them.

For example, I have the following language that I have been trying to solve for a while:enter the description of the image here

I tried to divide the problem into three cases as follows:

case i: na$ le $ northyes

case ii: nyes$ le $ northa$ <$ 2nyes

case iii: na$ ge $ 2nyes

The first case was easy to solve, however, I am stuck in case ii. At this point, I don't even know if the procedure I chose is correct.

finite automatons: with the following logic, shouldn't there be a non-regular language?

We know that the singleton element is a regular language. {a1}, {a2} … {an}. We also know that the finite union of regular languages ​​is also regular.

Suppose there is a non-regular language L. We can take its finite singleton elements {x1, x2, … xi} and join them together. This new language (which is a subset of L) must be regular. Now we do the same with the rest of the language.

Finally, we must have sL1, sL2 … sLn, which are all subsets of L, finite regular languages. Now we take the union of sL1, sL2 … sLi where & # 39; i & # 39; It's finite, again we have a regular language. We do this for all languages ​​obtained from L.

If we continue to make such a union & # 39; finite & # 39; of regular languages, we will finally have L. What should be regular because we got it from the finite union of regular languages.

Obviously, this is not right, but I can't reason why.