A jigsaw analogy for teaching

Have you ever observed and thought about the steps along the way as a child figures out how to do a jigsaw puzzle? They start out mostly just chewing on the pieces, but soon they develop a desire to get to the completed puzzle. Sometimes they need a little help. There’s a stage where they have mastered figuring out in what spot a piece belongs, but not the art of rotating it so the image, and more importantly the shape, fits.

Later comes more abstract wisdom, such as beginning with edges and/or easily identifiable parts of the image and looking for candidate pieces and checking each in turn. Along the way they may ask for help, or need help, but they also need to struggle and try for themselves. If we always lend them a hand when a piece doesn’t immediately slot into place we either slow down the progress of their learning and/or teach them the trick of getting us to do the puzzle for them. But if we never do they are unlikely to bother with puzzles at all.

I recently had the thought that acting as an instructor (a teacher, lecturer, tutor, etc.) could be modeled in many ways as helping a child who is figuring out how to solve a puzzle. There’s the need to give the student the right level of challenge and not start them out with a 500 piece puzzles of the Andromeda galaxy; the need to let them struggle at times; and the need to find the right level of intervention, a word of encouragement, a Socratic question, a suggestion, or even modelling the right approach.

The challenge is though that there is no physical puzzle to observe, no easily definable shared reality to work with. The completed parts of the puzzle are in the student’s brain and it takes time to understand what is there already, what pieces are missing here and there in the interior, and, even more important and time consuming, what shape the puzzle has at the edges.

And the puzzle piece you are trying to add isn’t physical either. Say it is teaching someone about adjectives. That seems straightforward, but how much a student is ready to learn will vary. Do they know anything about sentence analysis? What a subject and object is? And what is the goal? Pass the next test? Gain an understanding they can use to move on to the next piece of that puzzle?

The child cares about completing their puzzle and seeing the final picture. The student may not care about adding this puzzle piece to their, or about completing previous parts that you can tell are missing based on their misunderstandings and errors.

And beyond that it is not just about this one piece. Even more nebulous, but in the end more important, is teaching independence. The end goal, even though it may be years in the making, is for a student to be capable of progressing “on their own”, to analyze their own currently state of knowledge, to seek out resources at the right level to fit a new piece to their puzzle.

Is this a useful model? Maybe it is for some and not for others. And the lesson to take away might differ too. Some instructors need to let students struggle more, some need to get better at choosing the right level of challenge. And some need to nod in recognition when I sign off with: Sometimes you can only do so much with the time, energy, students and learning environment you are in.

A modest proposal (novel, I know!)

I’m an opinionated person, and one opinion I hold is that we should have freedom of thought, including opinions. Some opinions are very stupid though, and the people who hold them should be forced to confront that for real, not just by self-appointed twitter thought enforcers.

Still, we can sometimes learn something from examining stupid opinions, whether it be something about human psychology and our tendency to rationalize rather than reason, or that Gödel’s incompleteness theorem can be extended to opinions as well as math. No opinion can be built on reason alone, there is always some value judgements involved. And once in a blue moon we can combine several stupid opinions and get one good one, as I will do in this post.

Stupid opinion one: We need population reduction to solve X! There’s nothing inherently wrong in being of the opinion that, based on some set of values, humanity, or some subset thereof, would be better off if there were fewer of us, but this is usually a stupid opinion for the following reasons:

  • It’s often not an honestly held opinion, just an argument against using any other means to solve X. E.g. There’s no point in limiting oil extraction, what we really need is fewer people.
  • It’s often not accompanied by a willingness to discuss what means are acceptable. E.g. Of course I don’t mean genocide, you can use whatever means you want, but until you do, keep your hands off my unnecessarily large pickup truck.
  • It’s often an abdication of responsibility. E.g. The problem isn’t me/us, it’s that there are too many others.

Stupid opinion two: Men! Again, there’s nothing inherently wrong with all opinions about men, but it is a topic with an exceptionally poor bad/good ratio, and the chief issue appears to be over-generalization.

I can hear the cries of Yes, Not All Men! and Not All Men? Really? all the way from here where I’m not even done writing this sentence. (Well, not from you of course, you’re withholding judgement, just barely. Good for you, have a cookie!) And I’m actually going to poop on the former and hand it to the latter (Woo, more cries!). The fact is over-generalization is a lot less common among people who write variations on the theme All men are trash than among those who pipe up with Not All Men in response to any criticism of more or less common male behavior.

While there are All men are trash opinion-holders who exclude an infinitesimal number of men from their generalizations, most do in fact not include all men in All men, but use it as a justified shorthand for This behavior is so widespread, and so rarely criticized by other men, that a solid majority of men bear at least some responsibility for it, and also it’s a lot less satisfying to tweet “Got cat-called again today! Jeez! All men are trash!” than “Got cat-called again today! Jeez! Those specific men are trash!”

Not All Men sayers on the other hand, although of course not all bad, some are just ignorant, willfully or not, are extremely likely to hold strong opinions on what is manly, in an overly generalizing and oppressive way. E.g Not all men are harassers, in fact it’s manly to want to protect women, not harass them. or Not all men are harassers, and besides cat-calling is a compliment and it’s just a male trait to chase skirts!

And at the root of this problem (other than the fact that these men are trash) lies the male-female imbalance in how relationships, long and short, form in our culture, with the bulk of the responsibility for action lying on the males. Of course both socially inept males and females end up in relationships in fairly high numbers, but it’s more of an issue for males, and they also whine about it a lot more.

The solution! Fewer men! Fewer women is of course a more efficient way to reduce population, since theoretically each man can have a lot more offspring than each woman, but as we see in China, a surplus of men is just not good, and if most people maintain their norms for what kind of relationships they want to have children in, fewer men also means fewer children.

It also has the potential to solve a lot of the issues of gender discrimination that decade upon decade of fighting for equality hasn’t been able to wipe away. Combating male dominance just becomes much easier if there just happens to be fewer males.

