MML Discourse archived in May, 2026

Interpretting an expression graph

mark

Consider the expression graph G below.

  1. What algebraic expression does G represent?
  2. Perform forward propagation assuming that x=3 and y=-1.
    • Thus, you should determine the value associated with each node after propagation.
    • What is the final result of the computation?
User 009
(x^2 + 2y) + 1\\ x = 3\\ y = -1\\ \\ ((3)^2+2(-1))+1\\ (9 -2) + 1\\ 7 + 1 = 8\\
x x val=3 pow ^ val=9 x->pow c2a 2.0 mul * val=-2 c2a->mul y y val=-1 y->mul c1 1.0 add2 + val=8 c1->add2 add1 + val=7 pow->add1 mul->add1 add1->add2

Like this?

mark

@User 025 Yes - that's really good!

Here's the particularly good part:

  1. You've correctly determined the algebraic expression that the graph models and
  2. You've correctly found the result of the computation.

One remaining issue: Definitely make sure that you know how to arrive at the final value via forward propagation. Demonstrating that knowledge on an exam involves filling in all six valueless nodes in the graph. That includes

  • the two input nodes x and y,
  • The pow(2) and \times nodes one step into the process,
  • The + node at the next step, and
  • The + node at the final step.