Module 2.5: Context Free Languages

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:33 AM on 9/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

Formal Languages

Classified in to different language classes based on the computational power required to recognize them.

2
New cards

Chomsky Hierarchy

The classification of formal languages forms the basis for the _________, which divides languages into four types, each corresponding to a different class of automata.

3
New cards

Type 0-Recursively Enumerable
Type 1-Context Sensitive
Type 2-Context Free
Type 3-Regular

Classes of Formal Languages

4
New cards

Type 3-Regular Languages

The simplest type of formal languages and can be recognized by finite state machines. These languages have a structure that can be described using regular expressions or regular grammars.

5
New cards

Finite Automata (FA)

Automaton of Regular Languages.

6
New cards

Production Rule Form

The regular language is _______, where in the non terminal symbol or variable is places at the rightmost (leftmost) part of the string.

7
New cards

Type 2-Context Free Languages

More expressive than regular languages and can be recognized by push down automata.

8
New cards

Context Free

All regular languages are considered as ________ since it is a subset but not the other way around.

9
New cards

Context-Free Grammars (CFG)

Allow rules where a single non-terminal symbol is replaced by a string of terminals and/or non-terminals.

10
New cards

Pushdown Automata (PDA)

Automation of Context-Free Language.

11
New cards

Generated by Context Free Grammars
Recognized by Push Down Accepters

Context Free Languages can be

12
New cards

Modeling Languages

Context-free languages are particularly suited for ________ with nested or recursive structures.

13
New cards

Growing only one side of the string.
Only one terminal symbol per production rule.

Restrictions of CFG

14
New cards

V
T
P
S

Grammar definition, a 4 tuple G

15
New cards

V

Finite set of non terminal symbols or variables.

16
New cards

T

Finite set of terminal symbols.

17
New cards

P

Finite set of production rule.

18
New cards

S

Start symbol.

19
New cards

Parse Tree

Illustrate the derivation process of a string. When a string is derived using leftmost or rightmost direction, the parse tree will be the same.

20
New cards

Leftmost Derivation
Rightmost Derivation

Derivations in CFG will now vary. Since multiple non terminal symbols can appear multiple times in a production rule, replacement can be done in one of the two directions.