I was out walking today. The total time I was out was about an hour and a half, maybe a little bit more. I didn’t actually get that much walking done (although, I walked enough), because I stopped several times to make notes on a problem I’ve been thinking about lately.

Its of the mathematical kind. Its nothing important and someone who does this more regularly would probably come up with a solution pretty quickly, but I still haven’t found one that satisfies me.

What’s the problem? Its actually Magic: the Gathering related. There’s a card called [scryfall]Duskwatch Recruiter[/scryfall] which allows you to take a look at the top three cards of your deck and then put them into the bottom of your deck in any order. It does more than that, but for this purpose, this is the key part. Now, assuming we can use that ability as many times as we want to, is it possible to stack your deck in any order you choose?

Intuitively it feels to me like its possible, as long as the size of the deck isn’t divisible by three (in which case you can’t change the order beyond the three card groups), but its hard to come up with an algorithm when you are so limited in what you can do. The only place you can twiddle with it, is the order of the three cards you are looking at.

Anyhow, none of this actually matters. What I want to talk about is why I like problems like this. I don’t actually know. I do like to challenge myself intellectually and this is just one more problem to ponder. I actually don’t even manage to solve most problems I wrestle with, but that’s how I know they are challenging enough.

Now, these days there are plenty of people who identify as nerds, because they do some outwardly nerdy things, like play video games or watch “nerdy” movies. To me, being a nerd has never been about that. To me being a nerd has always been about accepting that I’m not going to fit into many social circles, because I enjoy stuff like this and I’m not going to hide it. Sure, talking about something like this gets me eyerolling or laughs from many people, but they will never understand the beauty of math or how satisfying it is to solve any of the 500+ problems on Project Euler, because they lack the discipline to do it.

The thing is that even if the problem I’m working on right now might not be important, you never know. People like me (actually people who are a lot better mathematicians than myself) actually do this because they enjoy it, but even if they don’t have immediate practical goals, you never know.

GH Hardy is a mathematician, who wrote an essay titled *A Mathematician’s Apology* in 1940. His objective was to show how important pure mathematics can be, even if you never discover anything practical. For example:

War isn’t exactly important (necessary evil, perhaps, but not important), but in 1940, it was kind of something on most people’s minds in the Great Britain and just in a few years both of the example became moot. Number theory was used to break German codes and theory of relativity was used to build the first nuclear weapons. Today number theory is the basis of all security measures on the web and theory of relativity doesn’t only produce a significant portion of all the energy used (and should be used more), but is also a key component in communication technology (as satellites in the orbit are experiencing time just a tad differently, but differently enough to make syncing impossible without taking relativity into account).

My nerdiness might seem (and obviously is) insignificant, but people like me are doing similar work, which might not pay off any time soon, but you never know. Nerds are the builders of the world of tomorrow. Maybe I should use that as a definition for the word in the future.

Partial solution to the problem:

Lemma 1: It is sufficient to be able to move an arbitrary card to whichever position without affecting the order of the rest of the cards.

Lemma 2: If your card is at place n, you can switch it and the card at n+1 or the card at n-1. The rest of the cards do not move in the process.

Combine those two and you probably have a proof. I did not think this through very carefully, though.

The resulting algorithm will be terribly ineffective, though.

Being effifient isn’t actually the key here. This is actually a judging problem (which I didn’t mention in the text) and more of a philosophical one. The real problem is in a tournament setting you can “shortcut” an infinite combo, if you can prove that you can reach a certain state by repeating a set of actions, but you need to be able to prove it in a way that your opponent is satisfied with the proof. Since math is hard even for many MtG players, the simpler the proof, the better.

I think your approach is good. I’ll put some thought into it, when I have the chance.