retagged by
4,042 views
18 votes
18 votes
Indicate whether the following statement is true or false, providing a short explanation to substantiate your answers.

A DFA that has $n$ states and accepts an infinite language must accept at least one string $x$ such that $2n < |x| < 3n$, where $|x|$ denotes the length of $x$.
retagged by

6 Answers

Best answer
16 votes
16 votes

FALSE.

DFA has $n$ states and so the smallest length string accepted will be $< n.$ Let its length be $d.$

Now, since infinite strings are accepted we must have a loop in the DFA. the length of the loop will be $\leq n$ because we only have $n$ states. Let this loop length be $l.$

So, strings of length $d, d+l, d+2l, d+3l, \ldots, d+nl, d+(n+1)l, \ldots$ will be accepted by the DFA.
At some point in the above sequence, the string length will cross $2n$. Lets take the string length just before this such that $|x| \leq 2n$ and $| x|+ l > 2n.$

Since, $l \leq n, |x| + l \leq 2n + n \leq 3n.$

So, the DFA must accept at least one string $x$ such that $2n < |x| \leq 3n.$

This can also be $2n \leq |x| < 3n.$

Since the given question says $2n <|x| < 3n$ it is FALSE. We can prove this with a small counter example as shown below. 

The above DFA accepts all even length strings of over the alphabet set $\{a\}$ and its number of states is $2$. But no string is accepted of length between $2n$ and $3n$ which will be $4$ and $6.$

edited by
8 votes
8 votes

Consider above DFA in which:

$\text{initial state} = q0$

$\text{final states} = \{q0,q1\}$

$\text{trap sate} = q2$

Language generated by above DFA is $a^*b^*$ which is an infinite language

$n= 3$ (number of states)

now consider $\text{string} \ X=\{aaabbbb\}$ i.e., $a^3b^4$   

$|X| = 7$

now $2n= 2*3 = 6$

$3n = 3*3 = 9$

$2n<|x|<3n \Rightarrow 6< 7 <9 $
 
Hence, it is proved.
edited by
8 votes
8 votes

Answer: FALSE

6 votes
6 votes

Pumping Lemma for the regular languages say




Now the point is there will be at least one string w such that $\left | w \right |$ is less than n.
Proof: Take the shortest path from the initial state to the final state in the DFA having n state.

Now as pumping lemma said, for any w $\in$ L. We will choose our w in such a way that $\left | w \right |$ < n and we decomposed into w = xyz, satisfying the condition given in pumping lemma.

$w_{i}$ = x$y^{^{i}}$z . whenever we increment 'i' by 1. The length of the string can't be increased by n as $\left | y \right |$ is not greater than n. Therefore we will get at least one string say 's' whose length is between n and 2n, between 2n and 3n, between 3n and 4n and so on.
 

Related questions

11 votes
11 votes
2 answers
1
go_editor asked May 27, 2016
1,083 views
Indicate whether the following statement is true or false, providing a short explanation to substantiate your answers.If a language $L$ is accepted by an NFA with $n$ sta...
4 votes
4 votes
1 answer
2
go_editor asked May 19, 2016
2,108 views
Indicate whether the following statements are true or false, providing a short explanation to substantiate your answers.A DFA with $n$ states must accept at least one str...