Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Which is mathematically more random?

I am creating a password generator program and was wondering which was more random, or if they're the same.

I randomly choose 1 or 0, if 1 it randomly picks a number between 1 and 26, that corresponds with a letter, if 0 it randomly picks a number between 1 and 10 that corresponds with a number 0-9.

Or I randomly choose a number between 1 and 36, with 1-26 being letters and 27-36 being a number.

3 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    The second case, where you pick a number from 1-36, has more entropy (i.e., it is "more random") than the first case.

    http://en.wikipedia.org/wiki/Entropy_%28Informatio...

    In the second case, every letter and every digit is equally likely to appear (one chance in 36) in a password. In the first case, The likelihood of any given digit is one chance in 20, whereas the liklihood of a given letter is one in 52.

  • Anonymous
    1 decade ago

    1/2 * 1/10 + 1/2 * 1/26 = 9/130

    1/36

    1/36 is a bigger number than 9/130. I think I did the math right... probability is not a very strong subject with me. But from what I can tell, randomly picking from 36 is a more difficult code to break

  • Anonymous
    1 decade ago

    I'm not positive, but I think they're about the same.

Still have questions? Get your answers by asking now.