So I modestly suggest we make gender selection technology more accessible, and create incentives to pick girls if the fact that “boys are gross” isn’t enough of one, and in a few decades there will be no more issues with overrepresentation of men without all those pesky efforts to reduce chauvinism that hurt men’s sensitive feelings. And we’ll be well on our way to a reduced population with all the benefits that entails. I can see no way this could go wrong or reason it shouldn’t be policy immediately.

Hypercubes part 2D

There are no other parts 2, but how could I not. In the previous post I gave an extensive introduction to hypercubes at a fairly low level. I was going to talk about how we can think about and partially understand what goes with hypercubes by using coordinates, but although I referenced them a few times, by the time I got to the actual hypercubes I’d stopped. In this one though, I will.

But first I want to share two links:

This one I also linked from the previous post, it has some good stuff, but it’s a bit more hardcore math than mine.

The next one got from the smart people at  The Straight Dope Message Board when I asked if anyone could find a good video showing what a straight cut through a hypercube gives us, but it also goes through a lot of stuff about hypercubes in detail. And it’s from 1978! The Hypercube: projections and slicing

Okay, so what I’m really going to focus on in this post is …

Surface and volume

In this first link above, the people at physics insights define two terms that are very handy when trying to understand how objects in different dimension relate to each other. One is n-volume and the other is hyperface. I’m going to explain both of them and justify their use by looking at the coordinates of the points involved. I’m going to refer to hyperfaces as surfaces, or n-surfaces, though, since this isn’t a high level math text and that just makes more intuitive sense to me. And this time we’re going to start with the cube and work back to a square before we jump to hyperspace.


We start with the cube because it’s the most real in our universe. Truly 2D squares don’t exist, though we can still grasp their properties since they are a part of 3D space. But we’re not going to work with a real cube, we’re going to work with the mathematical one from the previous post.

Cube - front view

A 3D unit cube with coordinates

Okay, so this cube, like all cubes, has eight vertices with coordinates:

  • A: (0, 0, 0)
  • B: (1, 0, 0)
  • C: (1, 1, 0)
  • D: (0, 1, 0)
  • E: (0, 0, 1)
  • F: (1, 0, 1)
  • G: (1, 1, 1)
  • H: (0, 1, 1)

It has 16 edges, AB, AE, AD, BC, BF and so on. Looking at the coordinates we see the end points for each of the edges share two out of three coordinates. The end points of AB are (0, 0, 0) and (1, 0, 0), the end points of EH are (0, 0, 1) and (0, 1, 1). The remaining coordinate is either 0 or 1, if we pick a value between 0 and 1 instead, we get a point on the edge, if we pick one larger than 1 or smaller than 0 we are outside the cube entirely.

The cube has six faces, ABCD, ABFE, BFGC and so on. If we look at the four points that define the four edges that define one face we see that there is one common coordinate. A, B, C and D all have z-coordinate 0. B, F, G and C all have x-coordinate 1. As with the edges, the faces follow the rule that if one coordinate stays 1 or 0, and the others are between 0 and 1, we are on the face. We can define the whole surface of the cube this way.

We can then use this to define what is inside the cube and what is outside. Any point where no coordinate is less than zero and no coordinate is higher than zero is inside the cube, making up the volume.


Got that? Great, let’s jump back to 2D then.

A square

The unit square

Any point in this plane that has two coordinates that are both in the range [0, 1] (that’s 0 to 1, end points included) make up the substance of the square, which we have defined as the volume of a shape. I know we usually call it the area for a 2D surface, but we’re dimension-jumping now, so since it follows the same rules as 3-volume, we shall call it 2-volume rather than area.

Ditto surface. If the coordinates are in the range [0, 1] and at least one of them is 0 or 1, we’re on the surface of the shape. For the 2D square it’s a 2-surface. (The pros would say that a side, e.g. AB, is a hyperface of the square.)

If we’re outside the square and want to get in, we have to pass the surface at some point, but it can be any point.

The same applies to the cube. If we’re outside and want to get in, we have to pass the surface, but for the cube the surface is what we usually call a surface. And if all this seems obvious we are ready for the hypercube!


Okay! So, in 4 dimensions, we have a 4-volume that is all the points that have all coordinates in the range [0, 1]. And we have a surface that is all the points that fulfill that restriction plus at least one coordinate is 0 or 1. But that means one coordinate is always the same, so we can sort of ignore that, and three of them range from 0 to 1. And what kind of shape is it that has three coordinates ranging from 0 to 1? A cube! The surface of a 4-volume is a 3-surface made up of cubes, with coordinates of one of these forms, with x, y, z and w in the range [0, 1]:

  • (0, y, z, w)
  • (1, y, z, w)
  • (x, 0, z, w)
  • (x, 1, z, w)
  • (x, y, 0, w)
  • (x, y, 1, w)
  • (x, y, z, 0)
  • (x, y, z, 1)

Eight cubes! Which should surprise no one at this point.

A 2D representation of a 3D flattening of a 4D hypercube.

A 2D representation of a 3D flattening of a 4D hypercube.

Isn’t this pretty much what I wrote in the previous post? Yes, yes it is. But with the added mathematicalness of coordinates all the way, and an opportunity to talk about entering and exiting the hypercube some more. We can get from outside the hypercube to inside the hypercube through any point in one of the surfaces, and the surfaces are cubes. (0.5, 0.5, 0.99, 0.5) is in the middle of the hypercube along most axes, but close to the edge along the z axis. (0.5, 0.5, 1, 0.5) is on the surface of the hypercube, or more precisely it’s in the center of the top cube in our projection. And (0.5, 0.5, 1.01, 0.5) is another small step along that same straight line, but now it’s outside the hypercube. (In a way we can’t really meaningfully illustrate in 3D.)

Mind sufficiently blown, or perhaps you’ve just given up on understanding what I’m babbling about? Well give me one last chance. I’m going to take this latest example and translate it to a 4D space we are actually familiar with, namely space-time.

There’s still going to be room for headaches though, as we need to be able to understand what a unit hypercube is in 4D space time. It’s a 1, 1, 1 cube, that exists for 1. You can pick your units, but your unit of time has to be the same length as your units for space … It’s a cube that pops into existence, exists for a bit without moving relative to our space coordinates, and then stops existing.

Now if we use space-time coordinates (x, y, z, t) and pick three space coordinates, say (0.5, 0.5, 0.5, t) if we put a dot there and let t vary we get a line. It looks like a point to us, but it exists through time, so it’s a line. Now at what we’d designated as time 0 we let our unit cube pop into existence. Our point is in the middle of the 3-volume of the cube, without having gone through any of the 2-surfaces, but since its coordinates are (0.5, 0.5, 0.5, 0) it is on the 3-surface of the hypercube.

The cube and the point/line keeps existing, making the cube trace out a hypercube, and then when the point is at (0.5, 0.5, 0.5, 1) the cube pops back out of existence, and the point/line exits the hypercube.

Fun, yes?

Hypercubes: an advanced laymans guide

Anyone who explores geometry beyond the high school level, including adventurous high schoolers, and start wondering about and researching the sequence 1D, 2D, 3D, 4D … (WTF! OMG! LOL!) learns about Hypercubes, one of the most basic 4D “shapes”. Since humans cannot perceive of 4D objects, being sadly bound to the three spacial coordinates, this usually leads to a small headache and a often a desire not to be troubled with such thoughts again.

A very small number go on to study higher geometries in university, which is some really mind bending sh-t, or so I expect, as I haven’t done it myself. And a still small, but larger number are somewhere in between. Not quite willing to commit to spending money on a degree in the stuff, but still curious. This text is for the particular segment in that group who have just been waiting for a good, but basic, explanation.

(Technically Hypercubes can be 5D, 6D, and so on, and the 4D version is more precisely called a 4-cube or tesseract. But higher dimensions than the fourth are even more ineffable, so we’re fine using hypercube and meaning the 4D version.)

1D and 2D

To get beyond the Wow weird!-stage and get some proper understanding of the challenges we face dealing with 4D space we need to establish some basic rules and a common understanding of what goes on in lower dimensions. I’m going to use both images and coordinate references, but as I was working through this I didn’t end up using coordinates much for the actual hypercube stuff, so you’re safe to skip it. I am however planning a followup post, as I’m not done exploring this space (wink, wink, nod, nod) and the followup will involve coordinates and equations.


A 1D object is a sort of “perfect” string. It has no thickness, only length. A high-wire acrobat does most of their work in a 1D world and you can describe their position with just one coordinate. If you set 0 at one of the platforms, then the position of the acrobat is perfectly defined by how far they are from that platform and to get from the point 2 meters from the platform to the point 3 meters from the platform, they have to pass through all the points on the line/wire in between.

If there is a barrier on the wire, for instance another acrobat, no one can get past, unless one or both acrobats are ghosts who can pass through each other, or, more relevant in this context, they jump and thus move through another dimension, cheating the rule that you have to pass through all points on the line.


One way to think of and define a two dimensional shape is to start with a one dimensional one, say a line of length one, and move it through a second dimension. If in the 1D world the string had endpoints (0) and (1), we add a coordinate to place it in a 2D world (0, 0) and (1, 0), and then we move the line at ninety degrees to itself so the endpoints get to (0, 1)  (1, 1), and connect the new endpoints to the point where they started. This gives us a square.

This might seem like a cumbersome way to think of a square, but it’s going to come in handy later, so look at this illustration of a square and try imagining that a copy of the line from A to B moves upwards until A is at D and B at C, and that the infinite positions the line has on the way define the square ABCD.

A square

The square ABCD

In addition to the original line AB and the new line DC, the square is bound by BC and AB. One side of each of this line is inside the square, and the other side of the line is outside the shape. That inside and outside are, however, 2D properties of the line. In 1D the inside and outside would be points on the line in contrast with the segments on the extensions of the line beyond the end points.

Like the perfect 1D line, the perfect 2D square doesn’t exist in reality, but it’s slightly easier to imagine one. If I draw it on a piece of paper for instance and then draw a line from A to C, I cannot draw a second line from B to D inside the square, without crossing the first one. I can lift the pencil, but then I’m no longer inside the 2D square. Even if we may intuitively consider it a sort of fence, the 2D shape is restricted to just the surface of the paper. A point above it is not inside it.

If we make a straight cut through the square, the cut forms a 1D line. A cut through the 1D line makes a zero dimensional point, which can give you a headache all by itself, but we’re going to move the other way, and the nature of cuts becomes one way we can examine the strange nature of geometries beyond our own.

You can probably envision it yourself, but here is an image of a straight cut through the square. We can make infinitely many straight cuts by picking two random points not on the same side, and connecting them with a straight line. All the points on the line will be in the square and can be described with two coordinates.

The square ABCD with a straight cut forming a line.

The square ABCD with a straight cut forming a line.


By now you are possibly thinking This is child’s play! When will we get to the good stuff?, but if you’ve skipped ahead to 4D you probably realized that we need a hard, concise repetition of lower dimensions to make sense of the higher ones. And if you skipped ahead and found it easy … What are you doing back here? You should have realized you’re not in the target demographic for this text! Fine, stay, but be quiet.

So, anyway, we’ll define a 3D shape from a 2D shape like we just did to go from a line to a square. (There’s a nice animation here, in a post similar to this, but more technical.) We take the square ABCD and put it in a 3D space with coordinates (0, 0, 0), (1, 0, 0), (1, 1, 0) and (0, 1, 0). We dub the coordinates (x, y, z) and we notice that the z-coordinate, the red one, is 0 for all four points. This means that all the points in the square also have 0 as their z-coordinate. Now we move a copy of the square up the z-axis one unit, and so we get a new square at (0, 0, 1), (1, 0, 1), (1, 1, 1) and (0, 1, 1), and we call the sum of all the infinite squares along the way a cube.

A 2D representation of a 3D cube

A 2D representation of a 3D cube

Now this is where you need to really start paying attention! What you see here is of course not a cube. It’s a flat image made up of rhombuses, with some of the lines dashed and with a variety of shading. But you perceive it as a cube, because human brains are amazing.

We can make perspective drawings of cubes in various ways. In this particular one we started by drawing the square ABCD “tilted” inwards into the screen, and then moved it upwards. When in a bit we start doing something similar to create a hypercube, it’s necessary to have a more solid understanding of what we’re doing, so we’re going to make a second representation of a cube, one where we start with ABCD perfectly “flat”, facing us.

We’ve already seen what that looks like, it’s the first image in this post. Now imagine we make a cube from this square by moving it inwards. It can’t actually move inwards of course, all we can do is to draw it smaller, use some dashed lines, and let the brain do the rest, but as I just wrote: Human Brains are amazing!

Cube - front view

A face on 2D representation of a 3D cube

You may notice an “unnecessary line going through A and E and “beyond”. That is the z-axis in this version of the cube. So points A and B are at (0, 0, 0) and (1, 0, 0) respectively, and E and F are at (0, 0, 1) and (1, 0, 1).

Now like the 2D square was bound by four lines, the 3D cube is bound by six squares. And for each of those squares there is an outside and an inside. And if I make a barrier, like putting in a rectangle with corners at AFGD, we cannot get from B to H inside the cube, without crossing through the plane AFGD.

We can also consider AFGD the rectangle we get if we make a straight cut through the cube through these corners. All straight cuts through a cube make planes and the part of the plane inside the cube can be a square/rectangle, a triangle, a pentagon or a hexagon. (I couldn’t figure out all of those in my mind and was slightly surprised by them. Maybe it is obvious to you, but if not, I suggest you go look at slicing cubes next.) AFGD forms a rectangle with sides that are 1 and 1.41 long. (Can you see why?)

Cube with plane cutting through it

The cube with a plane cutting through it

What happens when we slice a cube will be important to understanding what happens when we slice a hypercube, but to make things easier for both you and me, we’ll compare with slicing parallel to one (and therefore two) of the bounding squares, which will give us this:

The cube ABCDEFGH sliced parallel to the side ABCDE

The cube sliced parallel to the side ABCDE

Now this plane has a few important properties. One is that it’s one of the squares we got on the way when we created the cube by moving a square from ABCD to EFGH. Another is that the z-coordinates for its corners IJKL are all the same. And a third is that the coordinates only differ from ABCD and EFGH in the z-coordinate. D is (0, 1, 0), H is (0, 1, 1) and L is (0, 1, 0.6). And we can make an infinite number of similar planes just by using ABCD as a starting point and changing all the z-coordinates to some number between 0 and 1.

Now one important thing to note, which might seem obvious, but will be very important when trying to wrap our heads around the hypercube, the square IJKL is inside the cube, it’s the result of a straight cut through it, but it is not inside the square ABCD. That’s just a result of how we’ve drawn it. If I’d have drawn it in the first representation of the cube, the 2D relation between them would have been completely different. Think of turning this cube, at some point the square IJKL is going to move “outside” the frame of ABCD.

Oh, and one more thing to note about a cube like this. Each square has one other square connected to it at each edge. There are no “free edges” not touching another edge. This is also true of the square. Each of the four lines has a neighbor at each end point. There are no free ends. And each edge has an inside and an outside relative to the cube. You can get from the inside of one edge to the inside of another edge, or from outside to outside, without crossing the boundaries of the squares. It’s possible you’ll want to scroll back and look at this again to really appreciate how impossible it is to actually understand hypercubes once I’ve described what happens to this property when we add a dimension.

And that dimension will be added now!


To get four dimensions we need to add another axis to the coordinate system. And it needs to be 90 degrees to all the previous ones. This is of course not possible in our limited world, so we have to cheat. There are a number of different ways we can do this cheating, but I’m going to do the one that is the closest analogy to starting with a face on view of a square and moving it “inwards”.

We take a cube instead of a square, and we move it “inwards”. Like with the square it becomes smaller, and it looks like it is inside the original cube, but it is actually not. But unlike with the square, our brain does no magic to make us see it as a hypercube. It just looks like a cube inside a cube and we have to do the figuring out how things are connected by thinking about how this is analogous to the 3D version.

A 2D representation of a 3D flattening of a 4D hypercube.

A 2D representation of a 3D flattening of a 4D hypercube

So now that we are in four dimensions, every point has four coordinates. A is for instance at (0, 0, 0, 0) and E is at (0, 0, 1, 0). If the corresponding points I and M were actually inside the “bigger” cube, I’s coordinates would be something like (0.2, 0.2, 0.2, 0). But that’s not the situation this representation is supposed to illustrate. Instead we have to try to think of the shrinking of the cube as a movement “inwards” in a 4th dimension, which gives I and M coordinates equal to A and E, except for that fourth one, so (0, 0, 0, 1) and (0, 0, 1, 1).

Also like with the representation of the cube, the bounding shapes are distorted. The 3D cube has six 2D sides that are squares. Front, back and four sides that look like trapezoids in this flat drawing, but are squares in reality. I’ve highlighted one here.

Cube, one side highlighted

Cube, one side highlighted

The 4D hypercube has “sides” that are 3D cubes. A “front” and a “back” along the fourth dimension, that look like a big cube and a small cube in the 3D version. (Remember that this is a 2D drawing of a 3D projection of a 4D object!) And for each face of the “front” cube, an “side” cube swept out when we shift this cube to the “back” position (the little cube), which in this projection look like truncated, square pyramids.

Hypercube - side cube higlighted

Hypercube – side cube highlighted

And now for the bits that will boil your brain (there are lots of bits that boil your brain in examining hypercubes, but these are the bits I’ve decided to include here). Just like the points that are on the faces of the cube aren’t really in the cube, but are the boundary of the volume, the points in the volumes of the eight cubes that bound the hypercube are not in the hypercube, they make up the 3D surface of this 4D object.

I’m considering coming back to this and explaining it further in terms of coordinates and terms such as n-volume and n-surface in a follow up post. Let me know if you are interested in that. But purely “visually”, imagine that you take a point in the middle of one of the faces of the 3D cube, and a point in the middle of a different face, and connect them with a line. This line does not cross outside a 2D face in any way, it just connects two of them through the added third dimension.

Similarly, a line from any point in one of the cubes can go through the 4th dimension in a straight line to a point in a different cube, without crossing through the faces of the cube. Having trouble picturing that? Well that’s cause it’s impossible. I kind of have doubts myself, but I intend to prove it in the follow up post.

Two more things for this post though. If you do a straight cut through a 2D square, you get a 1D line, remember? If you do a straight cut through a 3D cube, you get a plane, which is a square if you cut parallel to one of the sides. And if you do a straight cut through a 4D hypercube, you get a 3D cube. Yes, it’s bonkers. (It’s so bonkers I’m only 95% is correct. It’s definitely true that if you lock one of the coordinates to a single value, say z = 0.5, the points that fulfill that restriction and are part of the hypercube make up a cube. But is that a straight cut?)

Finally, let’s all think about the weirdness of the fact that we can expand the Pythagorean theorem to hypercubes.

We tend to learn about Pythagoras as a property of right triangles, which it is, but it’s also convenient to think of it as a way to find distance in a cartesian coordinate system. Here’s an illustration to work from:

Pythagoras on the diagonal of a square

Pythagoras on the diagonal of a square

If we have the coordinates of the end points of c we can very easily find the lengths of a and b, and then we know that c² = a² + b² and use that to find the distance c.

Same goes in a cube:

Pythagoras in 3D

Pythagoras in 3D

The diagonal from the front bottom right to the back upper left is d. I haven’t drawn it in, because it’s hard to visualize correctly in this view, but I think you can figure it out. The length of d and so the distance, is given by d² = a² + b² + c². a, b and c are all ninety degrees to each other. (Showing that this is correct using the triangle version is high school math. Try to figure it out from first principles if you can’t remember it.)

Note that if we start at front bottom right and go left and up, we have two different edges we could follow, but only one is ninety degrees to both the previous edges. Same goes in the hypercube where we actually have three options, but only one is ninety degrees to all the previous edges in our path.

Pythagoras for the 3D hypercube

Pythagoras for the 3D hypercube

The distance between B and P here, if all the edges are length 1, is 2, because e² = a² + b² + c² + d². For the unit square (2-cube), unit cube (3-cube), unit 4-cube, unit 5-cube and so on is √n where n is the dimensions involved, and the square root of 4 is 2.

There’s more weirdness I want to write about and explore, but to do that I need to do some heavier math, so that’ll have to wait for the next post.


Our computerized futures and what we can learn from game glitches

I just received an email from my wife about her return flight, and Google automatically recognized it as flight information and gave me an update on it. Self-driving cars are out on our roads, for better or worse. Decision makers are increasingly relying on complex handling of huge databases to figure out how to optimize the resource they have at their disposal.

Now I’m not against new technology. For instance I think we should put more money into developing good self-driving technology, since it wouldn’t be that hard to make them safer than human drivers are today. But it’s important to bear the limitations in mind as systems get more and more complicated. A decision support system can only work with the values (and I mean both the data input and the evaluation of what is “good”) it has been given, and even then it might behave differently from expected, so having knowledgeable humans supervising and evaluating is necessary, and the higher the stakes and the higher the complexity of a decision, the more important it is that a human has final say. (Driving is a relatively simple task really by these criteria.)

Now the existence of computer errors and their use as arguments against computerizing anything is nothing new. It’s all out there, from jokes about having to Ctrl-Alt-Delete your car to more serious evaluations of the risks of computerization. But as computers improve, the errors get more rare and less of an influence on your average Jill’s feelings about computerization. But rare isn’t none existence, and being aware of the causes of and consequences of rare errors will be essential as we evaluate the changes we do to society. And game glitches is a great example to use to teach about this for multiple reasons.

For popular games even the rarest events will occur for many people. Many gamers consider it fun to discover, exploit or just mess around with glitches. This means that glitches in computer games are both found, documented and publicized and recently I stumbled over the world of Zelda-glitch YouTube.

Now here I have to do a quick detour and wax poetic about the wonders of video game physics. Most gamers will know this and most non-gamers will not, but at the heart of any game involving 3D motion lies a physics engine. And a modern physics engine can do fantastic things. Combined with other just as marvelous pieces of simulation software they can create entire, dynamic worlds that, under normal circumstances, seem as realistic as their developers want them to be. If you want characters to perform realistic jumps and throws, they will, and if you want jumps to be superhuman and punches to create fireballs, that will happen to. Modern games, even when relying on an existing physics engine, require a large development team to get everything right.

One such game is The Legend of Zelda: Breath of the Wild, (BOTW from now on) the last in a very popular series of games and the first in the series to involve an open world with really realistic graphics. You can climb every mountain and ford every stream, although the attempt might kill you, and admire the movement of every blade of grass in the wind as you do so. The huge team of developers have thought of nearly everything and made a system that will make the world around your character behave as expected in millions and billions of combinations of events that is completely unpredictable when you let a player lose in an open world.

Well it will behave as expected in almost every case. I personally haven’t had a glitch happen, ever. At least not one that didn’t just crash the game outright, and I’m not even sure I had any of those. Other players have though, and when something odd happens, they try to do it again and figure out what causes it, and how it can be exploited.

Take horses for instance. They roam the BOTW meadows in small herds of a handful or so. They serve as mounts for some enemies. And you can tame one yourself and gain a mount. What you can’t have though is a realistic herd size. That is, unless you do a series of sneaky steps as shown in this video (the link takes you straight to the interesting bit, you don’t need to watch more than 20 seconds or so). Gaming this glitch you can get over 200 horses roaming in the same field and walk among them. Or you can push it up towards 300 and the game will crash on you as simulating all those horses walking around becomes too much for it.

