1

My earlier question How should I restrict the points considered in each hexagonal lattice to correctly count all unique near-coincident lattices? turns out to have an excellent and instructive answer, primarily because I'd left out part of the question I'd planned on posting.

Please see How should I restrict the points considered in each hexagonal lattice to correctly count all unique near-coincident lattices? for the setup to this question, but now with the added constraint that the absolute values of the indices $(i, j), (k, l)$ will be limited to some finite size with a parameter $n_{max}$ such that $|i| \le n_{max}$, $|j| \le n_{max}$ and $|i+j| \le n_{max}$ which forms a hexagonally bound array of points when $x = a \left(i + \frac{1}{2} j\right)$ and $y = a \frac{\sqrt{3}}{2} j$.

A further constraint for my problem is that $a_2/a_1$ is irrational and fixed. This is the reason for the finite $\delta$. For a small $n_{max}$ there are usually no solutions, but opening up $\delta$ to say 0.01 allows for some near-coincident lattice matchings; we're essentially stretching or compressing the 2nd lattice to "make it coincident" with the first.


Question: How should I restrict the points considered in each hexagonal lattice to correctly count all unique near-coincident lattices when $(i, j)$ are limited by $n_{max}$ as described above?

I know I should restrict my search to a pie-shaped segment of all points in each of the two lattices, perhaps a 30° slice of one against a 60° slice of the other, but I haven't been able to convince myself that this guess is mathematically sound.


Example of a proper coincident lattice: $(i, j), (k, l) = (5, 4), (2, 3)$ with $\frac{a_2}{a_1} = \sqrt{\frac{61}{19}}$ and $n_{max} = 16$ with cuts at $0 \le \theta_{ij} < 60°$ and $0 \le \theta_{kl} < 30°$. This finds exactly one coincidence point. Are these angle restrictions correct to find all near-coincident solutions? Ignoring solutions with lowest common denominators $LCD(i, j, k, l) > 1$ will help avoid some redundancies.

example of coincident lattice with angle restrictions

uhoh
  • 1,864
  • By reducing the bounds for lattice size, we merely filter those values for the $a$ ratio that are too far from any legal exact lattice. Since there are still uncountably many real numbers within any neighborhood of a particular number, this isn't going to help much. – Dan Uznanski May 11 '20 at 16:21
  • @DanUznanski this is extremely helpful because it shows me how poorly I'm doing explaining the problem! I'd forgotten to say that for the problem I want to solve $a_2/a_1$ is both irrational and fixed. Given those and a small $\delta$ and small $n_{max}$ there are frequently zero or just a few solutions. – uhoh May 11 '20 at 16:28
  • @DanUznanski I've edited the question accordingly. It's past midnight here; I'll have to leave this as-is until morning, but I think with the added explanation it should be clear. Thank you very much for your help! – uhoh May 11 '20 at 16:33
  • Help with proper tagging is appreciated! – uhoh May 11 '20 at 16:39
  • 1
    oh. Okay this is a different problem and indeed warrants an answer in a different field entirely! This appears to be a problem near [tag:continued-fractions], which is the field we usually use to describe fractions that iteratively approach a target number, keeping the denominator as small as possible. For my $\pi$ example on the other question I have simply used an exhaustive search, trying every possible ratio with a given denominator and then proceeding to the next, but I bet there's a better answer if you know what you're doing. – Dan Uznanski May 11 '20 at 20:31
  • @DanUznanski I've added an additional figure to highlight that my question is about angular restrictions. – uhoh May 12 '20 at 03:12
  • 1
    Possible connection with Goldberg-Coxeter contruction (https://en.wikipedia.org/wiki/Goldberg%E2%80%93Coxeter_construction) – Jean Marie May 12 '20 at 10:10
  • @DanUznanski I've posted an answer that seems to work for me. – uhoh May 14 '20 at 22:56

2 Answers2

1

If you're trying to pick points geometrically you are working too hard.

here's how it's really done, with the example of finding a decent match for a size ratio of $x = \pi$.

In this we will be iterating over the Loeschain numbers, which is equivalent to considering points in order of euclidean distance from the origin.

We'll start with $a_2=1$, using $k=1$ and $\ell=0$. We now find lower and upper $a_{1-}$, $a_{1+}$ and corresponding $i_-,j_-, i_+, j_+$ by starting at $\lfloor x^2 \rfloor$ and $\lceil x^2 \rceil$ and going down and up respectively until we land on Loeschian numbers. Then $p = a_{1-}/a_2$ and $q = a_{1+}/a_2$ are our current best approximations -- well, the squares of the best approximations; working with integers is less of a pain in general.

Repeatedly: increment $a_2$ to the next Loeschian number. Calculate $a_2x^2$ again, and also $a_2p$ and $a_2q$. Starting at $\lfloor a_2x^2 \rfloor$ and $\lceil a_2x^2 \rceil$, again go down and up respectively to find Loeschian numbers... but if you reach $a_2p$ or $a_2q$ before that happens, give up: something earlier worked better. On the other hand, if you do find one, then you can update $p$ or $q$ as appropriate.

This can go on forever, so long as it's never true that $a_2x^2$ is itself a Loeschian number; in that case you've found an exact match.


So, for $\pi$:

  • $\pi^2 \approx 9.9$, so our starting point is $p=9$, $q=12$
  • $3\pi^2 \approx 29.6$, and we find $3\cdot9 < 28 < 3\pi^2 < 31 < 3\cdot12$, so now $p=28/3$, $q=31/3$
  • $4\pi^2 \approx 39.5$, $4\frac{28}{3} < 39 < 4\pi^2 < 4\frac{31}{3}$ -- this time, we don't find a better upper bound, so only $p$ changes, to $\frac{39}{4}$.
  • $7\pi^2 \approx 69.1$, and in this case we don't find any thing that improves the situation.
  • Proceeding in this fashion we get $q = \frac{91}{9}$, $q = \frac{121}{12}$, $p = \frac{127}{13}$, $q=\frac{129}{13}$, $p = \frac{157}{16}$, $q=\frac{208}{21}$, and $q=\frac{247}{25}$, and so on.

Not all the numbers we get are optimal: $\frac{157}{16}$ isn't as good as $\frac{129}{13}$, but it is on the low side instead of the high side so we get to keep it for now to keep us on track.

Dan Uznanski
  • 11,025
0

I believe I've solved my problem but I don't know how to offer a formal proof for this.

It's clear that it is sufficient to include only the points in $0 \le \theta \le 30°$ from each lattice in order to find all possible lengths in each.

Each lattice is 6-fold symmetric so rotations from one lattice to the other are only unique within for example $-30° \le R \le 30°$ range, and every rotation at $+R$ will have a mirror point at $-R$

So use points in each lattice within $0 \le \theta \le 30°$ and for every rotation $\mod(R, 30°) \ne 0$ include a second rotation at $-R$.

hexagonal lattice

plot: https://pastebin.com/fnxGV3Yc

uhoh
  • 1,864
  • 1
    You will note that every point in the $30°$ wedge has $0 \le j \le i$; searching this segment is equivalent to trying Loeschian numbers, generating them using for (i = 0; i <= n; i++) { for (j = 0; j <= n; j++). The conceit of considering angles and all that is actually way overkill for this problem once you've reduced it to number crunching like this. – Dan Uznanski May 14 '20 at 23:15
  • @DanUznanski thanks for the insight; now that I have a picture to work with I can revisit your other answer and try to look at this as a mathematician would. Please feel free to add a math-based answer here, even a short one. It would likely be the accepted answer and more useful than this one. – uhoh May 14 '20 at 23:22
  • @DanUznanski I'd gotten sidetracked but back on it now, and I've just asked Test if a point on a hexagonal lattice falls on a specified superlattice? – uhoh May 29 '20 at 14:04