The first time I went to visit a pair of former artillery sheds on the outskirts of Marfa, Texas, the sun was high in the sky and I knew very little about what I was about to see. The second time, the sun was setting and I knew a bit more, and everything was completely different.

The contents of the sheds are officially known as 100 Untitled Works in Mill Aluminum (1982-1986) by Donald Judd. There are about 60 works in one shed and about 40 in the other. Each one is a box measuring 41 by 51 by 72 inches, and no two boxes are exactly alike. (Bear with me here: I’m about to make one of the most captivating pieces of art I’ve ever seen sound as dry as a tax return.) The boxes have open sides or half-open sides; their sides extend all the way to the corners or are offset by four inches; they are empty or contain internal dividers. The dividers are vertical or horizontal or lateral; they are perpendicular or diagonal; they are single or double; they divide the whole box or half the box; they extend all the way to the corners or are offset by four inches. That’s it; no other variations are allowed. But just as there are, we are told, 221,184 ways to order a Whopper, this still gives an enormous number of possible boxes.

When I first saw them, I assumed that Judd must have begun by generating every single viable permutation and then picked 100 to put on show after the fact. Perhaps, I thought, he chose at random, or had many more than 100 boxes fabricated, editing them down once he’d seen which ones looked best. That’s how I would have done it. It would be far too tedious to design the boxes one by one, because you’d have to remember all the configurations you’d already used in order to avoid repeating yourself: even if you employed some sort of special notation, the task would be maddening enough by the 50th box, let alone the 90th.

But another reason for my assumption might have been the time of day. The even and indirect light of a Texas morning through the sheds’ tall windows gave the boxes a quality that you wouldn’t call inert, but that you could very well call implacable, chilly, unwavering. For all their beauty, it was easy to believe that they had been spat out by some sort of algorithm.

When I went back late the following afternoon, there was nothing cold about them any more. The sunset was doing extraordinary things. Some boxes filled up with bronze, some filled up with shadow. Some turned into mirrors, lenses, fishtanks. For almost an hour, wandering among them, I had the sense of qualities such as solidity, opacity and reflectivity moving back and forth between them like assets between bank accounts. And because I’d spent a few minutes in the gift shop flipping through Marianne Stockebrand’s hefty book Chinati: The Vision of Donald Judd (2010), I now knew that Judd did indeed design the boxes one by one, or at least in smallish groups, over a period of several years. There was never a master list.

To the question of how he could grind out 100 different configurations without inadvertently repeating himself or going out of his mind, there are two answers. The first is that, on the evidence of his sketches, he actually did repeat himself a few times, but managed to catch the duplicates before the blueprints were sent off to Lippincott, Inc., a specialist art fabrication company in Connecticut. The second is that Judd was a professional Minimalist (even if he would not have used that term). Variations and iterations were his whole method. Keeping these boxes straight wouldn’t have been as trying for him as it would be for you or me. He loved every one of his children.

My second visit to 100 Untitled Works in Mill Aluminum gave me that rarest of experiences, a genuine epiphany with a work of art. The boxes had bloomed and deepened before my eyes. I went from complete indifference about Judd to real fascination. So why was I so disappointed by what I’d learned?

There is one field in which people routinely do use the approach that Judd didn’t, and that’s cryptography. A ‘brute-force attack’ means guessing a password or encryption key by methodically trying out every possible combination of letters and numbers until you find one that works. Quite a few of Judd’s contemporaries in the art world were experimenting with brute-force attacks of various kinds, but it is probably the Italian artist Alighiero e Boetti whose work best endures prose summary.

For his project Untitled (Victoria Boogie Woogie) (1972), Boetti chose seven different postage stamps that added up to 200 lira, the cost of posting a letter in mainland Italy at the time. He bought 5,040 of each of these stamps and stuck them in all 5,040 possible combinations to 5,040 envelopes addressed to his own house in Turin. Over the next two years, he mailed them from various places, finally exhibiting them in 42 framed groups of 120 postmarked envelopes each. (If my rough calculations are correct, the stamps alone would have cost him about £5,000 in today’s money.)

The first difference between Boetti’s Untitled and Judd’s 100 Untitled Works is that Boetti let his permutations keep running until, like an overstimulated toddler, they had thoroughly exhausted themselves. Having concocted the rules of the exercise, he made no further choices: there was no preemption and no selection. The second difference is that all of Boetti’s envelopes are equal. No ordering of the stamps is any more attractive than any other. From Judd’s 100, on the other hand, certain stars are born. Some boxes look the same at sunset as they do at noon, but others foster optical illusions of various kinds. It could be that Judd was able to predict in advance which configurations would have this property. But it seems more likely to me that the sheer multiplicity of the boxes allowed him to stumble on it by chance.

