# Posts Tagged ‘convexity’

## Vexed by Convexity, part two

March 25th, 2018

Previously, on Vexed by Convexity, we looked at various measures of convexity as applied to the pentominoes. In order to turn these measures into interesting puzzles, we can try to minimize their values for some family of polyominoes. Arrangements of tetrominoes were one that I found to make good puzzles.

Why minimize convexity? Well, we could maximize, but the different measures converge as we approach a convexity of one, so if we want different puzzles, minimal convexity is a better bet. To mangle Tolstoy, all happy (i.e. convex) polyominoes are alike; every unhappy polyomino is unhappy in its own way. On to the problems:

Problem #46: Find the least convex connected arrangement of the tetrominoes, where convexity is defined as Area / Convex Hull Area. Here is my best attempt, with convexity = 20/55.5 ≈ 0.36036: Problem #47: Find the least convex connected arrangement of the tetrominoes, where convexity is defined as Convex Hull Perimeter / Perimeter. Again, my best attempt, this time with convexity = (14 + 5√2) / 40 ≈ .5268: You might be expecting the probabilistic definition of convexity defined in the previous post to be next, but it’s a little unsatisfactory. Checking enough segments to have a good estimate would be computationally intensive, and it’s hard to know how many segments is enough to separate any pair of polyominoes that are competing for minimal convexity. (Presumably there is some way to calculate exact values, but I don’t know it.)

But we can cheat. If we check only segments connecting the centers of squares, we have a reasonably bounded quantity of segments to check. This is at the expense of no longer having a valid convexity measure (for example, this method would find the P pentomino to be convex.) But that’s fine; what we really care about is just having a good puzzle.

Problem #48: Define the “convexity” of a polyomino as the proportion of segments connecting the centers of squares within the polyomino that remain entirely within the polyomino. (The border counts.) Find the least “convex” connected arrangement of the tetrominoes. My best attempt, with convexity = 51/190 ≈ .2684: ## Vexed by Convexity, part one

February 2nd, 2018

Last September I came across a conversation on Twitter about how convex the 12 pentominoes are. At first glance, this might seem like an uninteresting problem. Clearly, the I pentomino is convex, and the rest aren’t. (Recall that a shape is convex if, for any pair of points inside the shape, the segment connecting them is entirely within the shape. Otherwise, we call it concave.)

But the problem wasn’t whether the pentominoes are convex, but how convex they are. In order to answer that, we’d like a measure that gives 1 for a shape that is convex, and ranges between 0 and 1 for concave shapes, getting higher as they more closely resemble some convex shape.

There are several measures that work. (For a discussion of convexity measures, see this paper by J. Zunic and P. Rosen.) One strategy for measuring convexity is to consider a shape in relation to its convex hull. A shape’s convex hull is the smallest convex shape it is contained in. Naturally, a convex shape is its own convex hull. The ratio of the area of a shape to that of its convex hull makes a reasonable measure of convexity. Or instead of areas, we could instead look at perimeters. The perimeter of a shape can never be less than that of its convex hull. So the ratio of a shape’s convex hull’s perimeter to that of the shape itself can also be used as a convexity measure.

Another method of measuring convexity is the probability that the segment between two points in a shape chosen at random lies entirely within the shape. Finding exact values for this measure can involve some tricky math, which Dan Piponi worked through for the P pentomino. However, calculating an estimate by randomly picking a large number of pairs of points is also an option. And, as it happens, Rod Bogart did exactly that.

The following table shows the convexities of the pentominoes according to each of these three measures.

 Pentomino, shown with convex hull Area / Convex Hull Area Convex Hull Perimeter / Perimeter Probabilistic method .7143 .8387 .786 1 1 1 .7692 .9302 .822 .7692 .8875 .778 .9091 .9414 .946 .7143 .8726 .788 .8333 .8333 .708 .7143 .9024 .748 .7692 .8536 .772 .7143 .8047 .840 .7692 .8875 .854 .7143 .8726 .720

Convex hull area method data by Vincent Pantaloni. Convex hull perimeter method data mine. Probabilistic method data by Ron Bogart.

Even though these shapes are pretty simple, the data above shows that the different convexity measures treat them differently in interesting ways. Notice that the X pentomino, for example, is tied for the least convex pentomino by the convex hull area method, but is the fourth most convex by the probabilistic method.

I hope I’ve shown that convexity, as applied to polyominoes, is more interesting than it might have seemed! In part two, I’ll look at how we can use these convexity measures to make some new puzzles.