Pages

Sunday, November 6, 2022

In My Corner

For a while I've been interested in analyzing the game Jenga, since it's very physics-aligned in its design: Maintaining balance under changing forces. I couldn't get a handle on how to look at it though, until I connected it to a tool that's used frequently in my research field: corner plots. Corner plots are a way to display correlations between different variables in a large data set. For gravitational waves, they're used to show how estimates of a source's parameters depend on each other, such as a black hole's mass and spin. I figured I could come up with some measurements of Jenga games, and look at how they relate to each other.

First, we need a way to collect some data. As a reminder, here's what a Jenga tower looks like:

Wikipedia

Each level has 3 blocks that alternate in direction. On a turn, we remove a block from anywhere below the top level, and then add it to the top. The tower will fall and end the game if the center of mass of a subset is over an empty space, and the side is not supported. I was able to make a simulation of this in Python, with the virtual player making a random move on each turn, so long as that move does not cause the tower to fall. Eventually, the player will run out of moves and the game will end, but we can look at what kinds of moves result in longer games. I struggled a bit to find a way to show an example tower being built, and settled on a side view with all the bricks facing out. Remember that the bricks actually alternate in direction, so a hole under a brick is not necessarily a problem:


Now to get our statistics, we want to run a large series of games, and get some measurements from each one. The parameters I chose were max height of the tower, number of turns taken, fraction of turns for which the center block of a level was removed, fraction of turns a block was placed on the center of the top, and the fraction of times a block was removed from the upper half of the tower. After running 500 simulated games, we can make a corner plot with the results (click to enlarge):

This shows us some interesting connections between our parameters. There is strong correlation between the maximum height and the number of turns – This makes sense, since each turn we put a brick on the top level. We can also see anti-correlation (negative slope) between removing the center brick and max turns/height. This is because once the center of a level is taken, we can't take either of the sides, so we run out of bricks faster. Our final two variables, adding to the center and removing from the upper half, don't seem to have much effect on the outcome, indicated by the circular distributions.

Now in reality, Jenga bricks are designed with some irregularities to make the balance a little more difficult to predict, so this is another case where knowing the physics might not help you win, but it was interesting way to explore a tool for visualizing data.

Sunday, October 23, 2022

Rings a Bell

A couple weeks ago, it was announced that this year's Nobel Prize in Physics was going to a group of scientists who experimentally tested Bell's Theorem. As with many concepts in quantum mechanics, this can be a bit tricky to understand, so I wanted to build it up piece by piece (as much for myself as for you).

When Quantum Mechanics was first developed, many people (including Einstein) were disturbed by the implication that, not only did interactions have random results, but that entangled particles could communicate those results instantaneously, breaking the speed of light. One explanation that was proposed to avoid this problem was the "Hidden Variable Hypothesis", which claimed the final states of the entangled particles were actually determined by some unknown property present at their joint creation, and therefore no information needed to be exchanged. John Bell came up with a way to test for the presence of a hidden variable, which I'll outline below.

First, suppose we have some collection of measurements. Each measurement has three properties: A, B, and C, which can either be +1 or -1. If each property is assigned randomly, we can think about the probability of two properties being the same, e.g. P(A = B). Now we can write
If you're not sure about this, you can try a couple sets of values, but the key is that we only have 2 choices, +1 and -1, for 3 properties. Now these properties are exactly the type of hidden variables that we're suggesting may exist. If we can come up with an experiment that can measure yes/no for three different properties, then we can simply count the outcomes and check if this inequality holds.

Looking again at that old post I linked to, we can imagine the following experiment: We produce entangled particles with opposite spin, and send them in opposite directions. Each goes into a Stern-Gerlach box and gets measured as spin-up or spin-down on the box's axis. However, we vary the angle of each box between 3 possibilities: 0°, 120°, and 240°. Our three properties are "spin-up along n-degree axis", and negation represents spin-down.

With this setup, we can think of the hidden variables as a set of rules for how the particles respond to each of the three angles. When a pair is produced, each is assigned one of these rule sets, e.g.
Since the particles have opposite spin, comparing the two detectors means the equalities in the equation above become not-equal. Now we can look at all the possible combinations of A, B, C between the two detectors, as well as each set of rules the pairs could be assigned, and find the probability that the two measurements are opposite:
In the inequality above, each term contributes 1/3, which gives us a total of 1 and satisfies the relation.

Quantum mechanics, though, predicts a different result. When one of the entangled particles is measured to be spin-up along a particular axis, we immediately know the other one is spin-down along that same axis. Knowing the second particle's orientation, we can find the probabilities of measuring opposite spin along each of the possible axes:
Adding up the terms again, according to Quantum Mechanics we only get 3/4, violating Bell's Inequality! That means we have an experimental method to test for hidden variables. Unfortunately, dealing with entangled particles is a delicate process, and the experiment needs to be repeated several times to accurately measure the statistical distributions, which is why it has taken more than 50 years to confirm this result. A well-deserved Nobel Prize for these scientists!

Sunday, October 9, 2022

A Churning Ring of Water

[Title with apologies to Johnny Cash.]

The sink in our new home has an interesting setting that I was curious about:

It sprays a thin film outward, but the water curves back to meet in the middle again. When the water leaves the sprayer, there are only two forces acting on it: gravity pulling it down, and surface tension pulling the droplets together. I mentioned surface tension long ago, but I've never dug into the mechanics of it.

Surface tension is a force that acts to decrease the surface area of a fluid. For a given volume, a sphere has the smallest surface area, which is why water forms drops, and why shot towers can make round bullets. The magnitude of the force is given as

where γ is a constant that depends on the two materials being considered (air and water in this case) and L is the length of the edge that F will act to reduce. The sink is spraying out a ring of water, so if we take a cross-section, L is the inner plus the outer circumference of the ring. We can rewrite the force as

where m is the total mass of water, a is the acceleration, ρ is the density, A is the area of the ring, and Δh is the small vertical slice we're considering. Now this a refers to the radial acceleration of each water molecule, but we want to relate it to back to L. To do that, we can write two equations expressing L and A in terms of the inner and outer radii of the ring:

Since the ring is thin, we can take r1 approximately equal to r2, and after a bunch of algebra write

Since the flow of water is constant, A must be constant, so we can use the above equation to get a timeseries for L, then find r1 and r2.

In order to integrate this, we need initial values for L and Ldot. We can approximate the opening on the faucet to get r1 and r2, and find the initial L and the constant A. Then we can use A with the typical flow rate of 2.2 gallons/minute to find Ldot. Something didn't quite work out with my estimations, since the scale is way off in the following plots, but the shape matches great. Here's a side view of the spray:


and an animation descending through cross-sections:


So far I haven't found much use for this setting when cleaning dishes, but it did give me something interesting to think about!