even people who read the Bible cover to cover in prison don’t trudge through all the begetting

There are at least a few brute-force attacks in other forms of art. We find them, for instance, in the concrete poetry of Brion Gysin, a close friend of William Burroughs. Gysin’s 120-line poem ‘I AM THAT I AM’ (1960) simply cycles through the 120 different orders into which those five words can be scrambled. With the help of an English mathematician called Ian Sommerville, Gysin used an early computer program to generate his permutations. When the poem was broadcast on BBC radio in 1961, it supposedly got the second-lowest audience ratings of any programme to date. What was the point of it? Partly it’s the hypnotic effect on the eye or the ear, but its main appeal is surely that among the gibberish – ‘I I THAT AM AM’, ‘AM I AM THAT I’ – there are a few quasi-meaningful pronouncements – ‘I THAT AM I AM’, ‘AM I I THAT AM’– produced without any human intervention whatsoever (just as a few of Judd’s boxes happen to do clever things with the light, but most don’t).

The single most enduring monument to the brute-force attack in literature is Samuel Beckett’s novel Watt (1953). Here, to give an impression of the technique, is the first time it comes up:

Now these voices, sometimes they sang only, and sometimes they cried only, and sometimes they stated only, and sometimes they murmured only, and sometimes they sang and cried, and sometimes they sang and stated, and sometimes they sang and murmured, and sometimes they cried and stated, and sometimes they cried and murmured, and sometimes they stated and murmured, and sometimes they sang and cried and stated, and sometimes they sang and cried and murmured and sometimes they cried and stated and murmured, and sometimes they sang and cried and stated and murmured, all together, at the same time, as now, to mention only these four kinds of voices, for there were others.

The novel contains 36 more passages like that, many of them longer, a few of them up to three or four pages.

Beckett wrote Watt when he was hiding from the Gestapo in the south of France. Obviously, unlike Gysin, he did not have a computer to help him. ‘One imagines that in some situations in the years 1942-44 it took longer to become fatigued or disgusted with such things,’ suggests the American critic Dr John J Mood in a 1971 essay on the novel. ‘One also imagines that all sorts of people had all sorts of little semi-compulsive games with which to occupy themselves at that time. Indeed, in some situations at that time such compulsions were probably necessary if one were to survive with any sanity.’

In other words, because Beckett was bored for three years, readers would be bored for generations to come. That’s how a harsh critic might put it – not me! I quite like Beckett – but there cannot be many who so much as flick their eyes across every line of his three-page combinatorial extravaganzas; even people who read the Bible cover to cover in prison don’t trudge through all the begetting. The sheer weight of them is enough to make the point.

Now, did you notice that something was amiss with the passage from Watt quoted above? Of course you did. This particular brute-force attack should contain 15 permutations but only has 14, and the one it so brazenly omits is ‘sang and stated and murmured’. Dr Mood takes on the heroic task of analysing every single one of these 37 passages and discovers a total of 22 such errors. He argues that all of those errors were deliberate, since the novel is so much about incompetence and faultiness, and for the purposes of this essay I’m going to assume that Dr Mood is correct.

So in one respect Beckett is closer to Judd than he is to Boetti or Gysin, because he meddles with his outcomes. But in another respect he’s closer to Boetti than he is or Gysin or Judd, because his brute-force attacks aren’t intended to generate spectacle or meaning by accident – none of the dozens of permutations in a three-page litany stands out from any other.

In his own essay on Watt in 1992, the French philosopher Gilles Deleuze wrote:

The combinatorial is the art or science of exhausting the possible, through inclusive disjunctions. But only the exhausted can exhaust the possible, because he has renounced all need, preference, goal or signification. Only the exhausted is sufficiently disinterested, sufficiently scrupulous. Indeed, he is obliged to replace projects with tables and programs denuded of sense.

Disinterested. Scrupulous. Deleuze seems to be imagining the creator as a sort of ideal bureaucrat or scrivener. This is just right for Boetti, who voluntarily turned himself into a mailroom clerk. In his essay ‘Paragraphs on Conceptual Art’ (1967), the American artist Sol LeWitt describes a similar demotion:

