//

“Is Crochet Turing Complete?”: Christina Burger with Runway (Video + Transcript)

April 11, 2024
VIDEO

Christina Burger (Runway Senior Software Engineer) shares her musings on the computational complexity of traditionally “female” crafts, how their intricacy is misunderstood and under appreciated, and whether the halting problem could also refer to problematic yarn-buying habits.


WATCH ON YOUTUBE

In this ELEVATE session, Christina Burger (Runway Senior Software Engineer) discusses the intersection of computer science and crochet. She explores the idea of representing a Turing machine as a crochet pattern and demonstrates her attempts at creating crochet symbols for the different states.

Like what you see here? Our mission-aligned Girl Geek X partners are hiring!

Christina Burger ELEVATE Crochet is Turing complete

Transcript of ELEVATE Session:

Christina Burger:

Thank you so much. What a wonderful intro. I guess that makes my next slide less relevant. I’ll just introduce myself quickly. I’m Christina. I not just love making software, I also enjoy all sorts of other things, including hanging out with my cats, who ignore me, and also, I have a art supply shopping problem, which has recently extended into a yarn buying problem.

I also recently made a zine with my good friend Erica, and I’ll tell you a little bit more about that at the end if we have time. All right, so this is where you find yourself at the intersection of computer science and old lady crafts. I really love this place that I find myself in. I love both of those things equally.

I’ve also often felt like I can … it’s hard to not see them as similar things because when you’re looking at something like crochet or knitting, it’s actually quite a technical endeavor.

I have lots of family members who always claim that they’re not technical or they’re not smart, but they’re able to make amazing, wonderful things from scratch, and so I think that there’s something to be said for respecting the technicality of certain crafts and hobbies.

To kick off this talk, let’s talk about what is crochet. I just recently learned crochet myself. Previously I had tried to learn knitting, and I found it a little bit overwhelming with all of the counting and dropping stitches and things like that. I tried crochet, and I really loved it.

I feel like it’s really soothing, if you have a very active brain at the end of the day, you can just do some crocheting to wind down. The history of crochet is very long, and there’s lots of different countries that claim that they invented crochet. It’s been around for a while. If you haven’t crocheted before, you use a hook like this, and yarn. And you’re just basically making fabric from yarn.

Crochet consists of a few stitches. You can go from different heights, so you have single crochet, which is the lowest stitch, and then it goes all the way up to a super high stitch, which is a quadruple treble crochet. These are US stitch names. I think the UK uses a slightly different system, but I learned how to crochet in Canada, so these are the ones that I use.

Crochet can be used to make really intricate, wonderful laces. It can also be used to make a little hat for your cat, so it’s very versatile, but learning crochet and learning crochet patterns, I felt like something about them was very familiar in that it almost felt like I was reading an algorithm, and I think that’s because it is an algorithm.

For the next part, we have to talk about the next part of this talk, which is what is Turing completeness. The first time I heard this concept was at university, and it was very foreign to me to understand why it matters. I’ll endeavor to explain that a little bit better.

To introduce the concept, Turing complete just means that a language or a thing can be used to make a Turing machine in theory, and so I guess what we need to talk about more is what is a Turing machine?

A Turing machine is a theoretical model of a computer, but before we had computers, and it’s very important to be able to think through something like a Turing machine because it explains to us how we could solve general problems with one machine, instead of making a new machine for each problem that we have to solve, which was the approach that we had before we had this way of thinking.

A Turing machine is a very theoretical thing – it’s not a physical thing. It was never built to prove that it could exist. I think people have built ones in modern times just to show that you can, but it’s more of a way of illustrating what a computer could be.

The parts of a Turing machine are very simple. It’s this tape that you see here, and it has symbols written on the tape, and you’re able to read and write onto that tape.

To illustrate a little bit more, because it can be a little bit hard to understand that just from a quick introduction, here is one algorithm that we will be stepping through in a Turing machine.

First of all, we’re going to start with 110, that’s the number, and our goal is to invert the number to 001.

You can see that for this machine, we have three symbols, a zero, a one, or an empty tape or an empty cell in the tape. We have the tape and we have the ability to read a symbol under the head, and so how this program works is we have 110, and we have this state table that tells us what to do in case of each symbol that we read.

If we read a zero, we’re going to invert it, so we’re going to write one, so write zero, write one. Then we’re going to move the tape to the right, and we’re going to do the same thing. We’re going to read one, and then we’re going to invert it and write zero; move the tape to the right, read one, write zero; move the tape to the right, and now we read an empty cell. That means we can stop. That’s pretty much how a Turing machine would solve this particular problem.

