Sometimes a new scientific idea can be like the punch line of a very long joke: You need to keep the whole setup in mind to appreciate the humor, but it's worth the effort.

There's a fledgling idea I'm working on with physicist Lee Smolin that requires quite a setup, but it's worth it. The idea is that the flow of time comes from the way that mathematics is never complete and always gets weirder the more you understand it. That sentence should not make sense yet, but it will by the end of this column.

The first part of the setup is to recap some recent physics history. Only two theories from the 20th century have matched the results of experiments so well that they seem perfect, at least thus far. These are quantum field theory and general relativity. The annoying catch is that the two great theories conflict with each other at the margins, so they can't both be completely correct.

The obvious next step would be to craft a new theory that combines the successes of quantum field theory and general relativity but avoids the conflicts between them. Einstein and many others have searched for a theory like this. Currently, the most popular candidate is M-theory, a set of concepts derived from string theory. The second most popular is loop quantum gravity. The two theories differ in many ways, but a fundamental one is philosophical: Loop quantum gravity is more "relational" than M-theory.

A theory is relational if it's defined by the relationships among its elements rather than by how the elements fit over a background of some kind. Relativity falls into this category. An extreme object like a black hole affects not just other objects but also time and space. If you can't count on time and space to stay put, you can't describe anything according to a master framework. Relativistic objects can be described only in terms of their relationships to each other.

Quantum field theory, on the other hand, is defined on top of a master framework, which you can imagine as graph paper, and it is superb at describing many things. For instance, in order to understand particles interacting with each other in a quantum computer, you can pretend that they are located on graph paper and safely ignore gravity and other grand-scale relativistic phenomena.

M-theory starts out from quantum field theory and tries to take in general relativity. In order to do that, it doesn't quite get rid of the graph paper, but it does have to propose fabulously complicated kinds of graph paper with curled-up hidden dimensions.

Loop quantum gravity moves in the opposite direction. It starts from general relativity and attempts to incorporate quantum field theory within a relational approach. That's a more radical idea than it sounds. In this scheme, the very essence of time and space must emerge from the relationships among multitudes of elements.

Here's a metaphor to illustrate that idea. Imagine you find yourself on a raft in the middle of an ocean on an alien planet. This planet is covered in clouds, has no magnetic field, and has a lot of suns, so it's always daytime. In short, there aren't any navigational tools.

At some point, you encounter other people floating on rafts. You tie your rafts loosely together or perhaps set up planks between them. Gradually you come upon more people drifting on rafts, and they also become attached to the group.

In the beginning, there are very few rafts, and if you want to give someone directions to get to a particular raft, you might tell them to travel over a specific sequence of intermediate rafts that have names. That would be like specifying a path to a Web page; the rafts could be understood as a network.

If the collection of rafts becomes very large, though—perhaps in the millions—the network model would no longer make sense. Instead, directions would start to sound like this: "Travel 20,000 raft-lengths toward that big mast that we use for a landmark and then turn right for 10,000 raft-lengths." Having all those rafts crammed together forces them into a persistent structure. Not only can you count on landmarks, but you can start to use geometry to describe where you are and where you want to go.

In this example, imaginary graph paper emerges out of a network of elements. Is there some analogous starting element that could act like the rafts in order to create space and time?

Yes, there is! There is a mathematical model, called a spin network, in which elements are linked together like the rafts so that a geometric framework can emerge. Loop quantum gravity theorists are studying how this happens. It turns out that you can form knots out of interconnected mathematical components, and these knots can describe elementary particles like quarks. That's how you can start with relativity and arrive at quantum field theory.

In general relativity, time is treated as a dimension, so if space can emerge, then time can too. You should be disturbed at this point. How can time "emerge"? Wouldn't it have to emerge within time? Would there have to be some kind of preexisting meta-time? Please put these alarms on hold for a moment.

Meanwhile, let's look at how math got even weirder than physics in the last century. A hundred years ago, physicists routinely turned to math for elegance and clarity and then aligned it with the messiness of reality as best they could. The great mathematician Bernhard Riemann led the charge to complete a description of mathematics that would reveal its crystalline purity. But oh, how rude anarchic math turned out to be.

A long line of 20th-century mathematicians, including Kurt Gödel, Alan Turing, and Gregory Chaitin, proved that the more math you learn, the more bizarre it gets. We're used to casually naming numbers like three or pi. Unfortunately, almost all the quantities in between such familiar numbers can't be named or described, because it would take an unbounded amount of effort just to refer to them. This overwhelming emptiness of numbers is related to even weirder results in the field of metamathematics, the math behind mathematical truths.

We now know that mathematical truths cannot fall into predictable patterns and that perfect mathematical systems (ones that are complete and without contradictions) are impossible. We see regularity in the physical universe. Photons arriving from fabulously distant and ancient regions of the universe are fundamentally the same as the photons your eyes perceive as you read this page. Mathematical truths are different. Once you have proved one theorem, you have no indication of what the next one will be like or how hard it will be to find. Mathematical ideas are less regular than reality!

For the third part of the setup, let's consider how physics and math are connected. This is one of the most mysterious aspects of reality. Is math like a disciplinarian, forcing reality to obey laws? Or is it only an approximation we use to talk about reality? When we thought reality was messier than math, it was easy to think of math as a convenient approximation of reality. Now that math is looking messier than reality, I'm not so sure.

What ultimately matters is whether a mathematical theory is useful. To the limit of our ability to perform experiments, it appears that math and reality correlate perfectly. When a mathematical object describes something in nature well, the math can be counted on to predict other things about nature. For instance, the possibility of negative signs in a mathematical model created by physicist Paul Dirac predicted the existence of antimatter—and the astonishing stuff turned out truly to exist.

So how do physics and math fit together at the deepest level of reality? Suppose mathematical truth had the crystalline, predictable quality that was once expected of it. If time were to emerge from the relationships among the elements of this impossible kind of math, there would be a problem. All the moments emerging from such a regular structure would be essentially the same. How, then, could there be an arrow of time if each moment was no more different from another moment than one photon is from another photon?

Ah, but we now have a different picture of what math is like. Math is the messiest thing there is. So a pattern emerging from connections among mathematical objects can reflect the spreading and deepening weirdness inherent in the exploration of math outward from any starting point. Furthermore, because of the incompleteness inherent in the global structure of math, there is no way to correlate physics with math except by picking a particular starting point. The continent emerging from the rafts would take on bizarre and unpredictable geometric structures as it grew, creating landmarks rooted in math's never-ending strangeness.

The universe—or God, if you like—can be thought of as a mathematician revealing ever more of the fundamentally unpredictable structure of math, thereby giving rise to cosmically surprising patterns of rafts, or frameworks for geometric reality. This process could be what allows time to emerge.

It is such an odd concept that I'll try saying it a slightly different way. Suppose the universe correlates with some patch of math. That patch cannot be complete and will inevitably bleed into additional math that is even stranger than the starting patch. If a correlation existed before, it ought to continue with new weird stuff. So, inherent in any reality correlated to math, there is an unstoppable passage into ever-increasing levels of weirdness. That suggests reality can be dynamic even without a dimension of time, which means there's something dynamic within which time can emerge.

These are hard ideas, and we struggle with them, but this line of thinking is at least a start at imagining one way that time itself could have an environment within which to evolve.