Explain an expression tree with a suitable example, Computer Engineering

Assignment Help:

What is an expression tree? How an expression is evaluated using an expression tree?

Algebraic expressions is as given here
a/b+(c-d)e
That has an inherent tree-like structure. For illustration following figure is a representation of the expression of above equation. This type of tree is termed as an expression tree.

549_expression tree.png


The terminal nodes or leaves of an expression tree are the constants or variables in the expression (a, b, c, d, and e). Therefore the non-terminal nodes of an expression tree are the operators (+, -, ÷, and ×).


Related Discussions:- Explain an expression tree with a suitable example

Difference between static call and dynamic call, In the case of Static call...

In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, t

Analyse the website design, Briefly analyse and compare the two website des...

Briefly analyse and compare the two website designs, applying in turn each of the six design principles. This will result in six brief paragraphs. As part of each analysis, expl

Adding momentum - sigmoid units, Adding Momentum - Sigmoid units: Howe...

Adding Momentum - Sigmoid units: However imagine a ball rolling down a hill as it does so then it gains momentum in which its speed increases and it becomes more difficult to

Explain clone process, Explain Clone process. A clone process is genera...

Explain Clone process. A clone process is generated using primitive type clone by duplicating its parent process. However unlike traditional processes it might be share its con

Canonical genetic algorithm - mating, Canonical genetic algorithm - Mating:...

Canonical genetic algorithm - Mating: In such a scenario this continues until the number of offspring that is produced is the required number. Further this required number is

How many address bits are required to represent 4K memory, How many address...

How many address bits are required to represent 4K memory ? Ans. 12 address bits are required for representing 4K memory, as 4K = 2 2 x 2 10   = 2 12 Therefore 1K = 1024

By which except ions of type error in java are handled, Except ions of type...

Except ions of type error in JAVA are handled by? Except ions of type error in the JAVA are handled through JAVA run time environment.

Difference between property get, Set Value is ready to ActiveX Object from ...

Set Value is ready to ActiveX Object from the form. Let Value is retried to ActiveX Object from the form. Get- Assigns the value of an expression to a variable or property.

Computer organization, using one-address instructions,write a program to co...

using one-address instructions,write a program to compute X=A-BxC

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd