Live data from Hacker News

There Are Magic Hexagons of Every Order

gukov.dev

21–30 of 36 posts

Re: There Are Magic Hexagons of Every Order

#21
post #20

Huh, this potential technique seems fairly neat. Thank you for explaining the whole thing in a fairly accessible way. Enjoyable interactive bits as well. An aside is that the playground looked fine on my iPhone. The anticipatory objection of smallness did not materialize.

Thank you, I'm glad you found it readable on mobile!

Re: There Are Magic Hexagons of Every Order

#22
my immediate first thought is that I've never heard of the consecutive constraint before, or that if I have I have forgotten about it. I've only ever heard of a uniqueness constraint, that no number can be used twice, which still achieves the same goal of preventing filling every cell with exactly one number.

Then again, I do mostly remember this in terms of the yet unsolved magic-square-of-squares problem, not the standard magic square.

Re: There Are Magic Hexagons of Every Order

#23
post #19
post #13

I loved this article and its interactive elements. The potential field is an elegant abstraction which really elevates this from a math puzzle into something new. I'd love to see just how Lipschitz continuous, how smooth, the potential field can be; how adding features puts it closer to or further from solutions that fit the consecutive-no-duplicate constraint, say. Adding a smooth 'hill' is probably viable; is a 'ri…

Thanks a lot for the detailed perspective! The potential fields are a curious phenomenon. I feel like - and I haven't verified this in any way yet - the smoothness is dictated by the fact that all values are within a not-so-broad range. Then as you "peel" the hexagon from the outer layer using those 6-rings, building the potential field, each next layer inwards shouldn't changed too much. I had also explored a case o…

Can you clarify what the “potential field” actually is? The text is not really precise, and the little interactive tool has the very curious property that I can set all the potentials to 0 and I don’t get all zeros in the magic hexagon.

I would guess that the smooth mountain-looking structure come from a very simple observation: a gadget consisting, in potential space, of a 2 surrounded by a ring of 6 1’s fully cancels at the center and in the ring immediately around the center and leaves a nice pattern of +1 and -1 residuals in the ring around it. I suspect that, fairly generally, as you try to build out small numbers around the outside of the magic hexagon, you end up with a large pile of things like this in the center, and a sum, even a very noisy one, of things that even vaguely Gaussians, tends to produce Gaussians. (That’s the central limit theorem.)

Re: There Are Magic Hexagons of Every Order

#26
post #13

I loved this article and its interactive elements. The potential field is an elegant abstraction which really elevates this from a math puzzle into something new. I'd love to see just how Lipschitz continuous, how smooth, the potential field can be; how adding features puts it closer to or further from solutions that fit the consecutive-no-duplicate constraint, say. Adding a smooth 'hill' is probably viable; is a 'ri…

I mean the difference operator kind of forces the potential field to have 'derivatives' between -K and K inclusive right? That makes it Lipschitz by definition.

Re: There Are Magic Hexagons of Every Order

#27
post #23
post #19

Earlier quoted context omitted.

Thanks a lot for the detailed perspective! The potential fields are a curious phenomenon. I feel like - and I haven't verified this in any way yet - the smoothness is dictated by the fact that all values are within a not-so-broad range. Then as you "peel" the hexagon from the outer layer using those 6-rings, building the potential field, each next layer inwards shouldn't changed too much. I had also explored a case o…

Can you clarify what the “potential field” actually is? The text is not really precise, and the little interactive tool has the very curious property that I can set all the potentials to 0 and I don’t get all zeros in the magic hexagon. I would guess that the smooth mountain-looking structure come from a very simple observation: a gadget consisting, in potential space, of a 2 surrounded by a ring of 6 1’s fully cance…

Apologies for the confusion - the playground had a typo (7 instead of 8) which is fixed now. Now it works as you would expect, and zeroed potentials correspond to a zeroed hexagon.

The "wide ring" gadget is an interesting idea. I think it will be linear pyramids and not gaussian. A set of these gadgets can also form a basis, and in such a different basis the potential fields may look very different - almost flat, perhaps?..

Re: There Are Magic Hexagons of Every Order

#30
post #8
post #4

Why is not every 45 degree line considered for the rectangular grids? (In the hexagons, all lines are considered even if they don't have the maximum length) (PS: make sure you hover your mouse over the diagrams)

The shortest 45 degree line in a magic square is a single cell, making it somewhat tricky to add up to the same total as the other lines.

Impossible in fact, because there are 4 of them and you can’t repeat numbers
Post reply on HN