Now that’s just a bit of fun. The people who figured out the glitch took advantage of some behaviors of the game that the developers wanted in a way they wouldn’t have expected. And nothing much changes, except there’s a lot of horses. But the other glitch in the same video is more disturbing. Here you go through some weird steps abusing elements of the game the developers didn’t foresee players would mess with, and the result is not a crash, but a total breakdown of the behavior of physics in the game. Really appreciating how bizarre it is requires some familiarity with the game, but this clip should look weird to anyone. Basically the game loses track of what is up, down or sideways. (There’s a bit in the horse clip where the game fails to turn each horse’s mane along with the horse, but this is more dramatic.)

Now what has this got to do with the future of computerization? The point is that a large team worked for years to make this game behave the way they wanted and the way users would expect. Millions of people have played this game and enjoyed it immensely, not experiencing, or at least not paying much attention to, any glitches. And yet they are there. Physics can break down in the game, and the software has no idea that something is wrong (or right, I don’t mean to anthropomorphize here). It’s obvious to the human eye though, and apparently this error was egregious enough that it’s since been fixed by the developers, but as we continue using computers to take over tasks that we feel they can do better, safer, with fewer resources, or do tasks that we just can’t do ourselves, it’s essential never to lose sight of their inability to notice and rectify obvious wrongs we have failed to account for.

Also, just so no one is fooled into thinking this is an issue with very complicated systems, it doesn’t take much computerization before we humans can be lulled into a false sense of security and fail to notice major errors. Just ask the people who have accidentally traveled to Sydney, Canada instead of Sydney, Australia due to combinations of human error and flawed ticket search systems. 😉 Google could probably have figured that out and warned you, if you also emailed a friend to tell them you were going to Australia.

My mom – an unlikely Assassin

My mom died late in 2011, about seven and half years ago now, and since not very long after that I’ve been meaning to connect with her through playing the computer game Assassin’s Creed. Yeah, I know, that is kind of unusual, but for whatever reason, back in the years 2007-2011, my mom, and, I think, my brothers, played Assassin’s Creed, and Assassin’s Creed II, and I never did.

I can’t remember exactly why, except I haven’t played a lot of games on the PC for the last decade. We both played The Legend of Zelda: Twilight Princess a year or two before that, and since she and dad played it after I’d completed it, I gave them some assistance from time to time, since I’ll google it still wasn’t as much a reflex when we got stuck in a game back then. That was a social experience in rather a limited sense though and it’s not like we spent a lot of time in brooding silences while she wanted to talk about Assassin’s Creed and I didn’t. Still, even though we got along perfectly well and this wasn’t a huge part of her life, and she probably talked to my brothers about it, it was something she did spend a lot of time on, and that I for some reason felt slightly guilty for not caring about. So a while after she died I borrowed the games, intending to give them a go to connect with her in a small way I failed to while she was still around.

It was, of course, not the first game she played and I didn’t. For just over a decade I was first at university and then started one and then another career, while she was working, at times part time, and getting used to having just two, then just one, then no sons living at home. I know she played King’s Quest: Mask of Eternity mostly by herself. To me it was too dissimilar the start of the series. She played some other adventure games of that era as well, that I can’t even remember the names of, something about being a detective? Could be a lot of games, the genre lends itself especially well to the “be a detective” plot.

But way before that, adventure games were always the games she would join us kids in playing. When we first got a home computer (the Commodore 64) and later a gaming system (Nintendo NES) and a PC (a PC) she didn’t do a lot of shooting spaceships in Space Invaders, or jumping on turtles in Super Mario Bros*, or shooting down barrage balloons from a biplane in Knights of the Sky. But she really liked the various quest games, King’s Quest in particular, and even if she was too busy parenting and working to play by herself, these were games where watching and helping whomever was at the keyboard could be as fun as being the player. And before games gave you maps to all the secrets, having someone who enjoyed drawing those maps was a great advantage.

*She definitely did some though, as I remember us making fun of her and dad for jerking the controller up when they wanted to jump. Little did we realize they were just ahead of their time.

I still have the notebook with the map she drew of the very first adventure game we played, Vill Vest (Norwegian for Wild West), a pure text adventure game for the Commodore 64 written in Norwegian in BASIC. A game now so obscure the only search hit, as of writing, for the main antagonist Papirposegutten (the paper bag boy) are dead links to a defunct blog and a single forum post from someone who also played that game and hasn’t found a trace of it anywhere. But we took that game seriously, my mom and I (maybe other parts of the family, but in my memory, mainly my mom and I).

How seriously, you say? My mom, who would later ask for help figuring out how to open her hotmail-account*, reprogrammed the game to remove what was the two main hassles, namely dying, and the carrying limit. Now this was no great feat of programming. The game was written in BASIC, which means you could open the computer file and, someone straight-forwardly, read the computer code to, as she did, find where it said something like carry_limit = 8 and change it to 16, and alter Print “You are dead” goto end to Print “You are dead” goto start. But my mom had no prior experience in computer programming, having the equivalent of a batchelor in Medical Laboratory Science, which in the late 1960s did not include programming.

*Helping my mom with computer stuff is how I realized I had the temperament to be a teacher.

It wasn’t the start of a life of programming, but with the determination of someone who was being thwarted over and over again by this game, she figured out where you could change a GOTO 90 to GOTO 10 (I simplified a bit more earlier) to change:

Du har blitt skutt av papirposegutten
(You’ve been shot by The Paper Bag Boy)
Du er død!
(You are dead!)

and the game ending, to:

Du har blitt skutt av papirposegutten
(You’ve been shot by The Paper Bag Boy)
Du er død!
(You are dead!)
Vil du gå nord, sør, øst eller vest?
(Do you want to go North, South, East or West?)

and keep playing.

