{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $k \\le n$ be positive integers.\nWrite a [[permutation|0BQMWCNS8S]] $\\pi$ of $\\set{1, \\ldots, n}$ in one-line notation $\\pi(1) \\pi(2) \\cdots \\pi(n)$, and let $\\sigma$ be a permutation of $\\set{1, \\ldots, k}$.\nThe permutation $\\pi$ *contains* $\\sigma$ as a *pattern* if there are indices $i_1 \u003c i_2 \u003c \\cdots \u003c i_k$ such that, for all $a, b \\in \\set{1, \\ldots, k}$,\n$$\\pi(i_a) \u003c \\pi(i_b) \\iff \\sigma(a) \u003c \\sigma(b).$$\nOtherwise $\\pi$ *avoids* $\\sigma$.\nThe set of permutations of $\\set{1, \\ldots, n}$ that avoid $\\sigma$ is written $\\operatorname{Av}_n(\\sigma)$.\n\n## Remarks\n\nExample: $\\pi = 3\\,1\\,4\\,2$ contains $\\sigma = 312$.\nTake the indices $1, 2, 4$, with values $3, 1, 2$; the first is the largest and the second is the smallest, as in $312$.\n\nNon-example: $\\pi = 3\\,1\\,4\\,2$ avoids $123$.\nIts increasing [[subsequences|0R8J3ZQMJS]] are $3\\,4$, $1\\,4$ and $1\\,2$ and single entries, and none has length $3$.\n\nFor every $\\sigma$ of length $3$, the number $\\abs{\\operatorname{Av}_n(\\sigma)}$ is the [[Catalan number|0YWZJEABB2]] $C_n$.\nKnuth showed that the permutations that can be sorted by a single stack are exactly those that avoid $231$.\nThe [[Stanley–Wilf conjecture|KWJS2QYJ1K]] gives an exponential bound on $\\abs{\\operatorname{Av}_n(\\sigma)}$ for every $\\sigma$.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "1H8Z1WMG23",
    "kind": "definition",
    "msc": [
      "05A05",
      "05A15"
    ],
    "name": "Permutation pattern",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Permutation_pattern"
      }
    ],
    "tag": "DF69BF6841",
    "uses": [
      "0BQMWCNS8S",
      "0R8J3ZQMJS"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/DF69BF6841/",
  "links": [
    {
      "field": "defines",
      "target": "1H8Z1WMG23"
    },
    {
      "field": "uses",
      "target": "0BQMWCNS8S"
    },
    {
      "field": "uses",
      "target": "0R8J3ZQMJS"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/DF69BF6841.md",
  "msc": [
    "05A05",
    "05A15"
  ],
  "name": "Permutation pattern",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DF6/DF69BF6841.md",
  "status": null,
  "tag": "DF69BF6841",
  "uri": "m2://DF69BF6841",
  "url": "https://math2.tamnd.com/wiki/permutation-pattern-definition/",
  "writing": {
    "tag": "DF69BF6841",
    "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
      }
    ]
  }
}
