Friday, May 29, 2015

Puzzling Matrices

A coworker of mine brought a puzzle into the staff lounge/dining area at work a few weeks ago. Since then a couple of us have worked on it on and off, and so far we've got...

…the frame, and a smattering of connected fragments. It's decidedly not an easy puzzle.

Yes, that's the picture on the puzzle.
Progress on this puzzle, since we completed the outside frame, is typically in the range of 0–2 connections made per person, per day. It's a thousand-piece puzzle, fifty pieces wide by twenty tall. Yesterday as I managed to get a connection more by chance than skill, I wondered just how many connections there were in the puzzle.

It's not a very difficult problem, once we realize that the puzzle pieces are arranged in an essentially regular rectangular grid. This allows us to simplify the problem immensely (in true physicist fashion) by imagining the puzzle as a matrix of \(m=50\) and \(n=20\). The problem thus becomes a question of how many “edges” there are between all the pieces of a regular matrix.

We can start to break the problem down by looking at special cases: first of all, there are four corner pieces, each of which have only two connections. Then, there are a number of edge pieces, each of which will have three connections. Finally, the remainder of the pieces are interior pieces which have four connections each.

If we call the length and height of the puzzle m and n, then the number of edge pieces is going to be \(2\cdot[(m-2)+(n-2)]\). (The picture below may help you picture the various areas involved; the edge pieces are the areas in green, the corners are blue.)


The number of interior pieces is simpler, it's simply \((m-2)\cdot(n-2)\). Now that we have the number of each type of piece, it's a simple matter to multiply them by the number of connections they have and divide by two since every connection is getting counted twice. This gives us a formula for a function:
\begin{align}f(m,n)&=\frac{1}{2}\Bigl[2\cdot4+3\cdot2\cdot\bigl[(m-2)+(n-2)\bigr]+4\cdot\bigl[(m-2)\cdot(n-2)\bigr]\Bigr]\\
&=\frac{1}{2}\Bigl[8+3(2m+2n-8)+4(mn-2m-2n+4)\Bigr]\\
&=\frac{1}{2}\bigl[8+6m+6n-24+4mn-8m-8n+16\bigr]\\
&=\frac{1}{2}[4mn-2m-2n]\\
&=2mn-(m+n)\end{align}
Phew! That's a lot friendlier looking. Funny, I remember when I used to hate algebra with a passion, but that was kinda fun. Absence really does make the heart grow fonder, I guess.

Anyway, we've got our function, but we should probably test it with easy cases. Let's take the cases where \(m=n=2\) and \(m=n=3\):


Here we have some (extremely simple) puzzles. For the first one, on the left, it's easy to see that there are four connections between the four pieces. Plugging 2 in for m and n in our function gives: \[f(2,2)=2\cdot2\cdot2-(2+2)=8-4=4\] So that works. The second puzzle is larger, but it's still easy to count twelve connections between the nine pieces. Plugging 3 in for m and n gives us: \[f(3,3)=2\cdot3\cdot3-(3+3)=18-6=12\] So it appears to hold water. Going back to the puzzle at work, which had \(m=50\) and \(n=20\), we have: \[f(50,20)=2\cdot50\cdot20-(50+20)=2000-70=1930\]Which is a lot of connections! Anyway, my curiosity is sated, and you now have a simple formula to use for party tricks or whatever in the future. A hui hou!

Monday, May 25, 2015

Kīlauea Lava Lake

Two weeks ago my friend Graham and I took a trip out to Volcanoes National Park to see the Kīlauea lava lake. (This isn't the trip I posted about before, which didn't actually materialize.) We also stopped at a nearby bird sanctuary and took a neat drive up the side of Mauna Loa, though in pretty much reverse order to how I just listed things.

