Saturday, March 23, 2019

Rose VIII: Those Pesky Even Rules

Now, it’s time to tackle those annoying even rules. Unlike the odd rules, they don’t play nice. I wasn’t able to find proofs or perfect colorings like I could with the other rules – it took a long, inelegant, case-by-case proof to show that ¾ coloring isn’t possible for the “four colored points in a row” case. It's summarized in this earlier post in flowchart form, if you're intensely curious. Here, I'm only going to explain how and why the standard technique doesn’t work.

Throughout these problems, our technique for coloring as much as possible has always been this: color as many as you can along one axis, leave one point uncolored, color as many as you can again, repeat. Then, do the same thing on the next row, but start a few points over, so you don’t have two uncolored points in a row in the other direction. That’s the technique that can never work for an even isometric rule.


The best way to explain this is to try it. Let’s say we pick some stagger, and we plan to repeat that stagger to get the best coloring for an even rule “n colored points in a row”. Now, the number of spaces you stagger it by must be relatively prime to n. Look at the example below, where the rule is n=4 (“4 colored points in a row is not allowed”) and the stagger is 2.


The stagger will never put an uncolored point in rows 1 and 3, so we have to use a stagger of 1 or 3, because they’re relatively prime to 4. But that doesn’t work either. Look at this same picture another way. A stagger of 2 in that direction is a stagger of 3 in this direction, and this direction works.


When you pick a stagger for the next line, you’re actually picking a stagger pair. The stagger in the two directions will always have a difference of 1, just due to the geometry of the isometric grid. And these two numbers have to be relatively prime to your n. And of course, of two consecutive numbers, one must be even, so you can never have a repeating stagger for an even rule. Odd rules work just fine, because they can be prime, and even if they aren’t, the stagger pair 1 and 2 will always be relatively prime with an odd number (which, non-coincidentally, was the stagger pair I used for the proof last time).

That’s a pretty important finding. The geometry of the grid prevents us from using that technique for even rules. As for other techniques, like varying the stagger per line, I haven’t had much success. I proved that a ¾ coloring isn’t possible with a rule of n = 4, but that doesn’t tell us that we can’t get very close to it.

So we’re left with the task of finding a decent lower bound for the even rules. The consistent bounds I found were just the optimal solutions for the n-1 rule case: the provably optimal solution to “five points in a row” is pretty good for “six points in a row”. I also tried a few interesting ideas, taking suboptimal staggers like the one above and leaving some extra points uncolored to make them follow the rules, and those squeezed out tiny improvements over the earlier bounds. The “four colored points” rule has the lower bound of 2/3 borrowed from the “three colored points” rule, but there’s a configuration with three rows of ¾ and one row of ½, which is 11/16 colored, making it a little better than our bound.


This is a really interesting coloring. Notice how there's a colored-colored-uncolored-uncolored pattern in every fourth diagonal, and in the rows it's a colored-uncolored-colored-uncolored pattern, which come together to satisfy the condition everywhere. There's definitely some good problem ore here, no matter how much tedious work it's buried behind.

But for now, here are my final conclusions on the Isometric Rose problems. Odd rules can be proven to have an optimal coloring given by a (1,2) stagger, with (n - 1)/n % of the space colored. Even rules may not have optimal colorings, and have weak lower bounds of (n - 2)/(n – 1) % of the space colored. Until next time, when I will hopefully have a new problem to talk about!

Friday, January 4, 2019

Rose VII: Odd Isometric Rules


Last time, we proved that the “four colored points in a row” rule can never reach the optimal ¾ coloring in isometric space. Yet somehow, the odd rules are optimal like clockwork.

We’ve got two main directions to go in, at this point. We can look at the simpler odd rules and try to prove that every odd rule has an optimal coloring, or we could look at the complicated even rules and try to find out why they don’t work as well, and try to figure out efficient colorings for them. Let’s do the former in this post.

Warning, there’s a dry-ish proof coming. It’s not thaaaat difficult to follow, but admittedly that’s coming from the guy who wrote it. I’ll try to be extra precise and descriptive, and will illustrate the steps as much as possible.

Wednesday, January 2, 2019

Rose VI: Even and Odd Rules in Isometric Space


Last time, we proved that 1/3 colored was the best you could do on an isometric grid, if your rule was “two colored points in a row are not allowed”. And that’s pretty interesting – it’s already very different from the squares we’re used to. So, let’s so how different other rules are.

The next logical rule to try is “three colored points in a row are not allowed”, so let’s jump in and try our old staircase technique on it. (The colored points are a light yellow, so it’s a little easier to see them.)



I just shifted each row over by one relative to the previous row, and it just works. Our technique didn’t work on the first rule we tried, but somehow it works on this one. We get a nice 2/3 coloring, and it’s very easy to prove it’s the most optimal coloring – 2/3 is the highest percent of any row you can color, so it’s the upper bound for how much of the space can be colored.

So the question here is – when does our shifting technique work, and when do we need to use some other technique / cleverness to get the optimal coloring? Let’s try the next rule, “four colored points in a row are not allowed”.


And as you can see, it just doesn’t work. I tried staggering the next row by different amounts, but they all don’t line up in one of the three directions. It’s interesting that both colorings are perfect in two of the three directions – looking at the patterns left to right and along one diagonal, they’re perfectly three-colored-one-uncolored in a row. But along the other diagonal, there’s one row of alternating colored-uncolored, and then a row of all colored (which breaks the rule).

