Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
What is probability of random generator repeating more than once?

Imagine we have two independent pseudo-random number generators using same algorithm but seeded differently. And we are generating numbers of same size using these generators, say 32-bit integers. Provided algorithm gives us uniform distribution, there is 1/2^32 probability (or is it?) of a collision. If a collision just happened, what is the probability the very next pair will also be a collision? It seems for me this probability might be different (higher) from that initial uniform-based collision chance. Most of currently existing pseudo-random number generators hold internal state to maintain own stability, and recently happened collision might signal those internal states are somewhat "entangled" giving modified (higher) chance of a collision to happen again.

The question is probably too broad to give any precise answer, but revealing general directions/trends could also be nice. Here are some interesting aspects:

  • Does size of initial collision matter? Is there a difference after a collision of 8 consecutive bits vs 64 bits? How approximately chance of next collision depends on size of generated sequence?

  • Does pattern of pair generation matter? For example, we could find initial collision by executing first generator only once and "searching" second generator. Or we could invoke each generator on every iteration.

  • I'm particularly interested in default javascript Math.random(). 32-bit integers can be generated of that like this (for example). EDIT: As pointed in comments, conversion of random value from [0; 1) range should be done carefully, as exponent of such values is very likely to repeat (and it takes decent part of result extracted this way).

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda