Context Free Grammar Flashcards

1
Q

What is a tuple?

A

Tuples are used to store multiple items in a single variable. A tuple is a collection which is ordered and unchangeable. They are written with round brackets like so..

thistuple = (“apple”, “banana”, “cherry”)
print(thistuple)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a context-free grammar?

A

Context-free grammar is a 4-tuple (V,Σ, R, S) where where V is a set of variables, Σ is an alphabet of terminal symbols, R is a set of rules, and S is a start symbol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly