← Back to context

Comment by jagrsw

3 days ago

If we wanted to model the universe as a set of equations or a cellular automaton, how complex would that program be?

Could a competent software engineer, even without knowing the fundamental origins of things like particle masses or the fine-structure constant, capture all known fundamental interactions in code?

I guess I'm trying to figure out the complexity of the task of universe creation, assuming the necessary computational power exists. For example, could it be a computer science high school project for the folks in the parent universe (simulation hypothesis). I know that's a tough question :)

I'm surprised that more sibling comments aren't covering the lack of a unified theory here. Currently, our best understanding of gravity (general relativity) and our best understanding of everything else (electromagnetism, quantum mechanics, strong/weak force via the standard model) aren't consistent. They have assumptions and conclusions that contradict each other. It is very difficult to investigate these contradictions closely because the interesting parts of GR show up only in very massive objects (stars, black holes) and the interesting parts of everything else show up in the tiniest things (subatomic particles, photons).

So we don't have a set of equations that we could expect to model the whole universe in any meaningful way.

Our present best guess is that cellular automatons would be an explosively difficult way to simulate the universe because BQP (the class of problems that can be related to simulating a quantum system for polynomial time) is probably not contained in P (the class of problems Turing machines can solve in polynomial time).

The formulas are really not very complex. The Standard Model is a single Lagrangian with a couple of dozen constants.

https://visit.cern/node/612

You can expand that Lagrangian out to look more complex, but that's just a matter of notation rather than a real illustration of its complexity. There's no need to treat all of the quarks as different terms when you can compress them into a single matrix.

General relativity adds one more equation, in a matrix notation.

And that's almost everything. That's the whole model of the universe. It just so happens that there are a few domains where the two parts cause conflicts, but they occur only under insanely extreme circumstances (points within black holes, the universe at less than 10^-43 seconds, etc.)

These all rely on real numbers, so there's no computational complexity to talk about. Anything you represent in a computer is an approximation.

It's conceivable that there is some version out there that doesn't rely on real numbers, and could be computed with integers in a Turing machine. It need not have high computational complexity; there's no need for it to be anything other than linear. But it would be linear in an insane number of terms, and computationally intractable.

  • >The Standard Model is a single Lagrangian with a couple of dozen constants.

    I hear it's a bit more complex than that!

    https://www.sciencealert.com/this-is-what-the-standard-model...

    • Nah it really is simpler than that, that picture has exploded the summations to make it look complicated. Although it is strangely hard to find the compressed version written down anywhere...

      the thing about Lagrangians is that they compose systems by adding terms together: L_AB = L_A + L_B if A and B don't interact. Each field acts like an independent system, plus some interaction terms if the fields interact. So most of the time, e.g. on Wikipedia[0], people write down the terms in little groups. But still, note on the Wikipedia page that there are not that many terms in the Lagrangian section, due to the internal summations.

      [0]: https://en.wikipedia.org/wiki/Mathematical_formulation_of_th...

  • I can't help but wonder if, under extreme conditions, the universe has some sort of naturally occurring floating-point error conditions, where precision is naturally eroded and weird things can occur.

    • That would occur if a naked singularity could exist. If black holes have a singularity then you could remove the event horizon. In general relativity, the mathematical condition for the existence of a black hole with an event horizon is simple. It is given by the following inequality: M^2 > (J/M)^2 + Q^2, where M is the mass of the black hole, J is its angular momentum and Q is its charge.

      Getting rid of the event horizon is simply a question of increasing the angular momentum and/or charge of this object until the inequality is reversed. When that happens the event horizon disappears and the exotic object beneath emerges.

    • I doubt it. Even the simplest physical system requires a truly insane number of basic operations. Practically everything is integrals-over-infinity. If there were implemented in a floating-point system, you'd need umpteen gazillion bits to avoid flagrant errors from happening all the time.

      It's not impossible that the universe is somehow implemented in an "umpteen gazillion bits, but not more" system, but it strikes me as a lot more likely that it really is just a real-number calculation.

      1 reply →

    • That could very well be what the quantum uncertainty principal is, floating point non deterministic errors. It also could just be drawing comparisons among different problem domains.

      1 reply →

You (sorta) can! https://en.wikipedia.org/wiki/Lattice_QCD

The trick is (as the sibling comments explain) that it involves an exponential number of calculations, so it's extremely slow unless you are interested only in very small systems.

Going more technical, the problem with systems with the strong force is that they are too difficult to calculate, so the only method to get results is to add a fake lattice and try solving the system there. It works better than expected and it includes all the forces we know, well except gravity , and it includes the fake grid. So it's only an approximation.

> Could a competent software engineer, even without knowing the fundamental origins of things like particle masses or the fine-structure constant, capture all known fundamental interactions in code?

Nobody know where that numbers come from, so they are just like 20 or 30 numbers in the header of the file. There is some research to try to reduce the number, but I nobody knows if it's possible.

Stephen Wolfram has been taking a stab at it. Researching fundamental physics via computational exploration is how I'd put it. https://www.wolframphysics.org/

  • He is basically a crackpot. Any attempt at fundamental physics that doesn't take quantum mechanics into account is.... uhm.... how to put this.... 'questionable'.

    • I'm not even able to hold a candle to Wolfram intellectually- the guy is a universe away from me in that regard. But: Given a cursory look at his wiki page and Cosma Shalizi's review of his 2002 book on cellular automata [1], I feel fairly comfortable saying that it seems like he fell in the logician's trap of assuming that everything is computable [2]:

      >There’s a whole way of thinking about the world using the idea of computation. And it’s very powerful, and fundamental. Maybe even more fundamental than physics can ever be.

      >Yes, there is undecidability in mathematics, as we’ve known since Gödel’s theorem. But the mathematics that mathematicians usually work on is basically set up not to run into it. But just being “plucked from the computational universe”, my cellular automata don’t get to avoid it.

      I definitely wouldn't call him a crackpot, but he does seem to be spinning in a philosophical rut.

      I like his way of thinking (and I would, because I write code for a living), but I can't shake the feeling that his physics hypotheses are flawed and are destined to bear no fruit.

      But I guess we'll see, won't we?

      [1] http://bactra.org/reviews/wolfram/ [2] https://writings.stephenwolfram.com/2020/04/how-we-got-here-...

      1 reply →

    • That really seems to be mischaracterizing his work. The idea is that the quantum effects we see will eventually emerge.

      Most people in the field don't think his research will be fruitful, but that doesn't make him a crack pot

      1 reply →

    • Someone seems to say something demeaning like that about him whenever he comes up, and I don't really know why. Which is fine, maybe it's a subjective thing. For what it's worth, the few times I read something of his, I loved it.

      6 replies →

    • I sympathize with your opinion of him being a crackpot but he is also a genius and the idea is that the graphs in his theory are more fundamental than quantum mechanics and it would emerge from them.

The universe is already modeled that way. Differential equations are a kind of continuous time and space version of cellular automata, where the next state at a point is determined by the infinitesimally neighboring states.

I do wonder if you'd want to implement a sort of 3D game engine that simulates the entire universe, if somehow the weird stuff quantum physics and general relativity do (like the planck limit, the lightspeed limit, discretization, the 2D holographic bound on amount of stuff in 3D volumes, the not having an actual value til measured, the not being able to know momentum and speed at the same time, the edge of observable universe, ...) will turn out to be essential optimizations of this engine that make this possible.

Many of the quantum and general relativity behaviors seem to be some kind of limits (compared to a newtonian universe where you can go arbitrarily small/big/fast/far). Except quantum computing, that one's unlocking even more computation instead so is the opposite of a limit and making it harder rather than easier to simulate...

  • I don’t think the “not having an actual value until measured”, properly understood, would seem like an optimization.

    I don’t know why so many people feel like it would be an optimization?

    Storing a position is a lot cheaper than storing an amplitude for each possible position.

    One-hot vectors are much more compressible than general vectors, as you can just store the index.

    Also, it is momentum and position that are conjugate, not momentum and speed.

    • Ugh, I just listed things from the top of my head, no rigorous correct physics!

      I'd be interested to know where those so many other people who feel that would be an optimization are, because I don't often see opinions like this at all, only either rigorous physicists posting equations and papers, or people not knowing anything about it at all to even philosophize about it.

How complex? I'm no physicist nor an expert at this, but AFAIK we aren't really capable of simulating even a single electron at the quantum scale right now? Correct me if I'm wrong.

  • We can simulate much more than that, even at the quantum scale. What we cannot do is calculate things analytically, so we only have approximations, but for simulation that’s more than enough.

Less ambitiously, how small and clear could you make a program for QED calculations? Where you're going for code that can be clear to someone educated with only undergrad physics, with effort, to help explain what the theory even is -- not for usefulness to career physicists.

Maybe still too ambitious, because I haven't heard of such a program.

I've always thought that gravity exists because without it, matter doesn't get close enough for interesting things to happen.

Well, Newton thought he could do it with just 3 lines, and we've all been playing code golf ever since.

  • To be fair, his universe was much simpler than ours. He didn't need a nuclear reactor or particle accelerator to transmute lead into gold in his theory.

Rephrasing what some of the other answers have said, with a decent knowledge of math you could write the program, but you wouldn’t be able to run it in a reasonable time for anything but the most trivial scenarios.

Horribly complex and/or impossible.

(1) quantum mechanics means that there is not just one state/evolution of the universe. Every possible state/evolution has to be taken into account. Your model is not three-dimensional. It is (NF * NP)-dimensional. NF is the number of fields. NP is the the number of points in space time. So, you want 10 space-time points in a length direction. The universe is four-dimensional so you actually have 10000 space-time points. Now your state space is (10000 * NF)-dimensional. Good luck with that. In fact people try to do such things. I.e., lattice quantum field theory but it is tough.

(2) I am not really sure what the state of the art is but there are problems even with something simple like putting a spin 1/2 particle on a lattice. https://en.wikipedia.org/wiki/Fermion_doubling

(3) Renormalization. If you fancy getting more accuracy by making your lattice spacing smaller, various constants tend to infinity. The physically interesting stuff is the finite part of that. Calculations get progressively less accurate.

  • To go down this rabbit hole, the deeper question is about the vector in Hilbert space that represents the state of the universe. Is it infinite dimensional?

    • Yes, but that is not saying very much. Just one single harmonic oscillator already has a state space that is an infinitely dimensional Hilbert space. It is L^2. Now make a tensor product of NF * NP of these already infinitely dimensional Hilbert spaces defined above to get quite a bit more infinite.

> Could a competent software engineer, even without knowing the fundamental origins of things like particle masses or the fine-structure constant, capture all known fundamental interactions in code?

I don't think so.

In classical physics, "all" you have to do is tot up the forces on every particle and you get a differential equation that is pretty easy to numerically work with. Scale is a challenge all of its own, and of course you'd ideally need to learn about all the numerical issues you can run into. But the math behind Runge-Kutta methods isn't that advanced (really, you just need some calculus to even explain what you're doing in the first place), so that's pretty approachable to a smart high schooler.

But when you get to quantum mechanics, it's different. The forces aren't described in a way that's amenable to tot-up-all-the-forces-on-every-particle, which is why you get stuff like https://xkcd.com/1489/ (where the explainer is unable to really explain anything about the strong or weak force). As an arguably competent software engineer, my own attempts to do something like this have always resulted in my just bouncing off the math entirely. And my understanding of the math--as limited as it is--is that some things like gravity just don't work at all with the methods we have at hand to us, despite us working at it for 50 years.

By way of comparison, my understanding is that our best computational models of fundamental forces struggle to model something as complicated as an atom.