TITLE: Algorithm for computing the Arf invariant of a knot
QUESTION [6 upvotes]: According to "The knot book", by Colin Adams, two knots are pass equivalent if they are related by a finite sequence of pass-moves. Moreover every knot is pass-equivalent to either the unknot or the trefoil knot and these two knots are not pass-equivalent. 

We define Arf invariant of a knot to be 0 if the know is pass equivalent to unknot and to be 1 if it is pass equivalent to the trefoil knot.
Now here is my question: I am not interested to know how a knot is pass-equivalent to unknot or the trefoil knot. I just want to know if there is an easy algorithm for computing the Arf invariant of a knot based on its projection (for example, like the algorithm that we use to compute the linking number of links)? 
Can we move along a knot and compute its Arf invariant by taking its crossings somehow into consideration (maybe by counting its positive and negative crossings)?

REPLY [3 votes]: Arf invariant is modulo two reduction of the Vassiliev invariant $v_2$ (the coefficient of $z^2$ in the Conway polynomial). Thus a well-known Gauss diagram formula for $v_2$ can be used for its computation. Namely, fix a knot diagram  and choose a base point distinct from the crossings. Traverse the diagram starting from the base point. Each crossing is visited twice; write down the sequence in which we visit these crossings, denoting a passage on an overpass by $O_i$ and on an underpass by $U_i$. The result is the Gauss code of the knot diagram. For example, the standard diagram of a trefoil will be encoded by $U_1 O_2 U_3 O_1 U_2 O_3$. Then the Arf invariant is the number of "linked" pairs of crossings $...U_i...O_k...O_i...U_k...$ in the Gauss code.