We spent forty-five minutes sitting in the line of cars waiting to get to the viewing overlook at the Jagger Museum so it was after sunset by the time we got there, the visibility not improved by a light drizzle. Due to that I'm afraid I wasn't able to get any pictures worth sharing, but thankfully Graham was a bit more prepared and managed to get some video with his DSLR. He'd also been two weeks earlier when the lava lake first rose into view and took footage then too, which I had the idea of compositing together to give a comparison of the activity levels at both times.

When we went the lake was a bit more active than it had been when he'd first gone, with one side constantly slowly boiling like a pot on the stove, periodically throwing a spray of incandescent rock into the air to fall as molten rain as giant bubbles of gas burst unceasingly from the depths of the earth. In the dark it's hard to get a sense of scale, but when you watch the video below keep in mind that that lava lake is eight acres in size. I've taken the footage from both trips and played them one after the other, sped up by 4x to keep the video shorter. (Apologies for the lack of sound; the original audio is just a babble of tourists and doesn't add anything so I muted it, and since this is pretty much my first video compositing experience I was more focused on getting it working than adding audio.)




Only a few days after this trip the lava lake level lowered to where it once again couldn't be seen from the overlook and so far as I know hasn't risen again, so it looks like I caught it just in time. Who knows, though, this is the apparently the first time it's been visible from the overlook in something like thirty years, so perhaps it indicates that the eruption activity center is moving back to the summit and away from the flank. Only time will tell.

Oh, I mentioned going on a scenic drive up the flank of Mauna Loa. The day was intermittently rainy and sunny, with rain clouds rolling in waves across the landscape, so while it was pretty it again wasn't very conducive to photography.

What was (surprisingly) conducive to photography were some of the birds we saw as we drove up. I was driving along on the one-lane road and noticed a solitary francolin standing on the left side of the road. It was standing on one leg in what looked like a fresh dirt-bath dirt patch, and continued to stand there as the car got closer…and closer…and closer, until I had pulled up directly beside it. It seemed completely unfazed as rolled down my window and sat staring at it in stupefaction, mere feet from where I sat.

