Anyone who has ever put up Christmas lights knows the problem: Holiday strands so carefully packed away last year are now more knotty than nice. In fact, they have become an inextricable, inexplicable, seemingly inevitable mess. It happens every year, like some sort of universal law of physics.

XMASKNOT  University of California San Diego researchers Doug Smith, 38, right,who is a professor of Physics at UCSD, and Dorian Raymer, 24, left, who is a Physics undergraduate, have developed a math formula that explains why things get knotted. CNS Photo by Sean DuFrene. 
Which, it turns out, it basically is. In October, two University of California San Diego researchers published the first physical explanation of why knots seem to form magically, not just in strands of Christmas lights, but in pretty much anything stringy, from garden hoses to iPod earbud cords to DNA.
Writing in the prestigious Proceedings of the National Academy of Sciences, Douglas Smith, an assistant professor of physics, and Dorian Raymer, a research assistant, reported on the results of thousands of experiments involving loose string in motion, ultimately developing a computer model that accurately predicts and describes realworld knots.
"Mathematicians long ago developed the math that describes knots in the abstract, all of their possible permutations and how they can be categorized," Smith said. "But for some reason, nobody had looked to see if there were equations that could describe how knots form  the actual physics."
The Oct. 16 paper  "Spontaneous Knotting of an Agitated String"  attracted immediate interest.
"We've had reporters call us from Sweden, Canada and Australia," Smith said.
The New York Times Sunday magazine cited their work as one of the top ideas of the year. Popular Science, Science News, New Scientist and Physics Today all wrote stories.
Smith and Raymer's work "was an elegantly simple attack on an interesting physics problem: Why does a string tangle when you shake it?" said Leo Kadanoff, a theoretical physicist at the University of Chicago who edited their paper for the journal. "Good and interesting physics is aimed at understanding in a deep way how the world works. It is most interesting when the problem is familiar and ubiquitous."
And knots, said Smith, "are something everybody knows something about."
But also something nobody can fully explain.
Not that they haven't been trying. Knots aren't new. Andrew Belmonte, a professor of mathematics at Pennsylvania State University, imagines CroMagnon humans grappling with the first primordial snarl. In time, knots became useful, employed to bind or secure animals, sails and hair. Ancient Incas knotted strings for record keeping and possibly communications.
There's even something called "knot theory," a mathematical branch of topology, which is the study of how things connect or interact with each other in space.
But knot theory is not real life. Its knots are abstractions, mathematical constructs developed to describe all possible permutations and categories. There is, for example, just one knot consisting of three crossings. It's called a trefoil, the simplest knot known. "Some people call it a granny knot," Smith said.
After the trefoil, though, things get more complicated. There's just one knot with four crossings, but three with six crossings. The more crossings in a knot, the more complex it becomes and the more numerous its variations. There are thousands of knots with 10 crossings.
Tightness or looseness doesn't matter. To a knot theorist or topologist, a knot is simply a closed loop tied up in a particular way in threedimensional space that cannot be changed without cutting or untying.
That definition probably works fine for theorists, who have been pondering the scientific nature of knots since at least 1867, when Lord Kelvin proposed that atoms might be knots of swirling vortices. The definition is less helpful if you have 300 feet of Christmas lights to untangle. At that point, it might be more useful to know how the lights got tangled in the first place.
"If there's a math of knots," Smith said, "there should also be a science of knots, something that explains why they form."
Knot theory
Smith and Raymer's investigation began as a matter of curiosity. In 2007, Raymer was an undergraduate and was interested in taking a math class. One day, he and a friend were scrutinizing the downloaded lecture notes of one possible course, discussing the meaning of knot theory.
Smith, a biophysicist who studies DNA packaging and runs a lab in which Raymer worked, overheard the conversation and suggested that, if Raymer wanted to learn more about knot theory, he ought to create the appropriate experiment.
"We're not mathematicians," Smith said. "We're physicists. Physicists do experiments."
The result was both simple and clever. With Smith providing outofpocket funding for raw materials from Home Depot and a few plastic milk crates from a local dairy, Raymer constructed a kind of knot probability machine that featured clear plastic boxes rotating like clothes dryer drums inside the milk crates. The speed and number of rotations were controlled by special motors; the resulting data were fed into an attached computer.
The experiment involved placing a single length of floppy string into a plastic box, sealing it, then rotating the box at a set speed for a brief time. The researchers did this 3,415 times, sometimes changing variables such as box size and string length.
In the interest of full scientific disclosure, the primary plastic box used was 0.30 by 0.30 by 0.30 meters and rotated at one revolution per second for 10 seconds. The string chosen had a diameter of 3.2 millimeters, a density of 0.04 g/cm and a flexural rigidity of 3.1 X 10(to the fourth power) dynescm(squared).
In other words, the string had the diameter of a computermouse cord and the stiffness of halfcooked spaghetti.
"Obviously, you can't do this experiment with anything too rigid," Smith said. "Then it wouldn't be string; it would be a rod."
But why do the experiment 3,415 times? Why not less? Or more?
"The scientific answer is that 3,415 was around the point where we had statistically compelling results," Smith said. "The human answer is that 3,415 times was about as much as we could stand."
Despite the short agitation period, Raymer and Smith discovered that knots formed about half the time, usually within the first few seconds. Creating tangles was the easy part. Much more difficult was finding a way to mathematically differentiate them, to describe them physically as more than mere jumbles.
"That's something you can't really do just by looking at them," Raymer said.
So Raymer developed a computer program to help. He laid each tangled knot of string on a flat black surface, smoothing out the loops and crossings. Then he took a digital picture. Using his program, he traced the knot's image with a cursor, classifying each crossing, whether it went over or under, to the left or to the right. The computer crunched the data and determined the knot's "Jones polynomial," an invariant quality of the knot that is, in effect, its topological fingerprint.
The researchers discovered that the likelihood of a knot forming depended upon a few key factors. First, a minimum length was required. In Smith's and Raymer's work, that turned out to be 18.124 inches.
Second, there had to be sufficient movement.
"If too much string was packed in a box," said Smith, "there usually wasn't enough space left for the ends to weave and become tangled."
Remarkably, the experiment produced all possible types of knots with up to seven crossings and some knots with up to 11 crossings. The finding reinforced a fundamental and profoundly unsettling quality about knots: They basically tie themselves.
"Knots are generated by the combination of a long string with some sort of random motion," wrote Belmonte in an admiring journal commentary that followed Smith's and Raymer's paper. "This is a sort of derivative law of nature stemming from the Second Law of Thermodynamics," which broadly states that things naturally tend toward disorder over time.
In the case of knots, said Belmonte, that means "long things get tangled."
NOT FOR NAUGHT
Based on their work, Smith and Raymer developed a simple model to explain knot formation. String makes loops in concentric coils like a garden hose because of its stiffness and confinement in a box. The moving ends of the string weave randomly through the coils, with a 50 percent probability of going over or under any coil. Computer simulations using this formula produced knots similar to those observed in the experiments.
This probably doesn't help much as you grapple with your Christmas lights, but Smith and Raymer's work might eventually lead to practical applications. If scientists better understand the principles of knot formation, they may find ways to prevent knotting with negative consequences, such as tangled umbilical cords, a phenomenon that affects 1 percent of the population at birth.
More deeply, they might pull apart some of the deeper mysteries of DNA. For example, inside each nucleated cell of your body is a whopping 6 feet of tightly packed, doublestranded DNA. In order to fit into such tight quarters, the DNA microscopically folds back and loops around itself. Sometimes it gets tangled, and that can be problematic when the cell tries to divide, separating its DNA into two distinct strands.
Cells solve the problem by using enzymes to snip snarls and stitch the ends back together.
"It'd be nice if we had similar enzymes that we could sprinkle on garden hoses," said Smith, wistfully. Or jumbled Christmas lights.
It might happen someday. Or knot.