Monte Carlo Methods (2025): Random Number Generators (Lesson 2)

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • A little (very little) about (pseudo) random number generators. Random numbers are the building blocks for all things Monte Carlo!

Комментарии • 7

  • @ryanchicago6028
    @ryanchicago6028 10 дней назад

    Oops, THIS algorithm. 😂 The MT Dr. Corcoran cited from (1996?) was implemented in the STL library (C++). I'd expect that that version is much faster than any virtual machine implementation; but that would be assumed. So, if it mattered, you could try writing a very fast version using Dr. Corcoran's suggestions about shift registers, probably in assembler (or you'd check the complied code for optimization). I'd recommend trying the C++ version. It's very easy to use; and comes with a complete library of PDF's that run on top of it.
    I would worry about people's concerns with precision because it's very difficult to keep track of machine error in an algorithm. Also, would there be any dependence of the MT, or even the LCRNG on function composition? Chaotic behavior would be implicit in the "fractal-ness" of either one of these, depending on its fixed point behavior...(correct?)
    Anyway, the history of this algorithm is very important, and was related to corporate politics of the Cold War Era.

  • @ryanchicago6028
    @ryanchicago6028 10 дней назад

    The RAND corporation was political on both sides; and, after the emergence of the Pentagon Papers, left little else.
    Pre-2001, Daniel Ellsberg was again politically active, and was a very outspoken opponent of nuclear war.
    Those same errors were probably apparent, then.

  • @joachimarts3803
    @joachimarts3803 19 дней назад +1

    A full mersenne twister video would be great to have. How does the algorithm actually work. Apart from theorems about cycle length, are there any provable results about the quality of the Mersenne twister algorithm, or is this only studied empirically. If looking at n-tuples exposes the LCRG to let most points fall on a number of planes in $n$ dimensional space, then is there some other transformation (like the ones we use to transform uniform random variables to other distributions) that might expose the Mersenne twister? Great content.

    • @AProbabilitySpace
      @AProbabilitySpace  19 дней назад

      I don't know if the MT has some kind of transformation that might expose something about it. It is a good question. I will definitely look into it while preparing the full MT video. Thanks for watching!

    • @ryanchicago6028
      @ryanchicago6028 10 дней назад

      machine precision...

  • @mikecaetano
    @mikecaetano 21 день назад +2

    The rand() function in the C standard library is a famous LCRNG. Toy card games written with it were infamous for shuffling their decks the same way with every start. The notation for remainder (circa four minutes) clashes with the typical congruence notation, where the parentheses applies across the equivalence relation and b is the remainder when a is divided by m: a === b (mod m), also called the modulus of the operation. And the remainder when b is divided by m follows as b mod m, without the parentheses, also called the modulo operation. Another video on the Mersenne Twister would be interesting and I would watch it, but I'm not a student, so maybe come back to it later as you see fit.

    • @joachimarts3803
      @joachimarts3803 19 дней назад +1

      I would also watch, with same disclaimer about not being a student.