converting to rank one constraint system I was reading Vitalik Buterin's post on ZK-snarks and I need some clarification
on some points . since there aren't that many posts and articles regarding the subject , I had no choice other than turning to stackexchange .
here is the post :
https://medium.com/@VitalikButerin/quadratic-arithmetic-programs-from-zero-to-hero-f6d558cea649

first I need to know what does he mean by saying " There is a standard way of converting a logic gate into a (a, b, c) triple depending on what the operation is " ?   is he pointing to a specific topic in math ? why triple ? googled R1CS . not that many results came up.

secondly , why use the variable "one" . why assign the variables in a particluar order which is : "one" "x" "out" ... etc .  why 3 vectors ? and HOW does that exactly work ? ESPECIALLY assigning the variables at the 3rd gate is a bit not clear . 

I know these are too many questions and even though I really appreciate any help that I can get , yet I don't expect you to answer every single question.however , if you could point me to the topics,keywords,etc... which describe the methods used therein ,perhaps I could work my way to the end of this article . 
i wish someone would have wrote a complementary post on this article instead 
of repeating the sudoku example over and over again . all you can find is either 
really heavy math papers or waldo analogy . nothing in between .  

p.s : i have read posts on zcash blog. still not clear on R1CS and QAP . and scientific papers are too math heavy ...!
thanks in advance
what does he mean by saying &quot; There is a standard way of converting a logic gate into a (a, b, c) triple depending on what the operation is &quot; ?

He means that every &quot;+&quot; operation will follow the same pattern.  (As will every &quot;-&quot; operation, &quot;*&quot; operation, and &quot;/&quot; operation)
Example using '+' operation:
Statement:
x + y = z

Witness vector
Let's assume our witness vector corresponds to the following variables:

[ ~one, x, y, z (or ~out) ]

The order of these variables is arbitrary, it just has to be kept consistent through out the process
Convert the statement into the A * B - C = 0 format:
(x+y) * 1 - z = 0

This means the following is also true:
A = x + y
B = 1
C = z

Determine the &quot;factors&quot; for each variable in our witness vector
A = (0 * ~one) + (1 * x) + (1 * y) + (0 * z) = x + y
B = (1 * ~one) + (0 * x) + (0 * y) + (0 * z) = ~one
C = (0 * ~one) + (0 * x) + (0 * y) + (1 * z) = z

Our vectors then directly correspond to the factors for each variable in the witness vector
A = [0, 1, 1, 0]
B = [1, 0, 0, 0]
C = [0, 0, 0, 1]

Note that this &quot;pattern&quot; of vector will be used for ANY addition gate where two variables are being added to create a third variable.

A:

1 for each value corresponding to the variables being added
0 for everything else


B:

1 for the value corresponding to ~one
0 for everything else


C:

1 for the value corresponding to the output variable
0 for everything else



I hope this also demonstrates why the ~one variable is necessary.

EDIT:

why 3 vectors ? and HOW does that exactly work ?

The formula A.s * B.s - C.s = 0 allows you to perform any addition/subtraction/multiplication/division operations between values and variables.
The dot product (A.s) allows for scaling and addition of values, and the A*B part allows for multiplication and division of values.
The C vector simply represents the result as a value or variable