

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is a Derivation tree in TOC?
Derivation tree is a graphical representation for the derivation of the given production rules of the context free grammar (CFG).
It is a way to show how the derivation can be done to obtain some string from a given set of production rules. It is also called as the Parse tree.
The Parse tree follows the precedence of operators.
The deepest subtree is traversed first. So, the operator in the parent node has less precedence over the operator in the subtree.
Properties
The properties of the derivation tree are given below −
- The root node is always a node indicating the start symbols.
- The derivation is read from left to right.
- The leaf node is always the terminal node.
- The interior nodes are always the non-terminal nodes.
Example
The production rules for the derivation tree are as follows −
E=E+E E=E*E E=a|b|c
Here, let the input be a*b+c
Step 1
The step 1 is given below
Step 2
The step 2 is given below
Step 3
The step 3 is given below
Step 4
The step 4 is given below
Step
The step 5 is given below
- Related Questions & Answers
- Explain the concept of derivation in TOC
- Construct the derivation tree for the string aabbabba.
- What is a Moore Machine in TOC?
- What is a mealy machine in TOC?
- What is Decidability in TOC?
- What is a finite state machine in TOC?
- What is a context sensitive language in TOC?
- What is Inductive Hypothesis in TOC?
- What is unambiguous grammar in TOC?
- What is NP-completeness in TOC?
- What is Turing Machine in TOC?
- What is an epsilon closure in TOC?
- What is the decision problem in TOC?
- What is the Halting Problem in TOC?
- What is Linear bounded automata in TOC?
Advertisements