We never solved the game though. I don’t know if there even was a solution or if it was all a cruel joke of a home made beta version game gone viral in the days of manual copying of games on cassette tape. (If I ever have to defend my, limited, acts of computer piracy, I’m going to point to the bad influence of my dad and his extensive and premeditated copying of C64 games.) Too bad mom didn’t reverse engineer the solution by finding success messages in the code and working backwards. Our old C64 did not work very well the last time I tried it, and the cassette tapes I tried were all corrupt, but maybe the game still exists in a readable form on dad’s reel-to-reel backup of our game library.

Okay, let’s get back to our time. The only other game I really remember her getting really into was The 11th Hour anyway. Oh, and minesweeper, and solitaire. She for a long time played FreeCell, where you could specify with a number which of thousands of deals you wanted to play, sequentially from number one to gods know how many. But no, back to our time.

Assassin’s Creed is not really an adventure game like the ones that were mom’s favorites early on, but it has some of the aspects, such as an interesting story and exploring a world, and it also has aspects of the game Prince of Persia, which us kids played a lot and I think she liked a little. She was in no way into other combat type games, but it’s not really a fighting game, although success relies on doing quite a bit of fighting, and, on occasion, assassination. The fighting is in fact a slightly annoying distraction from the story and the world. (The whole game was originally criticized for being a touch repetitive.) The fighting is mostly about hitting the attack button at the right time, no great need, or ability, to move around, and even with a score of attackers around you, they will patiently wait their turn and with a quick counter attack with your one attack button you can then gorily dispatch them.

But when you don’t have to kill someone because assassination is the next step in the game or you want the advantages you get from saving citizens from the crusaders that are your enemies, climbing up walls and running along rooftops is often the better option to deal with soldiers chasing you. And a lot of the game is about pickpocketing, surveillance, eavesdropping, and occasionally beating someone up for information and then see them stabbed to death in a cutscene … Okay, it’s pretty violent, but the violence is not the story. You don’t win by racking up the highest body count. There is no body count. But there is a count of how many of the flags strewn across the world you have managed to locate and visit. And there is a story about moral and free will, which is interesting, even if there’s a lot of stabbing.

Having finally gotten around to playing the game I don’t think I’m likely to complete it, for various reasons, like it being a dated game with controls that are terrible on a laptop with no mouse, but I’m still glad I did it, after seven years. It gave me an opportunity to think about my mom and all the things she did in her life that didn’t directly involve me, and also to write this post and reminisce about the things that did.

And maybe some other time I’ll write about my feelings about her unfinished last crossword puzzle where one of the solved words, written in the shaking hand of someone in very bad health, is “death”.

A punny dream

I made up a terrible pun in a dream I had last night. You might already know the pun, because I’m going to share the pun alone without all the context where ever I link to this blog entry, so don’t be disappointed when you get to the end of this without a big payoff.

The dream was long, weird and confusing, various family members and friends made appearances, there were amusement park stuff and car races, or at least I think there were, the details are all lost and I only have the vaguest of memories of what happened before the ending.

So let’s jump to the ending. Somehow the dream switches to a celebration of someone’s 10th(?) anniversary as the host of a terrible reality show. I recognize the guy, but I can’t quite place him. Not a reality show host in real life, but an actor maybe, a very blokey Englishman. Oh, I just had this hunch that he’s been on one or more of the many British panel shows. Let me check the list of guests on Would I Lie To You.

Yup! Jason Manford. I’m fairly certain that’s who it was. Celebrating 10 years hosting a show where, among other things, small children were fighting hyenas. That’s what was happening in my dream in a clip show kind of manner that seamlessly turned into me being present in the action.

Children of around five years of age, dressed up in not-very-good protective gear, fighting hyenas that, with the hindsight and an awake brain, were kind of small, all for the entertainment of the masses. A sad indictment of our times, really.

Anyway the children are attacking the small, not all that ferocious, hyenas. There are maybe five children and three hyenas. And then one of the children’s headgear comes off, possibly because it’s made of wicker or old fishing nets or something in between.

Worried that one of the beast will eat the child’s face, possibly good television, but definitely bad for the production company’s insurance, I, and several others, restrain the animals. We do this three people two each lion. Oh, the hyenas are lions now, I’m not sure exactly when that happen. One person is hugging the back and holding the hind legs together, one hugging the torso and holding the front legs together and one holding the head so the big teeth don’t eat either of the other two people.

And while we’re doing that the ambulance arrives, or school bus, or … emergency task force? Possibly another dreamworld hybrid, and for some reason I’m both still hugging the front of a very tiny lion, more like a big dog, and visually and audibly present inside the school bus/emergency task force command center, and feel the urge to heckle the woman in charge who’s sent her people out to more properly restrain the lions that used to be hyenas. I don’t know if anyone has bothered rounding up the children in the padded suits and fish net helmets.

Anyway, I ask the chief EMT:

Why didn’t you instruct them not to get eaten? What will you do if they come back eaten?

And one of the school bus passengers pipe up:

Tell them to apply to Yale.

And that’s the very bad pun I made up just before waking up this morning.

You’re welcome.

Brød! Brød! Brød! Brød!

Denne blogposten inneholder en brødoppskrift, men er ingen oppskriftspost. Ikke fordi den kommende oppskriften ikke er god, men fordi jeg fortsatt jobber med å perfeksjonere framgangsmåten, så neste gang jeg baker kommer jeg til å gjøre ting littegrann anderledes.

Nesten alt brødet jeg spiser her i USA er hjemmebakt. Merkelig nok finnes det ingen butikker som selger Norsk Fjellbrød og alt av “hverdagsbrød” er rart og kjipt, så jeg har brukt mye tid på å bake selv og eksperimentere med brød.

Den første varianten jeg fant grei nok var et mellomgrovt bakemaskinbrød fra oppskriftsboka til bakemaskinen. Det var langt bedre enn butikkvariantene, så jeg var tilfreds en lang stund, men så begynte jeg å analysere svakhetene ved brødet. Det var litt lite grovt, men samtidig litt mer kompakt enn jeg var tilfreds med og jeg begynte å lete etter alternativer.