This doesn’t necessarily mean that the rule doesn’t have a coloring that is ¾ colored, it just means that we haven’t found it. Before we delve too deep into this rule, let’s look at the next rule – some context of surrounding, similar problems often gives strong insight into a tough nut to crack.


And just like that, the next rule has a provably optimal coloring. All the diagonals work out, and you can kind of see that this is the isometric analogue to a square staircase.

So, a pattern is starting to emerge here. Rules with an odd number of colored points in a row seem to work out nicely, and rules with an even number of points don’t. I did a few more, to make sure the pattern held.

Let’s zoom back in on the “four colored points” rule case. The next logical thing I can think of to try is to try staggering the ¾ row in other ways. If ¾ colored is possible, it’s made of ¾ colored rows, so maybe we can stagger those rows in the right way to find a coloring. This turned out to be a pretty messy case-by-case proof, which I’ve summarized here.


The basic idea is to build up every possible way to stagger the pattern of three-colored-one-uncolored in rows to make the diagonals work out. Anytime a case leads to a situation where you can’t use the three-colored-one-uncolored pattern, you know that that case can’t ever produce a ¾ colored coloring.

I wrote out the first line, and then there are four different ways to stagger the next line, but the later two are just the first two flipped, so there’s two ways this pattern can start. Then, we break each of those into two cases, based on the existence of a particular colored point in the third row. As you can see, if that point, indicated by a red triangle, is in the final pattern, it means that there must be two uncolored points in the fourth row, so neither of those cases can achieve ¾ coloring. If those red points are uncolored, it turns out both of those cases also have two out of four points in the fourth row uncolored.

And so, with this very messy proof, we’ve proved that the optimal coloring of an isometric space with the rule “four colored points in a row is not allowed” can’t ever reach the theoretical maximum of ¾! More on that next time!

Saturday, November 17, 2018

Rose V: Square Wrap-Up and Isometric!


We’ve made a lot of progress on the Rose problems! Last time, we proved that given a rule of the form “N colored points in a row is not allowed”, we have optimal colorings for all square-grid spaces for as many dimensions as we want! That may sound pretty specific, but let’s take a broader look at just how many cases that covers.

I’m imagining sorting all possible rules into three different categories. They are: rules that prohibit only colored points, like “Three colored points in a row are not allowed”, rules that prohibit only uncolored points, like “Three uncolored points in a row are not allowed”, and rules that have some combination of those rules, like “an uncolored point between two colored points is not allowed”. Sidenote: If you remember from the Rose II definition, I decided to phrase all rules as negative, as “XYZ is not allowed”, because positive rules, like “you must have a colored point between two uncolored points” vanish as we go to infinity, or can be rephrased as negative rules.

If you think about these three categories, you’ll realize that we just solved the first one, for square grids of N dimensions, and the latter two are trivial: color the whole space and you’ll get an optimal coloring that won’t ever need an uncolored point for the rules to apply to.


What I’m saying is, give me a square grid of any dimension and any single 1D rule you can think of, and I can find and prove what the optimal coloring is!

But before we get to the more complicated “multiple rule” cases, let’s look at some alternatives to regular integer spaces. Namely, the isometric space!


This is a beautiful, interesting space. The purple triangles represent the points, and each point has six neighbors! The 2D square grid has two “directions” in which rules can be broken and adds a direction whenever you add a dimension. The 2D isometric grid has three directions from the get-go: one depicted horizontally here, and two on the 60° and 120° diagonals. And it’s even more interesting in other dimensions – I can sort of visualize a 3D isometric space, but it’s not clear to me if it’s well-defined or even exists in higher dimensions!

Let’s jump right in, as usual. For square grids, the easiest, quickest rule has been “Two colored points in a row are not allowed”. Let’s try our techniques on this new space.


And somehow, alternating colored points on the first row sort of… doesn’t work. Doing it means the entire next row must be uncolored. We can repeat this process on the next few rows to get a total of ¼ of the space colored. We can tell that it’s ¼ because of the trick we used for the square grids – find a tile that repeats. The red outlined parallelogram can be used to tile the whole pattern, and it’s ¼ colored, so the space is ¼ colored.


Then, I tried spacing them out more evenly, to get this configuration. It gets us 1/3 of the space colored, using the red outlined parallelogram.

After I found that one, I tried and tried and couldn’t find one that worked better. Maybe this is the best we can do in the isometric space. So then I went about trying to prove it when I hit upon this tile.


A simple, triangular tile, which you can alternate to cover every point in the space. But under our rules, the most colored that this tile can be is 1/3. If we color two points, that means there are two adjacent colored points, and that’s not allowed. And because this tile can tile the entire space, that means that the most colored the space can be is 1/3 colored!

So, we’ve proven that the 1/3 colored space above is the best you can do. We’ve done this by coming up with a space that is 1/3 colored, making 1/3 the lower bound, and using the pigeonhole principle to show that there can’t be anything better. If someone tells me they have a better fraction, I can break the space into these triangles with three points in them, and show that their coloring must have at least one triangle that has more than one colored point!

Next time we’ll look at some other rules for the isometric space, which is already looking much more complex than the square grids we’ve solved! With the rule we solved for today, we got ½ of the square grid colored easily!