This site is supported by donations to The OEIS Foundation.

# Łukasiewicz words

(Redirected from Łukasiewicz language)

Łukasiewicz words were invented by or named after (expert opinion requested, see Talk page) the Polish mathematician Jan Łukasiewicz [1][2].

## Definition

The following description follows Stanley:[3]

The letters of Łukasiewicz words come from the alphabet ${\displaystyle \scriptstyle A\,=\,\{x_{0},\,x_{1},\,x_{2},\,\ldots \}\,}$. The weight ${\displaystyle \scriptstyle \delta (x_{i})\,}$ of a letter ${\displaystyle \scriptstyle x_{i}\,}$ is defined by ${\displaystyle \scriptstyle \delta (x_{i})\,=\,i-1\,}$. A word ${\displaystyle \scriptstyle y_{1}y_{2}{\ldots }y_{m}\,}$ made of letters from ${\displaystyle \scriptstyle A\,}$ is said to be a Łukasiewicz word if it fulfills the condition that for any proper prefix of the word, the sum of the weights is nonnegative (i.e. ${\displaystyle \scriptstyle \delta (y_{1})+\ldots +\delta (y_{j})\,\geq \,0,\,}$ for ${\displaystyle \scriptstyle 1\,\leq \,j\,\leq \,m-1\,}$) and the total sum is minus one (i.e. ${\displaystyle \scriptstyle \delta (y_{1})+\ldots +\delta (y_{m})\,=\,-1\,}$.) Thus ${\displaystyle \scriptstyle y_{m}\,=\,x_{0}\,}$.

To obtain a Łukasiewicz word from a rooted plane tree, one does a depth-first (preorder) search through the rooted plane tree, writing down the degree of each vertex (the number of children) at each vertex not previously visited.

## Łukasiewicz language

The set of all Łukasiewicz words is called the Łukasiewicz language.

The following formal definition is from M. Lothaire:[4]

Let ${\displaystyle \scriptstyle A\,}$ denote the infinite alphabet ${\displaystyle \scriptstyle A\,=\,\{x_{0},\,x_{1},\,x_{2},\,\ldots \}\,}$ and ${\displaystyle \scriptstyle \delta \,}$ the morphism of ${\displaystyle \scriptstyle A^{*}\,}$ into the additive group ${\displaystyle \scriptstyle \mathbb {Z} \,}$ of rational integers defined by ${\displaystyle \scriptstyle \delta (a_{n})\,=\,n-1\,}$. The Łukasiewicz language ${\displaystyle \scriptstyle L\,}$ is the set of words ${\displaystyle \scriptstyle f\,}$ of ${\displaystyle \scriptstyle A^{*}\,}$ such that ${\displaystyle \scriptstyle \delta (f)\,=\,-1\,}$ and ${\displaystyle \scriptstyle \delta (f')\,\geq \,0\,}$ for any left factor ${\displaystyle \scriptstyle f'\,}$ of ${\displaystyle \scriptstyle f\,}$.

## Preorder codewords

If instead of defining Łukasiewicz words consisting of letters taken from the alphabet ${\displaystyle \scriptstyle A\,=\,\{x_{0},\,x_{1},\,x_{2},\,\dots \}\,}$, one employs nonnegative integers ${\displaystyle \scriptstyle \{0,\,1,\,2,\,\dots \}\,}$ directly, one obtains what Vladimir Balakirsky calls preorder codewords.[5]

Also in Łukasiewicz words related OEIS sequences, the "carrier-letter" ${\displaystyle \scriptstyle x\,}$ of the index is dispensed with, and a word is written down just as a decimal number.

## Connections

Being thus just another way of representing rooted plane general trees, Łukasiewicz words are one of the combinatorial interpretations of Catalan numbers:

{ {0}, {10}, {200, 110}, {3000, 2010, 2100, 1200, 1110}, ... }.

Specifically, there are ${\displaystyle \scriptstyle C_{n}=\,}$ A000108${\displaystyle \scriptstyle (n),\,n\,\geq \,0,\,}$ Łukasiewicz words of the length ${\displaystyle \scriptstyle n+1,\,}$ where ${\displaystyle \scriptstyle C_{n}\,}$ is the ${\displaystyle \scriptstyle n\,}$th Catalan number:

{ #{0}, #{10}, #{200, 110}, #{3000, 2010, 2100, 1200, 1110}, ... } =
{1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190, 6564120420, ...}

The subset of Łukasiewicz words where only ${\displaystyle \scriptstyle x_{0}\,}$'s and ${\displaystyle \scriptstyle x_{2}\,}$'s (or respectively ${\displaystyle \scriptstyle 0\,}$'s and ${\displaystyle \scriptstyle 2\,}$'s) occur are called Dyck words (usually written without the trailing ${\displaystyle \scriptstyle 0\,}$, and often with ${\displaystyle \scriptstyle 2\,}$'s converted to ${\displaystyle \scriptstyle 1\,}$'s). Specifically, the words in that subset represent such rooted plane general trees where the branching factor is always two, that is, are rooted plane binary trees.

## Integer sequences associated with Łukasiewicz words

Note that the first two are well-defined only up to the 6917th term, because of the limitations of the decimal system:

A079436 Full Lukasiewicz word for each rooted plane tree (interpretation e in Stanley's exercise 19) encoded by (in order induced by) A014486 (or A063171).

{0, 10, 200, 110, 3000, 2010, 2100, 1200, 1110, 40000, 30010, 30100, 20200, 20110, 31000, 21010, 22000, 13000, 12010, 21100, 12100, 11200, 11110, 500000, 400010, ...}

A071153 Lukasiewicz word for each rooted plane tree (interpretation e in Stanley's exercise 19) encoded by A014486 (or A063171), with the last leaf implicit, i.e. these words are given without the last trailing 0, except for the null tree which is encoded as 0.

{0, 1, 20, 11, 300, 201, 210, 120, 111, 4000, 3001, 3010, 2020, 2011, 3100, 2101, 2200, 1300, 1201, 2110, 1210, 1120, 1111, 50000, 40001, 40010, 30020, 30011, 40100, ...}

A000108 Catalan numbers: ${\displaystyle \scriptstyle C(n)\,=\,{\frac {\binom {2n}{n}}{n+1}}\,=\,{\frac {(2n)!}{n!(n+1)!}},\,n\,\geq \,0.\,}$ Also called Segner numbers.

{1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190, 6564120420, 24466267020, ...}