top of page

Based on the context-free grammar represented by the following parse tree, draw the corresponding Recursive Transition Network (RTN).



A recursive transition network (RTN) is a graph schematic that represents the rules of Context Free Grammar (CFG). We can see that the given sentence is "The Silly Robot moved the Red Box to the Red Table". Let us write a context-free grammar from this.


We know that all context-free grammars start with S, which implies "sentence". The sentence has two parts - Noun Part and Verb Part.

S 🡢 NP | VP


The Noun Part can be either a Determinant, Adjective or Noun.

NP 🡢 DET | ADJ | N


The Verb Part can either be a Verb, Noun Part or Preposition Part.

VP 🡢 V | NP | PP


DET can be the.

DET 🡢 the


Similarly, ADJ can be silly or red.

ADJ 🡢 silly | red


Noun can be robot, box or table.

N 🡢 robot | box | table


Verb can be moved.

V 🡢 moved


Preposition Part can be Preposition or Noun Part.

PP 🡢 PREP | NP


And finally, preposition can be to.

PREP 🡢 to


Let's write all these rules together.

S 🡢 NP | VP

NP 🡢 DET | ADJ | N

VP 🡢 V | NP | PP

PP 🡢 PREP | NP

DET 🡢 the

ADJ 🡢 silly | red

N 🡢 robot | box | table

V 🡢 moved

PREP 🡢 to





Now that we have our CFG, we can use it to draw RTN. RTN is same as CFG, except for the fact that it uses graphical diagrams. The following will be the RTN of this CFG:



705 views8 comments
logo

Crookshanks Academy is an online learning platform with free netflix styled courses.

Crookshanks Academy 2023 ©️ All Rights Reserved

This content is protected from right clicks.
bottom of page