Riddle: how did Sossinsky code this left trefoil knot? In the notes at the end of his book Knots, Mathematics with a Twist (2002), Sossinsky leaves a small riddle: how can a knot be recognized by a computer? He gives the example of the left trefoil knot that its computer recognizes as 1+-2--3+-1--2+-3--1.

Could you explain the mechanism with which this node was coded?
PS: I'm looking for the solution to this puzzle but I thought it would be fun to share it, the way to code looks more basic than entering a Seifert matrix.
Source: Knots, Mathematics with a Twist (2002), p122.

 A: You mention Seifert matrices, but note that different knots can have the same Seifert matrix. The code that Sossinsky is mentioning is different because it's enough information to recover an entire knot diagram uniquely.
The code is a type of Gauss code. There are many ways you can write these down or encode them (there ends up being some information redundancy), but here's the core idea: label each of the crossings (in this case by 1, 2, and 3), give the knot an orientation, then follow around the knot and record, for each crossing you visit, (a) the crossing label, (b) whether you are going over or under, and (c) whether it is a right-handed or left-handed crossing.  The information in (b) & (c) can be recorded in a couple different ways.
Here's an example for how we could write down a Gauss code, using special symbols to record the (b) & (c) data:

Usually we don't put the 1 at the end -- I guess Sossinsky wants to emphasize it's a closed loop.
I have to admit I'm not sure what convention Sossinsky is using. It seems like he's using "-" for right-handed crossings, which would usually be "+". In any case, if you record "over" as "+" and "right-handed crossing" as "-", then that code could be "1+-2--3+-1--2+-3--1".
If you're interested, here's a post I wrote about different ways of representing knots, including Gauss codes.
