3
$\begingroup$

I am trying to prove that every finite language is context-free, is there any type of way that I could do it effectively?

$\endgroup$
  • 1
    $\begingroup$ Just write a context-free grammar for it. $\endgroup$ – David Richerby Mar 7 '17 at 21:53
1
$\begingroup$

It's not hard to show that every finite language is regular. If you know that every regular language is also context-free, you're done.

$\endgroup$
-3
$\begingroup$

Every finite language is Regular. ( Because we can construct a finite automata for it )

Every regular language is cf. ( Because regular language is subset of cf )

Hence proved.

$\endgroup$
  • 3
    $\begingroup$ This is essentially a copy of Rick's answer. $\endgroup$ – Raphael Apr 30 '17 at 17:51
  • $\begingroup$ Your answer is correct but it adds nothing new to the existing answer. Thanks for posting but we'd prefer it if you only posted where you have something new to add. Thanks! $\endgroup$ – David Richerby Apr 30 '17 at 19:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.