Technology, Knowledge and Learning

, Volume 16, Issue 1, pp 97–102

# Computational Diversions: The Game of HullGrams

## Authors

Computational Diversions

DOI: 10.1007/s10758-011-9178-x

Eisenberg, M. Tech Know Learn (2011) 16: 97. doi:10.1007/s10758-011-9178-x
• 59 Views

This installment of the computational diversions column introduces a new game (at least I think it’s new, and original–I haven’t seen it anywhere before). The game is called HullGrams, which is intended to suggest a blend of the classic mathematical pastime of tangrams with the geometric notion of a convex hull.

By way of preface–before we get to the rules of HullGrams–let’s begin with its inspiration in the puzzle of tangrams. Many readers will be familiar with tangrams; but for those who have never seen the puzzle, books such as (Crawford, 2002) and (Read, 1965) are recommended. Martin Gardner, in his Scientific American column, discussed the pastime and researched its history (Gardner (1988), chapters 3–4); that history, by the way, is resolutely less romantic than the fable originally spun by the larger-than-life American “puzzle king” Sam Loyd, who did not invent tangrams but popularized it early in the twentieth century. Briefly, the basic idea of the tangram puzzle is that we are provided with a set of seven geometric pieces: five of these are isosceles right triangles (two large, two small, and one medium-sized), one is a square, and one a parallelogram, and all angles within the shapes are multiples of 45 degrees. By placing the seven shapes flat on a plane in different arrangements, we can create an astonishing range of composite shapes.

The essential idea of the tangram puzzle is conveyed in Fig. 1, which shows at left a photograph of my own set of plastic pieces, arranged to form a square. A typical tangram puzzle will begin with a solid black silhouette (think of this as the “goal shape”), and the job of the player is to arrange the pieces so that their overall silhouette matches the goal shape. In Fig. 1, then, the simple black square shown at right would thus be the goal shape for the arrangement at left.

I could spend much more time on tangrams, but there is already an extensive literature; and my hope is that by now you’ve gotten the idea, even if this is your first encounter with the puzzle. For those who have spent time with tangrams, you will probably have observed that in fact most goal shapes are pretty easy to match. The truly tough puzzles are the ones with relatively simple silhouettes, like the square in Fig. 1; but most goal shapes are more challenging in their original composition than they are in their solution. That is, it’s hard to create a silhouette for a recognizable tangram bunny, or fox, or sailboat; but it’s not hard to solve those puzzles. If you don’t believe me, take a look at some of the compilations of tangram puzzles: you’ll find that the simple outlines correspond to the tough puzzles, while the complex outlines are easy to match.

That’s where HullGrams comes in. Let’s begin with an easy version of the game, which I’ll call “HullGrams Version 1” (or maybe “HullGrams Lite”). Here are the rules:
1. (a)

We begin with only four pieces, all of which are squares of equal size. (If you like, for simplicity, you can think of these squares as each having a side-length of 1 unit.)

2. (b)

We arrange the four squares on a planar surface (such as a table) so that all the edges are horizontal or vertical, and so that each square meets at least one other along an edge or at a vertex. The squares cannot overlap; that is, all four squares must lie flush on the table.

3. (c)

Now we take the convex hull of the combined vertices of the squares.1 This hull is the “outline” that has to match a given goal shape.

Figure 2 shows an example of the construction of a HullGrams Lite puzzle. At left, we have a legal arrangement of our four squares: all edges are horizontal or vertical, and neighboring squares share an edge or vertex (in this case, all neighbors share an edge). In the center, we show the original four squares augmented (by a solid black region) to form a convex hull. The “goal shape” version of the hull–the solid black version–is shown at right.

Note that Fig. 2 illustrates the construction of a sample HullGrams puzzle. This is the inverse of the sequence by which we would solve a puzzle. Typically, we would begin by showing the undifferentiated silhouette at right (the goal), and the job of the puzzle-solver would be to arrange the four squares so that they fit within the goal outline.

Figure 3 shows another HullGrams Lite puzzle, but this time the pictures are shown in the “puzzle-solving” order rather than in “puzzle-construction” order. At left, the goal shape is shown as a black silhouette; at center and right, we see the pattern of four squares that constitute the solution. Again, all squares are oriented with their edges horizontally and vertically, and neighboring squares share either a vertex or edge.
With these two examples as illustrations of the idea, we can now present two HullGrams Lite goal silhouettes in Fig. 4. Your job is to place the four squares inside these silhouettes so that the goal shape is the convex hull of the squares’ vertices. Solutions to these two puzzles are given at the end of this column.
The Fig. 4 puzzles are not especially difficult; in fact, HullGrams Lite in general is not especially difficult. But it’s not hard to expand the original HullGrams rules to make the game more challenging. Suppose, for instance, we retain our original set of four squares (as in HullGrams Lite), but now we relax the constraint that all edges must be horizontal or vertical and allow the squares to be rotated by 45 degrees; thus, all edges must be horizontal, vertical, or rotated from these “standard” directions by 45 degrees. We’ll call this HullGrams Version 2. Figure 5 shows the construction of a HullGrams Version 2 puzzle, and Fig. 6 shows two goal shape silhouettes for this slightly more challenging game. The answers to the Fig. 6 silhouettes are given at the end of this column.
Even HullGrams Version 2 is only, of course, a beginning to a sequence of more challenging games. Suppose we now change our set of four squares to a set of four identical trapezoids. The trapezoids have parallel edges of length 1 and 2, and interior angles of 45 degrees and 135 degrees. As in HullGrams Lite, we’ll stipulate that the parallel edges of the trapezoids must be horizontal or vertical; and that neighboring shapes share an edge or a vertex. We’ll call this new version HullGrams Version 3. Figure 7 shows the construction of a HullGrams version 3 puzzle; Fig. 8 shows two goal silhouettes for you to solve using the same set of four trapezoids as puzzle pieces. The solutions to the Fig. 8 silhouettes are given at the end of this column.
We could go still further in creating HullGrams variants. Here are a few natural extensions for more challenging versions of the puzzle:
1. 1.

Allow for more than four component shapes (e.g., allow for five–rather than four–squares in an extension of HullGrams Lite).

2. 2.

Allow for arbitrary rotations of shapes (rather than “standard orientations” as in the HullGrams variations described in this column).

3. 3.

Try different component shapes–equilateral triangles, rhombi, pentagons, or circles might make for fun variations.

4. 4.

Allow for beginning HullGrams sets with more than one type of shape (e.g., one might begin with the seven pieces of the classic tangrams puzzle).

My own feeling is that solving a HullGrams puzzle–particularly for an advanced variant of the game–is considerably more challenging than solving most tangrams examples. Unlike tangrams, where a complex goal shape practically “gives away” the solution, in HullGrams the silhouette goal shape doesn’t reveal so much internal detail. Of course, the HullGrams goal shapes are not as artistic as those of tangrams (because they’re convex shapes by definition, you can’t make a reasonable “HullGrams bunny” or anything of that sort); but the new pastime makes up in visual challenge to the solver what it takes away in artistic challenge to the constructor.

HullGrams might be a good project for a “mixed physical-virtual” computer game. Here’s how an implementation might work: first, we provide a set of physical pieces (of the correct size and shape) for a class of HullGrams puzzles. In the case of HullGrams Lite, for instance, we would provide the solver with four squares made out of cardstock (or even better, perhaps, wood or plastic–like the pieces in my tangrams kit shown in Fig. 1). Next, we have a program that displays silhouettes at the correct scale on a tablet device (such as the iPad). The user’s job is to lay the tablet device down flat so that its surface can act as a sort of “table” on which the physical pieces might then be arranged. Thus, the puzzle solver could visually see when she has solved the puzzle: the appearance of a solved HullGram puzzle will then be something like the middle portions of Figs. 2 and 3, where the physical pieces are placed against the background of the convex hull goal shape. Once a particular puzzle is solved, the user could request another goal silhouette to appear on the tablet display.

Readers are encouraged to suggest their own HullGrams puzzles, or new variants–or, for the ambitious, to try implementing a tablet-device HullGrams program like the one described above. Suggestions and novel ideas along these lines can be sent to this column at: ijcml-diversions@ccl.northwestern.edu.

Footnotes
1

The convex hull of a set of planar points is the minimal convex polygon that contains all the points; if you're of a physical cast of mind, you could think of this as the shape that you would get by stretching a rubber band around the set of points and then allowing the band to "snap closed" on the points, wrapping around them. Algorithms for constructing the hull are a staple of computational geometry texts such as O'Rourke (1998).