# What is an Awry Grid?

If a 4x4 grid (where each cell contains an arrow in an orthogonal direction) conforms to a special rule, I call it an Awry Grid. If it does not conform to this rule, I call it a Aright Grid.

Here are some examples (click on an image to view larger version):

Awry Grids Aright Grids

For a full answer, you must figure out two things:

1. A rule to determine if a given grid is awry or aright
2. A way to make each awry* grid into an aright grid, only by changing the value of a single cell within the grid, which is not the first cell marked by red (0,0). Once you figure out 1), there might seem to be multiple ways to do this, at first. But for each grid, there is only one correct operation in order to achieve this. Finding this may require digging a little bit deeper into the structure of the grids.

(*) There are special cases of awry grids, I call them Lost Grids. You cannot (properly) turn a lost grid into an aright grid. There are no cases of lost grids in this puzzle, but this note might serve as a little hint.

Hint #1:

If you want to create an awry/aright grid, you can fill most of the cells with random values. That doesn't mean that they're not important, since their interplay with the cells which are not random is the crux of this puzzle.

Hint #2 (fairly big):

Here's another aright right. The presentation reveals more about the structure:

Every 4x4 awry and aright grid can be presented in this way (i.e. the orange mark & yellow marks are always in the same place). And I'm going to spoil it right away, continuing from hint #1: When creating such a grid, all of the 11 unmarked cells can be random. Marked cells have to be filled with fitting values, depending on which type of grid you want to make.
The position of the yellow marked cells were not chosen arbitrarily, which is why I think it's fair to not include them in the original puzzle right away.

Furthermore, another hint/clarification: I already said that an awry/aright grid can be created with something different than four different arrows. I could've also used a cat, the number 42, a toilet and a nice picture of Richard Hammond as the four different values. The symbols are simply there to distract you from the nature of the puzzle. To make it more abstract, there are just 4 different states, and that's all you need to know about the symbols.

Hint 3:

For posterity: xhienne and Gareth correctly pointed out the grids resemble Hamming Codes

This is more of a public answer to Gareth's comment:
It's clear that this is something like the correct answer. I've tried various different ways of interpreting the arrows (values mod 4, that have to add up to 0? values in GF(4), which for our purpose is just C2 x C2? ...) and so far I haven't found anything that seems to make the Aright Grids right and the Awry Grids wrong

Extremely close, I think Gareth intuitively chose the arguably more elegant (for a few reasons) way to 'transform' ___ into base 4. I chose 'another' way, which is less beautiful, but I thought it would be the easier one to come up with. Apparently not :) In that case, it may be helpful to think about how to determine the value of parity cell when creating such a grid, rather than 'checking' a filled grid.

Notes:

• You can easily make awry and aright grids using other specifications than 4x4 + four different arrows. This is simply the configuration I chose for this puzzle
• The graphical elements are from here and here.
• Just to make sure there's no misunderstanding: the "special rule" defines Awry grids, and the ones which do not obey that rule are Aright, but every Awry can be made Aright in a unique way? I.e. there's only one way to get out of satisfying that special rule? Jan 12, 2021 at 8:46
• @Randal'Thor Yes, that's correct, except for the special cases of lost grids (which are a subset of awry grids), but those do not directly find their way into this puzzle anyway. To make any of the presented awry grids into an aright grid (i.e. stop satisfying the rule) in one "move" (changing the value of a single cell), there is only one possible way to do this. Jan 12, 2021 at 8:57
• Are the colours given in the original grids and hint #2 speciifc? Could you have drawn them in, say, blue and red without changing the solvability of the puzzle? Jan 13, 2021 at 13:37
• @Vicky No, the choice of colors is not significant. Jan 13, 2021 at 13:37
• I may be onto something but I can't get everything right. Can you confirm rot13(gung va gur 4gu njel tevq inyhr k,l=3,2 zhfg or punatrq(3,2)? naq gung va gur 5gu njel tevq inyhr k,l=0,3 zhfg or punatrq?) Thanks Jan 14, 2021 at 0:45

I think a grid is Aright iff

when we number its entries in the "obvious" fashion starting from 0 (top row is 0,1,2,3; last row is 12,13,14,15) the following subsets are constrained in a way to be described in a moment: (0) all of the entries, (1) all the entries in odd positions, (2) all the entries in positions that are 2 or 3 mod 4, (3) all the entries in positions that are 4-7 mod 8, (4) all the entries in positions 8-15. Equivalently: (0) all the positions and (j) all the positions with bit j-1 set in their binary representation. So, what's the constraint? It's that that if you translate arrows into values mod 4 so that URDL=0123, the first arrow in the subset has the same value as the sum of the values of all the other arrows in the subset. (There are other possible assignments that produce equivalent results; we need that U,D are 0,2 in some order and that L,R are 1,3 in some order. Can switching the values assigned to U,D or the values assigned to L,R invalidate one of our relations? No. If x=xxxxxxx there must be an even number of L+R in total, hence also an even number of U+D in total. So if we interchange U,D we make an even number of changes-by-2 and therefore change nothing; likewise if we interchange L,R.)

An Awry grid is one that is not Aright but where (in comparison to Lost grids)

if you look at the j for which condition (j) fails, let n be the sum of these j, and consider the changes you would have to make to arrow number n in order to fix each failing condition, the changes are all the same. (In a binary Hamming code, on which these things are based, this is necessarily true because there is only one possible change.) Oh, and also: doing this leaves condition (0) also holding.

To make an Awry grid into an Aright grid,

make that change to arrow number n.

Historical note: xhienne came up with basically the right idea and made some slightly-cryptic comments that made it clear to me what he (rightly) thought was going on. I initially thought I'd figured out a variation on that theme that actually worked, but I'm a moron and had not; I'd just thought of the same things as xhienne had. So the first version of this answer was all wrong. Lukas's hint #3 made everything clearer and now I feel stupid for not thinking of making the relevant change :-). Anyway, if you like this answer and feel any inclination to upvote it, a lot of the credit actually goes to xhienne; you might want to look for something they posted that merits an upvote and give it one.

The specific thing hint #3 told me is

that we're looking for relations like x=xxxxxxx rather than 0=xxxxxxxx. For a binary Hamming code, these are equivalent and the latter formulation is nicer, and although I thought about working mod 4 I didn't notice that this made those two things different so I never tried the x=xxxxxxx version until I read hint #3.

Relevant link (spoilered for being too relevant):

https://www.youtube.com/watch?v=b3NxrZOu_CE (you should really watch part 1 first, but this is the more directly relevant one).

• I think the answer is incomplete because we don't know how we should choose between, say, left and right for a non-random cell (and rotate in which direction to "fix" an Awry into an Aright). Jan 15, 2021 at 0:18
• (relevant Wikipedia articles: the yellow cells form big spoiler and the orange one is another spoiler) Jan 15, 2021 at 0:27
• Out of curiosity, re the linguistic side of it: Is Aright alluding to a rot13("ENVQ"), more specifically. rot("ENVQ2"), @LukasRotter? Jan 15, 2021 at 0:40
• Didnt think of that, no Jan 15, 2021 at 0:52
• Ok, sorry if all my deleted comments showed up in your feed. I think your explanation fails on for example awry #2, unless I'm misunderstanding. Jan 15, 2021 at 1:38