{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "3MDPTW005V"
    },
    {
      "field": "defines",
      "target": "J1TZHNRV02"
    },
    {
      "field": "specializes",
      "target": "Q0K15AWV8H"
    },
    {
      "field": "instance_of",
      "target": "YVEA283NZW"
    }
  ],
  "body": "\n## Summary\n\nA pseudorandom number generator is a deterministic algorithm that produces a sequence of numbers meant to look like independent uniform random numbers.\nIt has a finite internal state, updated by a fixed map at each step.\nAn output function reads a number from the state.\nBecause the state space is finite, the sequence is eventually periodic, and the same seed always reproduces the same sequence.\nSuch generators supply the randomness of almost all Monte Carlo computations and simulations.\n\n## Explanations\n\n### L1 human\n\nA computer cannot toss coins, but it can run a rule that scrambles a number again and again.\nIf the rule is good, the outputs pass statistical tests of randomness, even though each one is completely determined by the starting value, the seed.\nA toy example is $s_{i+1} = 5 s_i + 1 \\bmod 8$ with output $s_i/8$: from $s_0 = 0$ it gives $0, 1/8, 6/8, 7/8, 4/8, 5/8, 2/8, 3/8$ and then repeats.\nReal generators work the same way with huge state spaces, so that the period is far longer than any computation.\nBeing reproducible is a feature: a simulation can be rerun exactly from its seed.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "65C10",
      "11K45"
    ],
    "name": "Pseudorandom number generator",
    "same_as": {
      "wikidata": "Q1623338",
      "wikipedia": "Pseudorandom number generator"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Pseudorandom_number_generator"
      }
    ],
    "tag": "C5FG6ARWVV"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/C5FG6ARWVV/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/C5FG6ARWVV.md",
  "msc": [
    "65C10",
    "11K45"
  ],
  "name": "Pseudorandom number generator",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/C5F/C5FG6ARWVV.md",
  "status": null,
  "tag": "C5FG6ARWVV",
  "uri": "m2://C5FG6ARWVV",
  "url": "https://tamnd.github.io/math2/wiki/pseudorandom-number-generator/",
  "writing": {
    "tag": "C5FG6ARWVV",
    "kind": "concept",
    "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
      }
    ]
  }
}
