# Hypercubic billiard word

**Hypercubic billiard words**, **cutting sequences**, or **cutting words**^{[1]} can be visualized by considering a point particle (a "billiard ball") bouncing off walls in a closed cubic room. The ratio between the numbers of the step sizes (associated with the direction of the billiard ball) may be rational (resulting in a periodic scale) or irrational (resulting in an aperiodic scale).

Regarded as scales, they are called **billiard scales**, which are one possible generalization of MOS scales to larger alphabets.

In the binary case with irrational slope, billiard scales correspond to **Sturmian words**, which are aperiodic "MOS" (i.e. strict variety 2) scales.

## Mathematical overview

In the periodic case, let *w* be a word representing a periodic scale with signature *a*_{1}**X**_{1} ... *a*_{d}**X**_{d} (i.e. *w* is a scale word with *a*_{i}-many **X**_{i} steps) and let **a** = (*a*_{1}, ..., *a*_{d}), which we call the *velocity*.
We call *w* a **rank-***d* **billiard scale** if there exists a vector **b** ∈ ℝ^{d} such that the line **a***t* + **b** has intersections with coordinate level planes *x*_{i} = *k* ∈ ℤ that spell out the scale as you move in the positive *t* direction along that line.

This definition is equivalent to the definition given in terms of a billiard ball in a cubic room: We first fire off the billiard ball in the velocity **a** = (*a*_{1}, ..., *a*_{d}) given by the scale signature. For integer *a*_{i}, the particle's trajectory will be periodic, and for almost any starting point, the particle will only collide with one wall at a time. The pattern of which walls the particle collides with then spells out a billiard scale of the given signature, though for arity higher than 2, this can yield rotationally inequivalent scales depending on the starting point.

Identifying opposite sides of the cubic room, thereby producing a *d*-torus, yields an equivalent and at times more compelling visualization: now the particle always travels with velocity **a**, and every time a boundary is crossed and the corresponding scale step recorded, the particle reappears on the other side instead of bouncing. Considering the lines parallel to **a** that do not yield a billiard scale — namely those that have a point that has multiple integer coordinates — subdivides the *d*-torus into finitely many regions each of which gives rise to a billiard scale.

## Properties

Proofs to be added

- A (circular) scale word is a rank-2 billiard scale if it is a MOS scale.
- All distributionally even scales on any finite number of letters are billiard scales
^{[2]}. The converse fails, because not all billiard scales are Fokker blocks (DE implies the scale is a Fokker block); blackdye can be checked to be a billiard scale by using the initial position (1, 1/√5, 1/√3), but it is not a Fokker block. - A billiard scale becomes a billiard scale over fewer letters when one removes all instances of some subset of its step sizes. In particular, ternary billiard scales are
*deletion-MOS*(DMOS): deleting any step size results in a MOS. However, the converse is false.- That’s because projecting we just remove some of the αs from the list, leaving all remaining ones intact.

- Not all billiard words over more than 2 letters are balanced. (In binary scales, the term "balanced" becomes one characterization of the MOS property.) Ternary billiard scales that are balanced are MV3.
^{[3]} - Balanced ternary billiard scales with odd length are pairwise well-formed and have a well-formed generator sequence of two terms; see Ternary scale theorems.
- There exist ternary billiard scales of length up to 29 that do not have a well-formed generator sequence.
- A
*d*-ary billiard scale is (*d*− 1)-block balanced and (*d*− 1)-chain balanced.^{[1]}^{[2]}However, scales on at least 3 letters satisfying the block balance bound need not be billiard scales. - An aperiodic
*d*-ary billiard scale has maximum variety at most 2^{d−1}.^{[4]} - If a ternary billiard scale has a well-formed generator sequence, the WFGS must use either two or three distinct generators, since ternary billiard scales are MV3 or MV4.
- A
*d*-ary billiard scale satisfies the two generalizations of balance listed on the article balanced word.

## Determining whether a scale word is a billiard scale

The following discussion documents a naive algorithm for answering whether a circular word *s* over *d* letters with step signature *a*_{1}*x*_{1}...*a*_{d}*x*_{d} is a billiard word with velocity **a** = ∑_{i} *a*_{i} **e**_{i} ∈ ℤ^{d}:

