Skip to content

ZKCamp/qap-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

QAP Assignment

Calculate QAP step by step for the given equation. Fill in the values in this markdown to complete the assignment

$$ x^2-x-42 == 0 $$

Gates

[Add the gates here]

Symbols

symbols = [~one, x, ?, ?, ?, ?]

Solution Vector

$\vec{s}$ = [1, 7, ?, ?, ?]

R1CS

Gate #1

$$ \vec{a} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{b} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{c} = [?, ?, ?, ?, ?, ?] $$

Verify $$\vec{a}.\vec{s} * \vec{b}.\vec{s} - \vec{c}.\vec{s} == 0$$

Gate #2

$$ \vec{a} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{b} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{c} = [?, ?, ?, ?, ?, ?] $$

Verify $$\vec{a}.\vec{s} * \vec{b}.\vec{s} - \vec{c}.\vec{s} == 0$$

Gate #3

$$ \vec{a} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{b} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{c} = [?, ?, ?, ?, ?, ?] $$

Verify $$\vec{a}.\vec{s} * \vec{b}.\vec{s} - \vec{c}.\vec{s} == 0$$

Gate #4

$$ \vec{a} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{b} = [?, ?, ?, ?, ?, ?] $$

$$ \vec{c} = [?, ?, ?, ?, ?, ?] $$

Verify $$\vec{a}.\vec{s} * \vec{b}.\vec{s} - \vec{c}.\vec{s} == 0$$

Constraint Matrices

$$ A = \begin{bmatrix} ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ \end{bmatrix} $$

$$ B = \begin{bmatrix} ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ \end{bmatrix} $$

$$ C = \begin{bmatrix} ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ ? & ? & ? & ? & ? & ? \\ \end{bmatrix} $$

QAP

$$ A(x) = \begin{bmatrix} ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ \end{bmatrix} $$

$$ B(x) = \begin{bmatrix} ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ \end{bmatrix} $$

$$ C(x) = \begin{bmatrix} ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ ?x^3 + ?x^2 + ?x + ? \\ \end{bmatrix} $$

$$A(x).\vec{s} = ?$$ $$B(x).\vec{s} = ?$$ $$C(x).\vec{s} = ?$$

$$A(x).\vec{s} * B(x).\vec{s} - C(x).\vec{s} = ?$$

Since the above polynomial is equal to $H(x).Z(x)$ it should have roots at x = 1, 2, 3, 4. Verify the same by pasting the polynomial here.

Evaluation

  • Clone this repo.

    git clone CLONE_URL
    
  • Create a new branch with your name. You can use the following command

    git checkout -b my-name
    
  • Fill in the values in this file with your solution

  • Create a pull request from your branch to the main branch of the repo

  • Since this assignment is manually evaluated we will provide feedback on your solution in form of pull request comments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published