As far as I know, finite languages have a finite number of strings or words, while context-free languages are generated by context-free grammars. I don't know which aspect should I know that they are correlated with. All I know is that finite languages are regular, and regular languages are context-free. How should I know this?
- $F$ be the set of finite languages
- $R$ be the set of regular languages
- $C$ be the set of context-free languages.
The statement "All finite languages are regular" can be rewritten $F \subseteq R$. Similarly, "All regular languages are context-free" can be rewritten $R \subseteq C$. Both being true, we can take $F \subseteq R \land R \subseteq C$ to be true as well.
Set inclusion is known to be a transitive relation, that is $F \subseteq R \land R \subseteq C \rightarrow F \subseteq C$. Thus, by modus ponens, we can conclude that $F \subseteq C$ is true, or that all finite languages are context-free.