Skip to content

Instantly share code, notes, and snippets.

@c-plus-plus-equals-c-plus-one
Last active October 13, 2025 15:23
Show Gist options
  • Save c-plus-plus-equals-c-plus-one/d0257c767956a975005173b6f94090b8 to your computer and use it in GitHub Desktop.
Save c-plus-plus-equals-c-plus-one/d0257c767956a975005173b6f94090b8 to your computer and use it in GitHub Desktop.
RareSkills ZK Homework Exercises 1, 2, 3, 4

Assuming p=71 for all below problems.

  1. Find the elements in a finite field that are congruent to the following values:
    1. -1 ≅ 70 (since -1 mod 71 = 70 and 70-(-1) = 71, 71 % 71 == 0;
    2. -4 ≅ 67. 67 - (-4) = 71;
    3. -160 ≅ 53;
    4. 500 ≅ 429.
  1. Find the elements that are congruent to:

a=5/6, b=11/12, c=21/12. Verify the answer by checking that a + b = c in the finite field.

60 ≅ a, 66 ≅ b, (126 mod 71 ==>) 55 ≅ c.

60 + 66 = 126 mod 71 = 55.

  1. Find the elements that are congruent to:

a=2/3, b=1/2, c=1/3.

a ≅ 48, b ≅ 36, c ≅ 24.

48 * 36 = 1728 mod 71 = 24.

  1. The inverse of a 2 x 2 matrix $A$ is

\ A^{-1}=\frac{1}{\text{det}}\begin{bmatrix}d & -b\-c & a\end{bmatrix}

where $A$ is

\  \ A = \begin{bmatrix}a & b\c & d\end{bmatrix}

And the determinant $$det$$ is

\ \text{det}=a \times d-b\times c

Compute the inverse of the following matrix in the finite field:

\ \begin{bmatrix}1 & 1\1 & 4\end{bmatrix}

Verify your answer by checking that

\ AA^{-1}=I

Where $I$ is the identity matrix.

The answer is:

\ A^{-1}=\begin{bmatrix}25 & 47\47 & 24\end{bmatrix}

Verifying it:

\ AA^{-1}=\begin{bmatrix}25 & 47\47 & 24\end{bmatrix}*\begin{bmatrix}1 & 1\1 & 4\end{bmatrix}=\begin{bmatrix}1 & 0\0 & 1\end{bmatrix}

@c-plus-plus-equals-c-plus-one
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment