Wednesday, October 02, 2024

[okgkwyvp] automorphic rotations of a cube

6 = (6/2)*2 90-degree rotations through a face

3 = 6/2 180-degree rotations through a face

8 = (8/2)*2 120 degree-rotations through a vertex

6 = 12/2 180-degree rotations through an edge

1 identity (no rotation)

the divisions by 2 are to avoid double counting: each face, vertex, and edge pairs with a corresponding one diametrically opposite.  multiplications by 2 are because you can rotate left or right.  sum is 24.  it is nice that all the rotations can be enumerated this way without overlaps.

it can also be computed as (6 faces)*(4 rotations) = (8 vertices)*(3 rotations) = (12 edges)*(2 rotations) = 24.  these can be interpreted as bringing a face (or vertex or edge) to a canonical location, then doing a rotation.

can you visualize a given sequence of rotations?

previously, turning half of a cube.

the octahedron can do the same set of rotations, swapping face and vertex: octahedral group.

a similar enumeration works for the dodecahrdron ((12 + 12) + 20 + 15 + 1 = 60) and icosahedron (same sum to 60).

[lrjzlhie] navigating a 4D maze with WASD

present a 4D maze as an array of 2D slices.  navigate among cells in a slice with the keyboard arrow keys with the right hand.  navigate among slices with the W A S D keys with the left hand.

also possible are the two thumb sticks of typical game controllers.

annotations (perhaps literally the letters W A S D) in each cell signify which WASD moves between slices are available.  the UI is therefore somewhat noisy.

6D analogously possible in 3D.  (unspecified: how to move in 3D.)  as is the norm for 3D, you can't see the whole maze at once.  2^6 = 64 rooms in a 6D maze of order 2 could make a nice little puzzle.  64 is small enough to memorize.

[zbkseudn] 12 faces of the sky

project a dodecahedron onto the celestial sphere, then present each of the 12 faces as star chart images for a monthly calendar.  the images have no correlation with what is visible in the night sky during that month.  (people in urban areas can't see much in the night sky anyway.)

both regular dodecahedron and rhombic dodecahedron would work.  unspecified: map projection of each spherical polygonal face onto flat paper.  regular dodecahedron induces less distortion, but maybe a projected rhombus fits more nicely on a rectangular calendar page.  (but why not pentagonal calendar pages?)

also possible: cube with each face cut in half (pyritohedron) can yield nice rectangular regions.  tetrahedron with each face cut into 3 can yield kites.  (other shapes possible depending on how you cut.)

optimize the orientation of the dodecahedron so that every month has a good collection of labeled interesting objects.  also try to avoid cutting constellations and any other large objects (can't think of any others) awkwardly.  for the regular dodecahedron, a face centered on each of the celestial poles is also desirable.

annotate edges with the name of the month whose map lies beyond the edge.  overlay grid of celestial coordinates (right ascension, declination).

would it be better if the views overlapped?  spherical caps yield circular segments of the sky.  what is the minimum size spherical cap that covers a pentagonal face of a regular dodecahedron (this should be easy)?  how thick should the overlaps be?  maybe variable to avoid cutting constellations awkwardly.

alternative to a star chart: cosmic microwave background.

also possible: various other spherical astronomical bodies (including earth) whose surfaces we've fully mapped.  but these seem less interesting, not looking out at infinity but looking in at something finite.

for a weekly or daily calendar, find equal(ish)-area compact(ish) subdivisions of a sphere into the appropriate number of pieces.  Goldberg polyhedra are pretty.  there exist Goldberg polyhedra of 42 and 362 faces.

[egfgwujd] twin primes adjacent to highly composite numbers

below are some numbers N with many divisors and for which N-1 and N+1 are both prime, i.e., twin primes.

the suffix A indicates a highly composite number (sets a new record for number of divisors among all numbers, not necessarily those between twin primes); B similarly indicates it ties the record for number of divisors (largely composite number); C indicates a new second place in number of divisors; D ties second place number of divisors.

4/A 6/A 12/A 18/A 30/B 42/D 60/A 72/B 108/B 180/A 240/A 420/B 432/D 600/A 660/B 1320/D 2340/D 3360/A 5280/D 5880/D 6300/C 7560/A 9240/A 21840/D 35280/D 42840/B 55440/A 65520/A 92400/D 100800/C 110880/A 128520/B 180180/D 415800/B 453600/D 514080/D 526680/D 540540/D 1867320/D 1912680/D 1921920/D 1940400/C 2489760/D 6652800/D 6846840/D 7068600/D 28828800/B 31600800/B 34594560/D 85765680/D 100900800/C 121080960/D 232792560/A 287567280/D 397837440/D 634888800/D 845404560/D 1259818560/D 1470268800/B 1574773200/D 6299092800/D 10708457760/D 12681068400/B 23827003200/D 32125373280/B 32590958400/C 33816182400/A 34918884000/B 40156716600/B 73329656400/A 135019684800/D 216497080800/B 439977938400/D 449755225920/B 578256719040/D 2126560035600/D 2835413380800/B 2971597028400/D 6278415343200/B 18632716502400/A 18835246029600/C 19275223968000/B 59753194300800/B 62403537596400/D 69712060017600/B 92199821313600/B 130429015516800/A 279490747536000/C 313704270079200/B 448148957256000/D 838472242608000/D 1382997319704000/D 1402111916805600/B 1498809290378400/D

investigated 1169 numbers from 1 to 1516237305382800 in those categories (A, B, C, D) previously generated.  95 numbers (above) are surrounded by twin primes.

inspired by some numbers between twin primes being quite smooth.  if searching for large twin primes (not sure why one would want to do this), is it profitable to restrict to those bracketing a smooth number?  (seems yes.)  if so, how smooth?  perhaps Pierpont, or some other sequence of very smooth numbers.

[vachnlwl] changing square colors every move

knight is the only orthodox chess piece which must change square color every move (parity).  in fairy chess, wazir is another.

for normal movement (not its two square initial move nor diagonal capture), pawn also changes square colors every move.

next simplest are the (0,3) leaper (three-leaper) which obviously cannot reach all squares, and the (2,3) leaper (zebra) which can reach any square.

compose chess puzzles that rely on this parity.  maybe in some chess variant in which all pieces must move every turn.  triangulation is a related technique in endgames.

if a chessboard were colored 4 different colors in a certain way, ferz would also change square color every turn, alternating between 2 of the 4 colors.

[nnlfctcm] (2,3) leaper

zebra or (3,2) leaper is a fairy chess piece that jumps from (0,0) to (3,2) (and 7 other squares by symmetry).

below are the minimum number of moves it takes for a zebra at the square labeled 0 to reach various nearby squares.  it takes 5 moves to make one orthogonal step (wazir move), and 6 moves to reach (3,3).

we only give 1/8 of the plane; extend to the rest by symmetry.  we investigated distances only up to 15 (using a-f for 10-15 as in hexadecimal).  farther out, we stop lines at the first square exceeding 15.  things get less interesting farther out with broad regions requiring the same number of moves plus or minus 1 depending on parity.

previously, similar table for the knight.

0
52
434
5416
23434
525452
2543254
54343456
436365436
5436543456
45454545654
745454765456
4565456545676
56565656567656
656565656765678
7656765676567876
67676767676787678
767676767678767898
6787678767876789878
7878787878787898789a
878787878787898789a98
98789878987898789a989a
8989898989898989a989aba
989898989898989a989aba9a
89a989a989a989a989aba9abc
9a9a9a9a9a9a9a9a9aba9abcba
a9a9a9a9a9a9a9a9aba9abcbabc
ba9aba9aba9aba9aba9abcbabcdc
ababababababababababcbabcdcbc
babababababababababcbabcdcbcde
abcbabcbabcbabcbabcbabcdcbcdedc
bcbcbcbcbcbcbcbcbcbcbcdcbcdedcde
cbcbcbcbcbcbcbcbcbcbcdcbcdedcdefe
dcbcdcbcdcbcdcbcdcbcdcbcdedcdefede
cdcdcdcdcdcdcdcdcdcdcdcdedcdefedef
dcdcdcdcdcdcdcdcdcdcdcdedcdefedef
cdedcdedcdedcdedcdedcdedcdefedef
dededededededededededededefedef
ededededededededededededefedef
fedefedefedefedefedefedefedef
efefefefefefefefefefefefefef
fefefefefefefefefefefefefef
ef
f

future work: color.

[glttrljh] strictly weaker than queen

some fairy chess pieces whose movement is a proper subset of queen moves:

ferz
wazir
commoner (ferz + wazir compound)
bishop
bishop + wazir
rook
rook + ferz

underpromotion of a pawn to any of these will probably be rare.

design a chess variant in which underpromotions are more common.  e.g., you may not promote to a piece you already have.

design a chess variant in which underpromotions are permitted but always disadvantageous.  e.g., game scoring is not done by checkmate or stalemate, but by amount of firepower on the board.

[tfseoksh] chess variants more elegant than chess

we propose chess variants based on correcting "nits" of orthodox chess, things that had made orthodox chess inelegant and complicated.  the given answers to questions below correspond to orthodox chess.  other answers would define variants.

two-square initial pawn push?  Y
(if Y:
  en passant capture by pawn?  Y
  en passant capture by other pieces?  N
)

castling?  Y
(if Y:
  castling while in check?  N
  castling through check?  N
  en passant capture of rook?  N
  castling privilege can be regained by moving king and rook back to starting squares?  N
)

passing?  N
(if N:
  outcome when no moves except king moving into check (win, draw, loss, forced pass)?  draw (stalemate)
  outcome for player with no moves at all (win, draw, loss, forced pass)?  draw (stalemate)
)

black guaranteed same number of moves, e.g., draw by mutual checkmate or both kings captured?  N

underpromotion?  Y (future post mpyfvglu)

50-move rule?  Y

[jshrjuga] direct Fibonacci formula without division

golden ratio:

phi = (1 + sqrt(5)) / 2

the version of Binet's formula for the nth Fibonacci number which uses the round-to-the-nearest-integer function is

F[n] = round( phi^n / sqrt(5) )

if that division by sqrt(5) is annoying, another way to write it is

F[n] = round( phi^(n-z) )

where

z = log( Base phi, sqrt(5) ) = log(5) / (2*log(phi)) ~= 1.6722759381845547461703191263944365539

.

not sure what this would be useful for.  you need exp and log to compute exponentiation by the non-integer exponent, in contrast to simpler exponentiation by squaring for the integer exponent in the original formula.

[mlzpqxqu] import with type signature

proposal for a Haskell language extension: when importing a function from another module, one may optionally also specify a type signature for the imported function.  this would be helpful for code understanding.  the reader would have immediately available the type of the imported symbol, not having to go track down the type in the source module (which may be many steps away when modules re-export symbols, and the source module might not even have a type annotation), nor use a tool such as ghci to query it.  (maybe the code currently fails to compile for other reasons, so ghci is not available.)

if a function with the specified type signature is not exported by an imported module, the compiler can offer suggestions of other functions exported by the module which do have, or unify with, the imported type signature.  maybe the function got renamed in a new version of the module.

or, the compiler can do what Hoogle does and search among all modules in its search path for functions with the given signature.  maybe the function got moved to a different module.

the specified type signature may be narrower than how the function was originally defined.  this can limit some of the insanity caused by the Foldable Traversable Proposal (FTP):

import Prelude(length :: [a] -> Int) -- prevent length from being called on tuples and Maybe

various potentially tricky issues:

  1. a situation similar to the diamond problem (multiple inheritance) in object-oriented programming: module A defines a polymorphic function f, imported then re-exported by modules B and C.  module D imports both B and C, unqualified.  B imports and re-exports f from A with a type signature more narrow than originally defined in A.  C does not change the type signature.  what is the type of f as seen by D?  which version of f, which path through B or C, does D see?  solution might be simple: if the function through different paths are not identical, then the user has to qualify.

  2. the following tries to make List.length available only for lists, and Foldable.length available for anything else.  is this asking for trouble?

    import Prelude hiding(length);
    import qualified Prelude(length :: [a] -> Int) as List;
    import qualified Prelude(length) as Foldable;

Tuesday, October 01, 2024

[ctmlagje] bad idea, worse idea

"no good can come of a game of Bad Idea, Worse Idea."

(tautologically.)