Saturday, April 15, 2017

Permutation cardi

There's some maths behind this one!  The idea here is that there are exactly 6 ways to permute 3 elements, and each of the cable represents one of these two permutations.

We can describe a permutation by writing down what it does to the elements 1, 2 and 3 - so the two cables on the front represent (1, 3, 2) and (2, 1, 3).

The ones on the back are slightly more complex - these ones represent (2, 3, 1) and (3, 1, 2), but in these cases you've got one element moving two places, which distorts the knitting a little more, so I've broken these into two steps each containing a single crossing.

The arms are the bit I'm most excited about - of the 6 possible permutations, there are two pairs which are mirror images (the ones we've seen), but the remaining two are their own mirror images, so they don't have a relationship - (3, 2, 1) and the trivial permutation (1, 2, 3), which leaves everything unchanged.  These give this nice asymmetry between the two arms.  (3, 2, 1) again has elements moving two places, but it's hard to break this up into two steps, so here I've added an extra chain stitch to extend the cables.

Also exciting, the length of the repeats varies between permutations -  this gives their order in the symmetry group: (1, 3, 2), (2, 1, 3) and (3, 2, 1) all have order 2, (2, 3, 1) and (3, 1, 2) are order 3, and (1, 2, 3) is order 1, so the lengths of their repeats is different.  It's cool too that these all divide 6, so if you could fit in exactly 6 repeats, all the cables would end up in the right place after the same number of rows.

You could go much further with this too!  These permutations are at the heart of bell-ringing, although taken much further - for example here.  I love the intricate patterns this gives, but I would be wary of doing this with intarsia cables - as much as I love the colours, this ends up with the yarn getting crossed and needing to be constantly untangled.  Still, imagine that beautiful scarf with rainbows weaving together!

Saturday, March 4, 2017

Foxtato pattern!

Also!  I should have mentioned here, I finally got around to posting my Foxtato pattern - you can see this on Ravelry here, and it's available for free download: Ravelry download

Looking forward to seeing other people's projects, and to see them Doing The Thing!


Data structures

Hi folks!  (I aten't dead)
I was thinking recently that I haven't made nearly enough things to do with computer science, the same way I did for maths, and it's time to fix that!
So this project is to knit a family of data structures.  The idea will be to take a bunch of plastic toy balls to represent data items, and knit wrapper cups, connected together in different ways, to represent the data structure itself.
I've got ideas for a few of these:

  • Linked list - each node has a link to the next node.
  • Doubly linked list - each node has forward and backward links.
  • Binary tree - each node has two children.  I'd like this to be unbalanced, so some of the branches will be longer than others.
  • Red-black tree - another binary tree, but with coloured nodes (and this one will be balanced).
  • Hash table - a single parent has a bunch of child nodes, each with a coloured rim to represent the hash value of the objects to place in it.  Some of the child nodes will also form (small) linked lists, of the same colour.
  • Array - a string of references, only some of which have a node attached.  (It might be more accurate if he nodes are all there, but only some of them are filled, but I think this would make it harder to distinguish from the linked list.
I'm planning to write up a pattern for this one - it should be pretty simple since the only components are the cups and the references.  But I'd love to see people knitting some other structures too, and maybe they'll be useful as teaching aids at some point?  The one drawback is this means I need to knit a *lot* of identical cups, I think the whole project will need about 40 of them.

Happy knitting,