En lang periode gikk det i et “ekstragrovt” (etter Amerkansk standard) brød med svært omstendig oppskrift. Finmel, vann og litt gjær boblet på benken mens grovmel og melk trutnet i kjøleskapet over natten, så ble det lagt til ganske store mengder fett og honning mens eltemaskinen jobben disse to sammen. Vel, før det var det en del jobb med å dele opp den kompakte klumpen trutnet grovmel. Tre runder heving og 40 minutter i ovnen gjorde at hele prosessen krevet fokus på brød en halvtime om kvelden og 4-5 timer dagen etter.

Dette brødet var nærmere målet, men det var ikke helt der, det var skrekkelig mye jobb og det var litt mye sukker i prosessen etter min smak. Så en stund etter at vi falt tilbake til bakemaskinbrødet av latskap begynte jeg å tenke på brød igjen.

Denne gangen gikk det opp for meg at om jeg ville ha norsk brød burde jeg ta utgangspunkt i en norsk oppskrift. Og det er nettopp det dette er, en helt rett fram norsk oppskrift for et mellomgrovt brød i bakemaskin, som jeg nå smått om senn tilpasser baking i form i ovnen for å få bedre brødskivestørrelse og mer brød pr. baking.


Gir 2 brød

  • 5,2 dl lunkent vann
  • 3 ss olje
  • 2,5 ts salt
  • 3 ts sukker
  • 185 g sammalt hvete
  •  230 g sammalt rug
  • 500 g “brødmel” (siktet hvetemel med høyt proteininnhold)
  • 2,5 ts tørrgjær (planen min er å bruke bare 2 ts neste gang)

Bland alt sammen og elt masse. Jeg kjørte 10 minutter i eltemaskin, halvparten på ganske høy hastighet og et par minutter på kjøkkenbenken.

La heve til dobbelt størrelse (35 minutter? 45 minutter var litt for lenge sist jeg prøvde), trykk litt ned i midten av deigen og brett så inn sidene. Først en side, drei bollen 90 grader og repetér sju ganger til (men du trenger ikke dreie bollen siste gangen). La heve til dobbelt størrelse igjen. Ta deigen ut, del den i to og klem hver leiv ut til et flatt stykke like bredt som brødforma er lang. Rull til en rull, klem sømmen godt sammen, og legg i smurt form. La heve i 25-30 minutter til den stikker en cm eller så opp over kanten på forma.

Ovnen har du forvarmet til 250 grader, men du setter den ned til 200 når du har satt brødene inn. Stek i ca. 45 minutter, til brødene når kjernetemperatur 96 grader.

Neste gang er planen min å redusere gjærmengden litt, la brødene heve litt mindre i de to første rundene og litt mer i brødformene, og å sette dem på pizzastålet (en 5 mm stålplate som gir noe av samme effekten som pizzastein) i ovnen i stedet for rist.

Kanskje jeg rapporterer tilbake om resultatet.

Basic science experiment

This is a very basic science project/introduction that I came up with. I wouldn’t even have bothered writing it down if it hadn’t been for the fact that I came up with it in a dream. I dreamt I suddenly realized I had a science class to teach in 45 minutes, with students I knew nothing about, and also needed to have breakfast and get to work. It had all the makings of being a version of a near-nightmare I’ve had now and again since university, but in this case I turned it around by quickly coming up with this project.

The basic premise is to measure the temperature of warm tap water. That’s a question so simple students of any age can have good ideas on how to design an experiment and yet full of opportunities to discuss uncertainty and potential effects of the experiment setup on the results. The more experienced the students, the more you can demand they do multiple measurements and find ways to control for or eliminate heat absorption in the lab equipment and deal with accuracy of the measuring devices.

And if they find it easy, it’s a breeze to expand on what they’ve learned to give them new challenges. How fast does it cool down? How long does the water have to run until it’s at max temperature? What kind of cup or mug keeps it warm the longest? (Now I’ve actually done that last one once or twice, so that probably helped my dream self come up with the basic idea.)

Misbruk av helse-statistikk

NRK slår opp sak fra “Samhandlingsbarometeret” i Sogn og Fjordane om “overraskende” forskjell mellom levealder i Lærdal og Aurland. Det er vanskelig for meg å gå inn i grunnlagsdataene og bevise at dette skyldes statistiske tilfeldigheter i to små kommuner, men “Samhandlingsbarometeret” har gjort det enklere for meg i sin egen presentasjon, for der presenteres også omfanget av Tidlig død like dramatisk.

“Samhandlingsbarometeret”, kanskje forsker Hans Johan Breidablik (lege med doktorgrad) som uttaler seg til NRK, skriver at “Igjen ser vi at menn i Aurland har tydeleg aukande dødelegheit, medan menn i Lærdal har avtakande dødelegheit over tid.” Og grafen ser skummel ut. I 2003-2012 ligger Aurland på rundt 350 og Lærdal på rundt 250 og i 2007-2016 har Aurland økt dramatisk til 400, mens Lærdal har sunket til 200.

Dette er dødsfall før fylte 74 år og har i følge artikkelen i seg “årsaker som kan være førebyggbare i noko grad“, så her må vi inn og se om vi kan finne ut hva som dreper så mange Aurlendinger, eller hva? Men vent nå litt. Grafen sier at dette er dødsfall pr. 100 000 og hvert datapunkt er spredd ut over 10 år. Hva betyr det egentlig for små kommuner som Aurland og Lærdal?

Jo, om vi slår opp befolkningstall for Aurland og Lærdal og bedriver litt matematikkmagi finner vi at det i den første tiårsperioden var 6 personer i Aurland og 5 personer i Lærdal som døde før fylte 74, mens det i den andre tiårsperioden, som overlapper den første med 5 år, var 7 personer i Aurland og 4 personer i Lærdal.

Kanskje det faktisk er høyere dødelighet i Aurland av en eller annen grunn, men denne statistikken er ikke egnet til å oppdage det.