When an artist uses a conceptual form of art, it means that all of the planning and decisions are made beforehand and the execution is a perfunctory affair. The idea becomes a machine that makes the art… [T]he fewer decisions made in the course of completing the work, the better. This eliminates the arbitrary, the capricious, and the subjective as much as possible.

If Deleuze was right about the aims of Watt, then Beckett, shivering in his farmhouse, beat the New York conceptualists to this idea by 20 years – although it’s also possible that Deleuze, writing in the 1990s, was looking at the ’40s through the lens of the ’60s. Either way, what we seem to be talking about here is liberation from ego. And indeed, the connection with Zen Buddhism is explicit in the music of John Cage, who knew LeWitt and had friends in common with Beckett. Cage, after all, attributed his aleatoric compositional methods to the revelations he’d had at the feet of the Zen teacher D T Suzuki.

We might even extend this circle to include David Foster Wallace. The IRS accountants in his posthumous novel The Pale King (2011) seem very much like the contented, almost angelic bureaucrats that Deleuze evoked and Boetti imitated. ‘Bliss,’ Wallace wrote, ‘a second-by-second joy and gratitude at the gift of being alive, conscious – lies on the other side of crushing, crushing boredom. Pay close attention to the most tedious thing you can find (Tax Returns, Televised Golf) and, in waves, a boredom like you’ve never known will wash over you and just about kill you. Ride these out, and it’s like stepping from black and white into color. Like water after days in the desert. Instant bliss in every atom.’

Why was it so disappointing to learn that Judd’s method did not, in fact, ‘eliminate the arbitrary, the capricious, and the subjective’? We now have a draft of an answer. The brute-force attack reveals itself as a kind of grace, and any second-guessing becomes a fall from it. If you just let the permutations permute, they envelop you in a wholeness, a blankness, an infinite unselfconsciousness that shatters the moment you try to impose your contingent preferences. Perhaps this was why Beckett couldn’t allow those passages to roll on faultlessly. As Dr Mood observes, everything in his work has cracks.

Let’s go back to the original meaning of the brute-force attack. For some modes of encryption, brute force is no longer effective. Bank transactions, for instance, now tend to use either 128- or 256-bit encryption, which means the key can be expressed as that number of 1s and 0s. According to one estimate, if you tried to use an existing supercomputer to guess a 128-bit key by trial and error, it would take about 150 trillion years. And even if you invented the fastest conceivable supercomputer, the laws of thermodynamics still dictate that, in the words of the American security analyst Bruce Schneier, ‘brute-force attacks against 256-bit keys will be infeasible until computers are built from something other than matter and occupy something other than space’.

The same does not apply to the passwords that human beings come up with themselves. If your password isn’t unusually long, any laptop with the right off-the-shelf upgrades could crack it in days or hours. In practice, though, attacks on passwords are not naive brute-force attacks. Because of security breaches at various websites, today’s hackers have access to lists of millions of passwords that real people have used in the past. They combine these with text from dictionaries, Wikipedia and the Bible to give their software a head start, on the basis that ‘123456’, ‘qwerty’ and ‘jesuswept’ are a lot more common than ‘$o61e^60hY’. Like Judd, they decide in advance which permutations are likely to be most effective.

There is, however, one field in which brute-force attacks are still the state of the art, and that’s cryptocurrencies. Bitcoin has fallen a long way from its December peak, both in terms of its value and its reputation. But though you might be forgiven for shelving it next to Swatch’s Internet Time in your mental archive of online fads, its volume of transactions remains impressive: Bitcoin moves about $35 million dollars in payments every day. Meanwhile, new cryptocurrencies are being released into the wild on a regular basis, from the robust Mastercoin to the preposterous Coinye to the preposterous and surprisingly robust Dogecoin. Most of these are premised on a similar ‘mining’ idea. Since not a single one of the zillion trend pieces you’ve already read about Bitcoin will have contained a satisfactory account of what this is, there now follows an attempt at an explanation of cryptocurrency mining by someone who doesn’t really understand it either.

there are legions of greedy mathematicians working on the problem as we speak: this might be our era’s equivalent of the quest for a perpetual motion machine

When new ‘coins’ are introduced into circulation, they are allocated to whomever has been helping to maintain the ‘block chain’, the public ledger of every transaction ever made with the currency. Maintaining the block chain involves generating new ‘hashes’, or encrypted records of the transactions. This ought to be easy enough, except that in this case the process is specifically designed to be laborious. It takes a tremendous amount of donkeywork to generate a single valid hash, which is what prevents new coins from being minted too quickly. At the time of writing, the total computing power being devoted to the mining of bitcoins alone is about 350 exaFLOPS (for floating-point operations per second) of, to quote Deleuze again, ‘tables and programs denuded of sense’, or 1,400 times the power of the top 500 supercomputers in the world combined. Mining of this kind is an unadulterated brute-force attack: it involves trying number after number after number after number after number until you find a hash that works.