(If I may digress; francolins are in the same family as chickens [though never domesticated], and I grew up around a lot of chickens. Other than chicks that were incubated and raised primarily around humans, I've never seen a chicken-like bird this unafraid of people, especially a wild one. I couldn't [and to a degree still can't] get over just how unruffled this bird was. I guess this must have been what it felt like landing on Mauritius and encountering the dodos for the first time.)

Anyway, after picking my jaw up off the floor, I was able to get some extreme close-ups of the francolin thanks to its complete coöperation, such as this one:

"What, never seen a francolin before?"

After what felt like a few minutes staring in wonder at this fearless bird as it stared dispassionately back, we left it where it was and continued up the road. Not much further we ran into a flock of five francolins in the process of slowly crossing the road, whom we interrupted just as they had a bird directly on each side of the road. Once again they weren't inclined to move even as we drove directly between them, mere feet away from a francolin on either side. Given the behavior of the francolins I've seen on Mauna Kea it was, frankly, a bit surreal. I don't know why these francolins so far up Mauna Loa are so fearless – perhaps the isolation and lack of experience with humans? – but it was a really amazing experience.

At the end of the road, about 6,000 feet up, one of the trails to the summit of Mauna Loa begins. It's a long hike, about three or four days, with cabins to stay at along the way. The end of the road also offered an amazing view down to Kīlauea caldera, which we were able to catch glimpses of in between the clouds rolling through. We also took a short hike to where some Mauna Loa silverswords had been planted as part of a reintroduction program. It was interesting to see the differences between them and their Mauna Kea brethren.


The Mauna Loa silverswords, as seen above, seem to have their leaves initially green only to turn silver later, while the Mauana Kea ones appear to be silver from the get-go. All the ones we saw were pretty small; that was one of the largest ones, and it's only about the size of a large cabbage. Of course, that may just be due to age differences between the two populations (both of them human-planted, coincidentally). The Mauna Loa silverswords, additionally, seemed to have only a single rosette, in contrast to the Mauna Kea ones that often have multiple rosettes in one plant. (I've heard this is the result of a genetic bottleneck; the single-rosette form is the standard, the multi-rosette is due to a mutation, but it just so happened that when they were collecting what few silverswords remained on Mauna Kea for breeding the few they got had this mutation so the ones that have been re-introduced do as well.)

Also between the drive and the volcano we stopped a bird sanctuary, which I don't have much to say about other than that it was a nice mile-long hike in the gathering dusk, trying to make out lots of little bird flitting about in the trees. And there were some neat kalij pheasants in the undergrowth that were pretty fearless around us too, though not quite to the extent the francolins were. All in all, a nice trip.

Friday, May 8, 2015

Kīlauea Topography

Later today I'll be taking a trip to Hawai‘i Volcanoes National Park to see the lava lake in Kīlauea caldera. In case you haven't heard: Kīlauea has had a lava lake in its summit caldera constantly since it began its current eruption on January 3, 1983, however, the level of the lake has fluctuated over time, and for most of its existence has been very low – too low for tourists to see from safety, and only visible with cameras set up on the very rim of the crater. Just recently, within the last two weeks, the level of the lake has risen dramatically, making it easily visible.

But wait – I'm using terms like caldera and crater willy-nilly here without definition. Kīlauea the volcano has a slightly complicated summit, and there are several names bandied about when talking about it. This post is as much for my sake as it is for yours, but I'm going to try to map out exactly where all the various names refer to. First of all, have a Google Maps view of the area:


This is a satellite photo of the area around the summit caldera of Kīlauea. This picture is mostly for reference. For actually pointing out the various parts, I've created the following picture with various regions colored in for clarity:


Here's the summit region again, with significant features colored it. Shown in red is Kīlauea Caldera. Calderas are a common feature at the summit of volcanoes, and are formed when the summit of a volcano collapses after a particularly strong eruption – the magma in the magma chamber has been erupted and can no longer provide support to the overlying rock. It's likely that Kīlauea Caldera was formed over several centuries, and may have attained its current form after a particularly violent eruption in 1790. I'm not 100% sure of these boundaries, as the walls of the caldera steadily diminish to the southwest where lave has spilled out, and there may be a small lobe to the northeast that I haven't included, but the outline is close enough.

The smaller green area within the caldera is Halema‘uma‘u Crater. (Remember my tips for pronouncing long Hawaiian words with reduplication! It's Hale·ma‘u·ma‘u.) Halema‘uma‘u Crater is a smaller pit crater within the larger caldera, and has been the location of most of the volcanic activity at the summit for quite a while (though not all of it; directly to the east of the caldera in the picture above you can see the pit of Kīlauea Iki where an eruption happened in 1959 that created some of the tallest lava fountains ever recorded).

Finally, within Halema‘uma‘u crater, colored in blue, is Overlook Crater, named for…I'm not really sure, actually. I guess the fact that it can be seen from the overlook at the nearby Thomas A. Jagger Museum. This is the actual volcanic vent, and has in the past taken the form of a yet smaller crater within Halema‘uma‘u crater. This is where the lava lake I talked about has actually been residing, usually far enough below the surface as to be unseen from the overlook.

However, starting on April 24th, the lava lake inside the vent rose almost to its lip (at the floor of Halema‘uma‘u crater), the highest it had ever come since the vent opened. As of April 29th the lava has actually risen enough to spill onto the crater floor, and has since fluctuated around the level of the floor of the crater floor. It's clearly visible from the overlook, and a lot of people are going out to take a look, including myself. If all goes well I hope to have some pictures of it soon, and with this post under your belt you'll be able to follow what I'm talking about when I casually throw out names like “Halema‘uma‘u crater.” A hui hou!

Edit: Well, maybe this'll teach me to announce things ahead of time. Turns out, due to unforeseen circumstances, several of the people I was planning on going with couldn't make it today, so we're postponing to a later date yet to be determined. I'll be sure to write about it when it does happen, though.