To analyze the 2-bit addressing function ( \text{addr2} ), let's break down the problem step by step.
Function Definition
The function ( \text{addr2} ) is defined as:
[
\text{addr2}(x, y, z_{++}, z_{+-}, z_{-+}, z_{--}) = z_{xy}
]
where:
- ( x, y \in { -1, +1 } ) are the address bits.
- ( z_{++}, z_{+-}, z_{-+}, z_{--} \in { -1, +1 } ) are the data bits corresponding to each possible combination of ( x ) and ( y ).
Essentially, ( \text{addr2} ) selects one of the four ( z ) values based on the values of ( x ) and ( y ):
- If ( x = +1 ) and ( y = +1 ), output ( z_{++} ).
- If ( x = +1 ) and ( y = -1 ), output ( z_{+-} ).
- If ( x = -1 ) and ( y = +1 ), output ( z_{-+} ).
- If ( x = -1 ) and ( y = -1 ), output ( z_{--} ).
Decision Tree Construction
A decision tree for ( \text{addr2} ) systematically queries the input variables to determine the output. Here's how you can construct such a tree:
- First Level: Query ( x )
- If ( x = +1 ):
- Second Level: Query ( y )
- If ( y = +1 ): Output ( z_{++} ).
- If ( y = -1 ): Output ( z_{+-} ).
- If ( x = -1 ):
- Second Level: Query ( y )
- If ( y = +1 ): Output ( z_{-+} ).
- If ( y = -1 ): Output ( z_{--} ).
This decision tree has a depth of 2, as it requires querying both ( x ) and ( y ) to determine the correct output.
Polynomial Representation Degree
The degree of the polynomial that represents ( \text{addr2} ) refers to the highest degree of any monomial in its algebraic normal form (ANF).
Upper Bound: Degree ≤ 2
The polynomial can be constructed as follows:
[
\text{addr2}(x, y, z_{++}, z_{+-}, z_{-+}, z_{--}) = \frac{1 + x}{2} \cdot \frac{1 + y}{2} \cdot z_{++} + \frac{1 + x}{2} \cdot \frac{1 - y}{2} \cdot z_{+-} + \frac{1 - x}{2} \cdot \frac{1 + y}{2} \cdot z_{-+} + \frac{1 - x}{2} \cdot \frac{1 - y}{2} \cdot z_{--}
]
Each term involves at most a product of two variables (( x ) and ( y )), indicating that the degree is at most 2.
Lower Bound: Degree ≥ 2
To ensure that different outputs are selected based on both ( x ) and ( y ), the polynomial must involve the interaction between ( x ) and ( y ). A linear polynomial (degree 1) cannot capture the dependency on both ( x ) and ( y ) simultaneously. Therefore, the degree cannot be less than 2.
Conclusion
-
Decision Tree:
- Query ( x ) first.
- Based on ( x ), query ( y ).
- Output the corresponding ( z ) value based on the combination of ( x ) and ( y ).
-
Polynomial Degree:
- Upper Bound: 2
- Lower Bound: 2
Thus, the polynomial representation of ( \text{addr2} ) has a degree exactly equal to 2.
Final Answer
A decision tree for addr2 first queries x, then y, and based on their values outputs z++, z+−, z−+, or z−− accordingly. Any polynomial representing addr2 must include terms involving both x and y, so its degree is two. Therefore, the polynomial degree is at most 2 and cannot be less than 2. Thus, the degree of addr2’s polynomial representation is exactly two.