Bitcoins are still valuable enough that anyone who could discreetly find a shortcut around this process would get very rich. As a result, you can be certain that there are legions of greedy mathematicians working on the problem as we speak. But this might be our era’s equivalent of the quest for a perpetual motion machine. According to the disinterested researchers who have made their findings public, the notion of circumventing the brute-force attack to mine cryptocurrency is nothing but a fantasy. It will never fall from grace.

And it seems to me that the Bitcoin network meets LeWitt’s description of conceptual art. If nothing else, it conforms to his edict that ‘the basic unit’ of the work ‘be deliberately uninteresting so that it may more easily become an intrinsic part of the entire work’. Boetti’s absurdist bureaucrat has been downsized: a computer is capable of accomplishing nothing whatsoever in far less time. ‘Art is noble through being useless,’ wrote the French-born historian of ideas Jacques Barzun, and in the perversity of these easy calculations made deliberately hard we recognise a festival of uselessness. One might object that cryptocurrency mining isn’t useless because, if all goes well, it makes money for the person who does it. But then, so does art.

If you’re a brute-force attacker in the software field, you’re not hoping to stumble across anything interesting on your way to the solution. There will be no ‘I THAT AM I AM’ glittering in the dust. But that’s only because you don’t know which permutations to look for. Any sufficiently large corpus of random data will contain reams of occult knowledge, just like Jorge Luis Borges’s Library of Babel. A Bitcoin mining program will generate the exact time and GPS co-ordinates of your death. A password cracking program will generate a password of the form ‘iloveyou[first name][last name]’, where [first name] [last name] is the husband or wife you haven’t met yet. These things will happen many times every second.

Before his story ‘The Library of Babel’ (1941), Borges wrote an essay on the same subject called ‘The Total Library’ (1939), in which he explicitly connects the fecundity of randomness to the creation of the universe. He quotes Cicero’s On the Nature of the Gods:

I do not marvel that there should be anyone who can persuade himself that certain solid and individual bodies are pulled along by the force of gravity, and that the fortuitous collision of those particles produces this beautiful world that we see. He who considers this possible will also be able to believe that if innumerable characters of gold, each representing one of the 21 letters of the alphabet, were thrown together onto the ground, they might produce the Annals of Ennius. I doubt whether chance could possibly create even a single verse to read.

Cicero was wrong, of course. If you asked a computer to throw the letters of the alphabet ‘on the ground’ enough times, it would indeed produce the Annals of Ennius, although it would take even longer than cracking a 256-bit key (and anyway, we wouldn’t know when it had succeeded, because the Annals of Ennius have not survived).

Moreover, most of us now believe that ‘this beautiful world that we see’ really was produced by the fortuitous collision of particles. First of all, matter from the solar nebula had to clump together to create a habitable world. Second, a dribble of that matter had to organise itself into self-replicating molecules. Third, these self-replicating molecules had to mutate into human beings, because we are not books from the Library of Babel, but rather, in the American philosopher Daniel Dennett’s phrase, books from the Library of Mendel. Our current conception of our own origins resembles one of those puzzles where you have to keep shaking and tilting until all the ball bearings roll into the little holes, except that inside every one of those ball bearings is another, smaller puzzle which you have to solve at the same time. The universe took nearly 14 billion years to get all the balls in the holes, and we are very lucky it happened at all. Oh, and on top of all that, Mum and Dad had to meet and perhaps fall in love.

The zen of permutation still holds, but we must also make room for a second reason why the work of Judd, Beckett, Boetti and all their diligent colleagues can be so entrancing. We recognise in the brute-force attack the improbable story of our own birth. The 100 Untitled Works in Mill Aluminum are, therefore, cheats, unless your favoured account of our origins involves a few nudges and whittlings on the Creator’s part. In that case, you might prefer Judd’s method to LeWitt’s total ban on caprice and subjectivity. Either way, the boxes are the product of a small selection of rather mundane ingredients combined in a variety of ways, and from these combinations come wonders that could not possibly have been predicted from the ingredients alone. So we lose ourselves in permutations because we are permutations too. As the sun sets over Marfa, we see our own reflections in the box’s glossy sides and think: ‘I am that – I am.’