how to prove an arbitrary language can be accepted by an Infinite state automata - regular-language

we know that language accepted by a DFA can also be accepted by an ISA for DFA is a special case of ISA, so about an arbitrary language? How to prove it?

Define transitions such that every word in the language has a corresponding accepting state, with whatever supporting states are needed to reach those accepting states (a structure analogous to a trie - https://en.wikipedia.org/wiki/Trie). This automaton is deterministic and will accept any language.

Related

Prove regular language and automata

This is a grammar and I wan to check if this language is regular or not.
L → ε | aLcLc | LL
For example the result of this grammar is:
acc, accacc ..., aacccc, acaccc, accacc, aaacccccc, ...
I know that is not a regular language but how to prove it? Is building an automata the right way to prove it? What is the resulting automata. I don't see pattern to use it for build the automata.
Thank you for any help!
First, let me quickly demonstrate that you cannot deduce the language of a grammar is irregular based solely on the grammar's being irregular. To see this, consider the unrestricted grammar:
S -> SSaSS | aS | e
SaS -> aSa
aaS -> SSa
This is clearly not a regular grammar but you should be able to verify it generates the infinite regular language of all strings of a.
That said, how should we proceed? We will need to figure out what language your grammar generates, and then argue that particular language cannot be regular. We notice that the only rule that introduces terminal symbols always introduces twice as many c as it does a. Furthermore, it's not hard to see the language must be infinite. We can use the Myhill-Nerode theorem to show that these observations imply the language must be irregular.
Consider the prefix a^n of a hypothetical string in the language of this grammar. The shortest string which can be appended to the end of this prefix to give us a string generated by this grammar is c^(2n). No shorter string will work, and that string always works. Imagine now that we were looking at a correct deterministic finite automaton for the language of the grammar. Then, whatever state processing the prefix a^n left us in, we'd need the shortest path from there to an accepting state in the automaton to have length 2n. But a DFA must have finitely many states, and n is an arbitrary natural number. Our DFA cannot work for all possible n (it would need to have arbitrarily many states). This is a contradiction, so there can be no correct DFA for the language of the grammar. Since all regular languages have DFAs, that means the language of this grammar cannot be regular.

REGULAR language (Automata theory)

Is it true that the language accepted by any NFA is different from the regular language? I just started TOC, and someone asked me this question, I'm not sure what it exactly means and how to justify it, i tried googling it, but no results.. can someone help me with this?
A language L is called regular if and only if there exists some deterministic finite accepter (DFA) M such that
L= L(M)
Let L be the language accepted by a non-deterministic finite accepter (NFA) MN= (QN, Σ,δN,q0
,FN). Then
there exists a deterministic finite accepter MD= (QD, Σ,δD,{q0},FD) such that
L= L(MD)
So we can design at least one DFA for one NFA and as a result, language of both of them is regular.
You can see more information about it in An introduction to formal languages and automata Peter Linz, section 2.3.
An language accepted by a FA (whatever NFA or DFA) is Regular Language!
What's more, regular sets, DFA, NFA, pattern, regular expression are equivalent.

How many languages does a DFA recognize?

According to Sipser's "Introduction to the Theory of Computation": If A is the set of all strings that machine M accepts, we say that A is the
language of machine M and write L(M) = A. We say that M recognizes A ... A machine may accept several strings, but it always recognizes only one language. and also We say that M recognizes language A if A = {w| M accepts w}.
I guess the question has already been answered, but I would like to know if anyone has any thought about it, if there is anything interesting we can say about the subsets of a regular language, if we can say that the original DFA recognizes them and if there is any interesting relationship between the original DFA and the ones that recognize the smaller languages
If the language recognized by a DFA (of which there is always exactly one) is finite, then there are finitely many sublanguages of that language (indeed, if the language accepted consists of N strings, there are 2^N sublanguages).
There is no useful relationship which can be easily inferred from the sub/super language relationship w.r.t. where in the Chomsky hierarchy the language falls. That is: a sublanguage of a regular language may be undecidable, and a sublanguage of an undecidable language may be regular, with all possible variations in between.
Because of this, there is no particularly neat relationship to be worked out among DFAs of sub/super languages: not all of the sublanguages will even be regular; some sublanguages will have simpler DFAs than the DFA of the super language, and some will have more complicated DFAs than the DFA of the super language. Some will have the same DFA but a different set of accepting states.
Given a DFA, there is only one language corresponding to the machine. A language is a set, that is, a collection of all the strings accepted by the dfa.

How would you prove an ordered language is regular?

I want to know how to prove a language that has order constraints is regular. For example if you had that Σ = {1,2,3,4,5} where L (a subset of Σ*) = (a1,a2,...an) such that an+1 was larger than an how would you prove that this is a regular language?
e.g α = (1,3,5) would be accepted, however α = (1,4,5,2) would not.
Any language that can be recognized by a DFA (deterministic finite automaton) is regular. To prove that the language you described is regular, you simply have to prove that there exists a DFA that recognizes this particular language.
Remember that Σ is finite. If I understood the constraint of the language properly, one construction that works would have one starting state (accepting or non-accepting depending on whether you want to include ε in your language), one accepting state for each symbol in Σ and one rejecting state. The transition function should result in the state corresponding to the current input symbol if the current state is the starting state or corresponds to a "lesser" symbol, and to the rejecting state otherwise.
A shortcut is also available - each finite language is regular, and if I understood the constraint of the language you described properly, it is clearly finite (since Σ is finite). This trivially means that the language is also regular.

Determine how many states the minimal DFA will have

This is the pumping lemma to demonstare that a language is not regular:If L is a regular language,there is a const N such that, for each z in L, with |z|>=N, is possibile to divide z in three sub-strings (uvw=z)such that:
1)|uv|<=N;
2)|v|>=1;
3)For each k>=0, uv^kw in L.
N must be less or equal than the minumum number of states of the DFA accepting L.So to apply the pumping lemma I need to know how many states will have the minimal DFA accepting L.Is there a way to know how many states will have backwards?So is possibile to know the minimal number of states without building the minimal DFA?
N must be less or equal than the minumum number of states of the DFA
accepting L
N cannot be less than the number of states in a minimal DFA accepting L; otherwise, the DFA couldn't accept L (if it could, you would have a DFA accepting L smaller than the minimal DFA accepting L, a contradiction). We can safely assume that N is equal to the number of states in the minimal DFA accepting L (such DFAs are unique).
So to apply the pumping lemma I need to know how many states will have
the minimal DFA accepting L
This is not strictly true. In most pumping lemma proofs, it doesn't matter what N actually is; you just have to make sure that the target string satisfies the other properties. It is possible, given a DFA, to determine how many states a minimal DFA will have; however, if you have a DFA, there's no need to bother with the pumping lemma, since you already know L is regular. In fact, determining an N such that there's a minimal DFA with N states accepting L constitutes a valid proof that the language in question is indeed regular.
So is possibile to know the minimal number of states without building
the minimal DFA?
By analyzing the description of the language and using the Myhill-Nerode theorem, it is possible to construct a proof that a language is regular and find the number of states in a minimal DFA, without actually building the minimal DFA (although once you have completed such a proof using Myhill-Nerode, construction of a minimal DFA is a trivial exercise). You can also use Myhill-Nerode as an alternative to the pumping lemma to prove languages aren't regular, by showing a minimal DFA for the language would need to have infinitely many states, a contradiction.
Please let me know whether these observations answer your questions; I will be happy to provide additional clarification.

Resources