5 5 votes How to do this type of QUESTIONS? Consider following grammar : S → S1 + A | A A → D – A | D D → D1 * B | B B → num The number of internal nodes for the parse tree for 5 * 4 + 10 * 6 – 7 – 8 Compiler Design compiler-design grammar parsing numerical-answers + – vishwa ratna 3.7k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 5 5 votes Parse tree for $5 * 4 + 10 * 6 – 7 – 8$ based on above grammar will contains $18$ internal nodes and $6$ leaf nodes. PS:) Will update this answer after Gate with Parse tree drawn mcjoshi answered Jan 18, 2017 • selected Jan 31, 2017 by Sushant Gokhale mcjoshi comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments mcjoshi commented Jan 31, 2017 reply Follow flag I know the difference. Iam counting $18$ in parse tree Thanks again bro :) 1 1 replyShare rasto mapp commented Sep 8, 2017 reply Follow flag @air1 2 2 replyShare nilubabu2 commented Oct 13, 2018 reply Follow flag Sir, Shall we incldue start node (s) with internal node means 17 + 1(start node So = 18 ? 1 1 replyShare Please log in or register to add a comment.
0 0 votes Internal node-18 Leaf node->6 Prateek kumar answered Jan 4, 2018 Prateek kumar comment Share Follow 0 reply Please log in or register to add a comment.