Consider the *d*-dimensional prism *P* = ∏^{d}_{i=1} [0, *a*_{i}]. Since the pattern in which the billiard line *L* = *L*(*t*) = **a***t* + *b* hits integer coordinate hyperplanes (i.e. sets *x*_{i} = *n* for *n* ∈ ℤ) is periodic with period 1 in *t*, we may first regard *P* as a *d*-torus and *L* : ℝ → *P* as a periodic function with period 1. Because *s* is a billiard word, *L* *cannot* meet any point **q** = (*q*_{1}, ..., *q*_{d}) ∈ ℝ^{d} where two coordinates, *q*_{i} and *q*_{j}, *i* < *j*, are integers. Thus for two distinct integers *i* < *j* in {1, ..., *d*}, any choice of two integers *m*_{i} ∈ {0, ..., *a*_{i}} and *n*_{j} ∈ {0, ..., *b*_{j}} corresponds to the affine hyperplane (which we call a *constraint hyperplane*)

[math]H(m_i, n_j) = \operatorname{span}(\mathbf{a}, \mathbf{e}_1, ..., \hat{\mathbf{e}}_i, ..., \hat{\mathbf{e}}_j, ..., \mathbf{e}_r) + (m_i \mathbf{e}_i + n_j \mathbf{e}_j),[/math]

where the circumflexes indicate that the *i*th and *j*th basis vectors are to be omitted. In particular, *L* and *H*(*m*_{i}, *n*_{j}) are disjoint for any *i* < *j*, any *m*_{i} ∈ {0, ..., *a*_{i} − 1}, and any *n*_{j} ∈ {0, ..., *b*_{j} − 1}.

Now, using the identifications **e**_{i} = 0 for *i* in {1, ..., *d*} on *P* results in a smaller *d*-torus *C* whose fundamental domain in ℝ^{d} is the unit cube *C̄* = ∏^{d}_{i=1} [0, 1]. The path *L* descends to *L* : ℝ → *C* which is still periodic with period 1. The constraint hyperplanes also descend to *C*. Now unwrap *C* into *C̄*, and regard *L* as a subset of *C̄* that is partitioned into disjoint line segments that travel from one facet (i.e. a (*d* − 1)-dimensional face) of *C̄* to another. The reader is warned that to find (the images of) all of the constraint hyperplanes in *C̄*, any constraint hyperplane that does not meet *C̄* should be shifted by integer increments in coordinates so that the shifted hyperplane does meet *C̄*. The constraint hyperplanes partition *C̄* into finitely many regions (as they do for *P*), and any valid billiard path *L* in *C̄* must meet len(*s*)-many of these regions before returning to its starting point.

Now we use the projection π, a linear map on ℝ^{d} whose kernel is generated by **a**, to project *C̄* to a (*d* − 1)-dimensional convex polytope π(*C̄*). The constraint hyperplanes now become (*d* − 2)-dimensional hyperplanes that partition π(*C̄*) into finitely many convex regions. The components of *L* now become points in π(*C̄*), and each region in the partition has at most one point of π(*L*). When *L* hits an integer coordinate hyperplane *x*_{i} = (some integer), the corresponding point in π(*L*) now shifts by −π(**e**_{i}), since the corresponding point in *C̄* must undergo a shift by −**e**_{i} upon *L* hitting the coordinate hyperplane. Since *L* hits len(*s*) coordinate hyperplanes before returning to its starting region, we choose some region with a point of π(*L*) in it and advance the point len(*s*) times, each point in the orbit corresponding to the coordinate of the hyperplane hit by *L*. To find all billiard scales with signature **a**, we simply iterate the procedure described in the previous sentence over all regions (all of which are convex polytopes) in the partition we obtained in π(*C̄*); we may choose the centroid of the region as the starting point of π(*L*).

The preceding method is redundant in that for chiral scales, one need not generate both chiralities manually using this method. This fact is realized via the symmetry of the coordinate planes under reflection about the orthogonal complement of **a**, which reverses the orientation of the billiard trajectory.

## Open questions

- Does the generating function for ternary deletion-MOS necklaces admit an elegant expression? What about billiard scales over a given number of letters?
- Is there a cleverer algorithm for checking whether a scale on more than 2 letters is a billiard scale?

## See also

## Bibliography

- ↑
^{1.0}^{1.1}Vuillon, L. (2003). Balanced words. Bulletin of the Belgian Mathematical Society-Simon Stevin, 10(5), 787-805. - ↑
^{2.0}^{2.1}Sano, S., Miyoshi, N., & Kataoka, R. (2004). m-Balanced words: A generalization of balanced words. Theoretical computer science, 314(1-2), 97-120. - ↑ Bulgakova, D. V., Buzhinsky, N., & Goncharov, Y. O. (2023). On balanced and abelian properties of circular words over a ternary alphabet. Theoretical Computer Science, 939, 227-236.
- ↑ Mélodie Andrieu, Léo Vivion. Minimal Complexities for Infinite Words Written with d Letters. Combinatorics on Words - 14th International Conference, WORDS, Jun 2023, Umeå, Sweden. pp.3–13.