# VRS Exam 2022.02 Problem 1c)

Hello,

I have two queries regarding Compose Algorithm in the last exam (2022.02.16) problem 1(c).

1. How to further proceed with the terms inside green highlighted box? It has 1 in the middle and 0 at the end, according to algorithm shown here should we use Apply algo here? Or am I doing something wrong? Kindly help. I didn't get the solution.
2. How did we get the terms highlighted in red?

About the green box: I remember a similar question about the ITE algorithm where also two rules could be applied. Both ways would be correct, and that is also the case here. Whether you reduce ITE(n0,1,0) and ITE(0,0,1) by recursive calls to ITE or to Apply will not matter at the end. Both ways will return the same BDDs. The example solution follows the pseudocode given for the ITE algorithm on page 32 which is definitely correct. As mentioned, there are however alternative ways to proceed with this.

About the red box: We had to compute ITE(n5,0,1) with n5 = (b?n1:1) so that the ITE algorithm reduces ITE(n5,0,1) to (b?ITE(n1,0,1):ITE(1,0,1)) which is also correct. As mentioned, the example solution follows the pseudocode that explains the computation

by (166k points)
selected by
Thank you so much professor!