{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\R_{\\max} = \\R \\cup \\set{-\\infty}$.\nFor $a, b \\in \\R_{\\max}$, define\n$$a \\oplus b = \\max(a, b), \\qquad a \\otimes b = a + b,$$\nwith the conventions $\\max(a, -\\infty) = a$ and $a + (-\\infty) = -\\infty$.\nThe *max-plus semiring* is $(\\R_{\\max}, \\oplus, \\otimes)$.\nThe *max-plus algebra* is the algebra of vectors and [[matrices|0VD9ZSWWJG]] with entries in $\\R_{\\max}$, with the operations\n$$(A \\oplus B)_{ij} = a_{ij} \\oplus b_{ij}, \\qquad (A \\otimes B)_{ij} = \\bigoplus_{k} a_{ik} \\otimes b_{kj} = \\max_k (a_{ik} + b_{kj}).$$\n\n## Remarks\n\n$(\\R_{\\max}, \\oplus, \\otimes)$ is a commutative semiring with zero element $-\\infty$ and unit element $0$.\nIt is idempotent: $a \\oplus a = a$ for all $a$.\nExample: $2 \\oplus 7 = 7$, $2 \\otimes 7 = 9$, and $2 \\otimes (3 \\oplus 7) = 9 = (2 \\otimes 3) \\oplus (2 \\otimes 7)$, which checks distributivity in one case.\nNon-example: $\\R_{\\max}$ is not a ring, since $5$ has no additive inverse: $\\max(5, b) = -\\infty$ has no solution $b$.\nLet $A$ be an $n \\times n$ matrix, with $a_{ij}$ the weight of an arc from $i$ to $j$.\nThen $(A^{\\otimes k})_{ij}$ is the largest weight of a path with $k$ arcs from $i$ to $j$.\nThe min-plus semiring $(\\R \\cup \\set{+\\infty}, \\min, +)$ is isomorphic to it by $x \\mapsto -x$.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "64G0VSC5F4",
    "kind": "definition",
    "msc": [
      "15A80",
      "14T10",
      "90C24"
    ],
    "name": "Max-plus algebra",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Tropical_semiring"
      }
    ],
    "tag": "A0E47AYDPX",
    "uses": [
      "0VD9ZSWWJG"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/A0E47AYDPX/",
  "links": [
    {
      "field": "defines",
      "target": "64G0VSC5F4"
    },
    {
      "field": "uses",
      "target": "0VD9ZSWWJG"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/A0E47AYDPX.md",
  "msc": [
    "15A80",
    "14T10",
    "90C24"
  ],
  "name": "Max-plus algebra",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/A0E/A0E47AYDPX.md",
  "status": null,
  "tag": "A0E47AYDPX",
  "uri": "m2://A0E47AYDPX",
  "url": "https://math2.tamnd.com/wiki/max-plus-algebra-definition/",
  "writing": {
    "tag": "A0E47AYDPX",
    "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
      }
    ]
  }
}