Right. I was thinking about this and how familiar it felt. And I thought, could you represent all of that as a crochet pattern?

It turns out you absolutely can, and it also turns out that it’s really fun to figure it out.

Before we go through the pattern that I ended up making, I will show you a few of my attempts. I tried to make various ways to represent the different symbols in crochet, and all of them turned out a bit wonky. One I tried to do with color, and I think you could totally do that with color. But I gave up after one row because I realized that it’s cheating, it’s not really thinking too much about crochet stitches and more about the colors. But yeah, you could definitely do that if you want.

Let’s go back to what we had before, the Turing machine that we were or the problem that we were solving with Turing machine in this previous slide. Now we’re going to solve it in crochet, and I did end up with a more acceptable crochet block.

All of you are welcome to use my pattern to make your own crocheted Turing machine.

So what is our algorithm here? To start with, we’re going to chain 15. Chain just means putting in the foundational stitches to start, so these ones at the bottom. We’re going from left to right. From row one, we’re going to add a few stitches for height, and then we’re going to chain one, and do a double crochet, chain one, do double crochet, all the way through. And that’s just to set up the tape.

These shaded areas of double crochet, these are just structural to keep the piece in a sort of grid. I shaded them so that you can ignore them and understand that only the ones that are not shaded are important for our tape. Okay.

In the second row, we are going to write or not, I guess, not write, we’re going to make a double crochet to represent a one, another double crochet to represent another one, and a picot, which is this little piece at the top, to represent a zero, because we need three states, we need to be able to also represent an empty cell, which is a chain.

So yes, we’ve done that. Then the crucial part is that we need a stitch marker, which looks like this, and that’s how you can mark a place within your work. You can mark, oh, I’m here, yeah? That’s going to be our head. In our crochet Turing machine, we’re going to not move a tape, but move a stitch marker. We are putting the stitch marker at the picot, and that’s going to be where we start. And then we’re going to go over to row number three.

For row number three, four, and five, we’re just going to follow the algorithm, which is this part here at the bottom. The algorithm goes, copy each stitch that you see from the previous row unless you’re at the marker. If you’re at the marker, if you see a picot, do a double crochet. If you see a double crochet, do a picot. And if you see nothing, then you’re done.

Let’s go through. To the next row. Copy, copy, copy, copy, to the marker. We see a picot. We’re going to do a double crochet. Copy the rest. Chain three to turn. Then we’re going to remember to move our stitch marker over two stitches to the right.

In the diagram, they’re all to the right, but if you were doing actually the crochet, you’d have to remember to move it to the left, because you turn your work every time you add a new row.

So yes, for row number four, we’re going to see that we have double crochet, so we’re going to do a picot, double crochet, double crochet. Move our stitch marker to the right. And then copy everything. Chain three to turn. Copy everything. Then we see a double crochet, so we do a picot, a picot, and double crochet. We’re just copying again from row four.

We know that we’re done because in theory we moved the stitch marker to the right and saw that it was empty, so we were done with the algorithm. And yeah, this pattern is available, I will share the link in the chat, if anyone wants to follow it. And just wanted to show a bit more visually, it can be really hard to see.

Also, I’m not the world’s best crocheter, but this is my final product. I’ve tried to highlight the different stitches and what they mean both in the diagram and in the finished product.

If you look at the colors, to represent the one and the zeros, that might also help for you to see that we started with a picot and two double crochets, and we ended with a double crochet and two picots.

That was a really quick run through both of Turing machines and crochet. I guess, my conclusion is that crochet is Turing complete, as long as you don’t think too hard about the fact that a person has to still do the crocheting.

There’s no such thing as a crocheting machine, we have knitting machines, but crochet is actually really complicated to automate. And so mostly it’s done by humans. I guess, in that way it’s not Turing complete because it’s not a machine at all.

It’s still a really interesting thing to think about, how we have algorithms in our day-to-day lives that we’re following, and how we can integrate computer science more into our granny-like crafts.

Yeah, so that is pretty much it. Just one final note, I wanted to share my zine. Oops, sorry. Wanted to share my zine here, which I made with my good friend Erica. It’s filled with really positive thoughts and fun puzzles, we have a crossword.

Follow the link in the slide here if you would like to buy one. Or if you have any questions, now is the time.

Like what you see here? Our mission-aligned Girl Geek X partners are hiring!

Share this