-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Zeroing Parts of an Array (2) | ||
|
||
Assume both $\mathsf{Arr}$ (an array of data) and $\mathsf{Sel}$ (a binary array) are of size $n$. They are encoded as the y-coordinates into univariant polynomials where the x-coordinates (called the domain $\mathcal{H}_\kappa$) are chosen as the multiplicative group of order $\kappa$ with generator $\omega\in\mathbb{G}_\kappa$ (see [Background](../background/poly-iop.md) for more). In short, $\omega^0$ is the first element and $\omega^{\kappa-1}$ is the last element of $\mathcal{H}_\kappa$. We call our polynomials $\mathsf{Poly}_\mathsf{Arr}(X)$ and $\mathsf{Poly}_\mathsf{Sel}(X)$. The goal is to construct an output polynomial where all the elements in $\mathsf{Arr}$ that share an index with a zero in $\mathsf{Sel}$ are zeroed (and non-zero elements in $\mathsf{Arr}$ that share an index with a one in $\mathsf{Sel}$ are kept non-zero). | ||
|
||
Note that $\mathsf{Poly}_\mathsf{Sel}(X)$ has a root at every point in $\mathcal{H}_\kappa$ that corresponds to a zero entry in $\mathsf{Sel}$, since it has a $y$ value of zero at each of these values of $x$. Denote this set of roots $R = [r_0, r_1, \dots, r_{m-1}]$, where $m$ is the number of zero entries in $\mathsf{Sel}$. Denote also $S = [s_0, s_1, \dots, s_{l-1}]$ the (possibly empty) set of remaining roots of $\mathsf{Poly}_\mathsf{Sel}(X)$, for some $l \in \mathbb{N}$. Then written in root form we have $\mathsf{Poly}_\mathsf{Sel}(X) = \prod^{i \lt m}_{i = 0} (X - r_i) \cdot \prod^{i \lt l}_{i=0}(X-s_i)$. Express $\mathsf{Poly}_\mathsf{Arr}(X)$ in root form as well, writing: $\mathsf{Poly}_\mathsf{Arr}(X) = \prod^{i<h}_{i=0}(X - t_i)$ for some $h \in \mathbb{N}$. | ||
|
||
Now, consider $\mathsf{Poly}_\mathsf{Arr}(X) \cdot \mathsf{Poly}_\mathsf{Sel}(X) = \prod^{i \lt m}_{i = 0} (X - r_i) \cdot \prod^{i \lt l}_{i=0}(X-s_i) \cdot \prod^{i \lt h}_{i=0}(X-t_i)$. First, note it has roots at each $r \in R$, thus this new polynomial has zeroed out all the elements of $\mathsf{Arr}$ corresponding to a zero entries in $\mathsf{Sel}$. Further, the only other roots it has are from $S$ or from $T = [t_0, t_1,\dots, t_{h-1}]$. No value $s \in S$ is also in $\mathcal{H}_\kappa$, and $T$ is the set of values that were already roots of $\mathsf{Poly}_\mathsf{Arr}$. Thus, all non-zero entries in $\mathsf{Arr}$ are left non-zero, and $\mathsf{Poly}_\mathsf{Arr}(X) \cdot \mathsf{Poly}_\mathsf{Sel}(X)$ is our desired output polynomial. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters