Choose the correct expression for the given below DAG.

Choose the correct expression for the given below DAG.

Answer: C. a +a*(b-c)+(b-c)*dFinal expression: a + a*(b-c) + (b-c)*d Explanation: Compute the subexpression (b - c) once; the DAG reuses this value rather than recomputing it. Form a*(b -…

  1. A.

    (a*(b-c))+ (a*(b-c))+(b-c)*d

  2. B.

    (a+a)*(b-c)+(b-c)*d

  3. C.

    a +a*(b-c)+(b-c)*d

  4. D.

    None of these

Attempted by 401 students.

Show answer & explanation

Correct answer: C

Final expression: a + a*(b-c) + (b-c)*d

Explanation:

  • Compute the subexpression (b - c) once; the DAG reuses this value rather than recomputing it.

  • Form a*(b - c) by multiplying a with the reused (b - c).

  • Form (b - c)*d by multiplying d with the reused (b - c).

  • Add the three terms to get the final expression: a + a*(b - c) + (b - c)*d.

Why the other expressions are incorrect:

  • (a*(b-c))+ (a*(b-c))+(b-c)*d duplicates the product a*(b-c), which contradicts the DAG that uses a and the reused (b-c) without duplicating that multiplication.

  • (a+a)*(b-c)+(b-c)*d adds a to a before multiplying by (b-c), implying two a terms combined; the DAG instead yields a as a separate term plus a*(b-c), not (a+a).

  • 'None of these' is incorrect because the correct expression appears among the provided choices.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…