{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ be a finite set, the *alphabet*, whose elements are *letters*.\nA finite *word* over $A$ is a finite sequence $w = a_1 a_2 \\cdots a_n$ of letters, also called a string; an infinite word is a sequence $(a_i)_{i \\ge 1}$.\nThe finite words form the free [[monoid|0R47MAD57S]] $A^*$ under concatenation, with the empty word as identity.\nA *factor* of $w$ is a word $u$ with $w = x u y$ for some words $x, y$.\n*Combinatorics on words* is the branch of [[combinatorics|0JKW7W7XFR]] that studies the structure of words in $A^*$ and of infinite words over $A$.\nIts typical questions concern factors, repetitions, periods and morphisms of $A^*$.\n\n## Remarks\n\nExample: a *square* is a nonempty word of the form $u u$.\nEvery binary word of length at least $4$ contains a square factor.\nIndeed, a square-free binary word cannot contain $aa$ or $bb$, so it alternates, and $abab$ or $baba$ is a square.\n\nExample: the [[Thue–Morse sequence|7JZVT385PC]] is an infinite binary word with no factor of the form $a x a x a$ with $a$ a letter, so it is overlap-free.\n\nNon-example: the word $ac$ is not a factor of $abc$.\nIt is only a [[subsequence|0F1PR74BRX]] of $abc$, since a factor must consist of consecutive letters.\n\nResults of the field include the Fine–Wilf theorem on words with two periods and the existence of infinite square-free words over three letters.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "defines": "YJ961M051W",
    "kind": "definition",
    "msc": [
      "68R15",
      "05A05"
    ],
    "name": "Combinatorics on words",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Combinatorics_on_words"
      }
    ],
    "tag": "N815PEPPFA",
    "uses": [
      "0R47MAD57S",
      "0JKW7W7XFR"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/N815PEPPFA/",
  "links": [
    {
      "field": "defines",
      "target": "YJ961M051W"
    },
    {
      "field": "uses",
      "target": "0R47MAD57S"
    },
    {
      "field": "uses",
      "target": "0JKW7W7XFR"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/N815PEPPFA.md",
  "msc": [
    "68R15",
    "05A05"
  ],
  "name": "Combinatorics on words",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/N81/N815PEPPFA.md",
  "status": null,
  "tag": "N815PEPPFA",
  "uri": "m2://N815PEPPFA",
  "url": "https://math2.tamnd.com/wiki/combinatorics-on-words-definition/",
  "writing": {
    "tag": "N815PEPPFA",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
