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
  • 1
    $\begingroup$ Just write a context-free grammar for it. $\endgroup$ Commented Mar 7, 2017 at 21:53

2 Answers 2

2
$\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$
2
  • 3
    $\begingroup$ This is essentially a copy of Rick's answer. $\endgroup$
    – Raphael
    Commented Apr 30, 2017 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$ Commented Apr 30, 2017 at 19:46

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