Regular Grammar Right and Left Linear Grammar || Lesson 45 || Finite Automata || Learning Monkey ||

Опубликовано: 02 Октябрь 2024
на канале: Learning Monkey
2,687
30

Regular Grammar Right and Left Linear Grammar
In this class, We discuss Regular Grammar Right and Left Linear Grammar.

The reader should have prior knowledge of Grammar. Click Here.

Regular Grammar is used to represent regular languages.

Regular Grammar is of two types.

right linear Grammar

left linear Grammar

The grammar contain G = {V, T, P, S}

V means set of variables. We call them nonterminals.

T means set of terminals

P means set of productions

S is the start symbol

Right Linear Grammar:

Production conditions

The right linear Grammar should follow the following conditions.

The left side of the production contains a single nonterminal.

The right side of the production should have a terminal or a terminal followed by a nonterminal.

A – x

A – xB where A, B belongs to V and x belongs to T.

The productions should follow these conditions for right linear Grammar.

Left Linear Grammar

Production conditions

The left side of the production contains Nonterminal

The right side of the production should have a terminal or a nonterminal followed by the terminal.

A – x

A – Bx where A, B belongs to V and x belongs to T.

Link for playlists:
   / @learningmonkey  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]