This practical is based on the related lecture: Lecture 3: Context-Free Languages

Exercise 1

For each of the languages below, provide a context-free grammar to generate it:

<aside> 💡

Hints

Exercise 2

For each grammar below, describe its language in the most precise way (that is, answers such as "strings of 0's" are not correct):

<aside> 💡

Hints

Exercise 3

Create grammars that generate exactly the same language as each of the DFAs below:

DFA (a)

DFA (a)

DFA (b)

DFA (b)