The Gateway to Computer Science Excellence

0 votes

Consider the following expression:

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

What is the minimum number of three address statements for the expression?

My question is whether we should optimize the expression before evaluating it or go as it is. For instance the above expression can be optimized as (a+(b-c)*(a+d)) which would generate lesser number of statements.

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

What is the minimum number of three address statements for the expression?

My question is whether we should optimize the expression before evaluating it or go as it is. For instance the above expression can be optimized as (a+(b-c)*(a+d)) which would generate lesser number of statements.

0 votes

Best answer

52,315 questions

60,428 answers

201,759 comments

95,238 users