0

In order to prove that the following language is regular, would I use a pumping lemma?

The set $A$ of all strings that are substrings of some string in $L$, where $L \subseteq\Sigma^*$. $L$ Must be regular.

Raphael
  • 72,336
  • 29
  • 179
  • 389
  • 3
    Good. Now do a similar modification to the title, otherwise one of our moderators will likely suggest that it be sharpened. Consider, for example, "If $L$ is regular, is the language of all substrings of $L$ regular?" – Rick Decker Dec 01 '16 at 02:19
  • @NoahSM1993 is it some string, or any string? – André Souza Lemos Dec 01 '16 at 02:21
  • 2
    Welcome to Computer Science! The title you have chosen is not well suited to representing your question. Please take some time to improve it; we have collected some advice here. Thank you! – Raphael Dec 01 '16 at 05:47
  • 1
    The pumping lemma is only a necessary condition for regularity, thus it can only be used to show that some language is not regular. – Jan Johannsen Dec 01 '16 at 14:12

1 Answers1

2

Here's a hint. Since $L$ is regular, there is a finite automaton $M$ that accepts all and only those strings in $L$. Suppose you only wanted those substrings that start with the same character as a string in $L$. Could you somehow modify $M$ (perhaps by making some states final) so that it would accept all substrings starting with the same character as a string accepted by $L$?

Having done that, could extend this (perhaps with $\epsilon$-moves) so that you could jump from the start state of $M$ to a string along an accepting path in $M$?

Rick Decker
  • 14,826
  • 5
  • 42
  • 54