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:



727 views8 comments

8 Comments


Guest
May 27

I think you missed PP->PREP | NP

Like
Replying to

Hi. Seems to me you are correct. I missed it in the diagram. I will fix it.

Like

Unknown member
May 27

Nice explanation

Like
Replying to

Thanks

Like

Guest
May 26

Don't understand it


Like
Replying to

What part of it don't you understand?

Like

Unknown member
May 26

great work

Like
Replying to

Thanks

Like
bottom of page