edited by
380 views
1 votes
1 votes
Let E={<M>| M is a DFA that accepts some strings with more 1's than 0's}

Show that E is decidable.

How can E be decidable. How can a DFA compare between number of 1's and 0's.

From the question I know that it's not talking about all, but some. The things is even some should not be decidable. isn't it?
edited by

1 Answer

0 votes
0 votes
This can be done by using closure properties of CFLs.

Let the language

$$A = \{ \text{w} |  \text{w has more 0s than 1s\}}$$ be the CFL.

We can construct a TM $S$ for the given language in the following way:

1. We construct $B$ such that $B = A \, \cap L(M)$ (note that B will be a CFL)
2. Then, we can use testing emptiness of CFG on this, which we know is decidable.
3. If $S$ is empty, we reject. Else, we accept.

Related questions

0 votes
0 votes
0 answers
1
aambazinga asked Sep 8, 2018
430 views
How can we say that any two disjoint co-turing recognisable languages are seperable by some Decidability language?
3 votes
3 votes
3 answers
3
Parshu gate asked Nov 29, 2017
645 views
Suppose in question we are given the language is Turing Decidable , can I consider it a CFL or Regular?