Appearance
A constraint system
Note that the condition that
- The left and right inputs to the first gate are
and respectively. - For all gates 1 to 3 the output is computed as the sum of the left and right inputs
- For gates 2 and 3 the left input of gate
is equal to the right input to gate and the right input of gate is the output of gate . - For gate 4, the left and right inputs are the output of gate 3, and the output is the multiplication of the inputs.
We can visualize this as follows:
Or mathematically, consider the set of indexes
and similarly the right inputs
So if the processor
Exercise 2
Check that the five constraints above hold over the arrays defined in Exercise 1. Consider as an example the given implementation of the first two constraints.
python
#Constraint 1
assert LI[1]== 0 and RI[1]==1
#Constraint 2
for i in I:
if i != 4:
assert LI[i] + RI[i] == O[i]
#Constraint 3
#Constraint 4
#Constraint 5