My Math Forum  

Go Back   My Math Forum > High School Math Forum > Algebra

Algebra Pre-Algebra and Basic Algebra Math Forum


Reply
 
LinkBack Thread Tools Display Modes
July 15th, 2008, 12:34 PM   #1
Newbie
 
Joined: Jul 2008

Posts: 2
Thanks: 0

Code generation, probability of generating same code twice

I'm developing a web application and am using a piece of code to generate a 16 character code. The code can be made up of a-z 0-9. So, Each space in the 16 character code can generate 1 of 36 characters.

What is the probability of generating the exact same code twice?

Is it 36^16 ?

Thanks for the assistance
NateL is offline  
 
July 15th, 2008, 04:44 PM   #2
Senior Member
 
Joined: Oct 2007
From: Chicago

Posts: 1,701
Thanks: 3

Re: Code generation, probability of generating same code twice

Well, there are 36^16 possible permutations; the actual probability of generating the same code twice is actually dependent on a lot of factors... And I'm not actually sure how to do the calculation... I keep second guessing all of my thoughts.

But the probability is ridiculously small, nonetheless.
cknapp is offline  
July 15th, 2008, 07:07 PM   #3
Newbie
 
Joined: Jul 2008

Posts: 2
Thanks: 0

Re: Code generation, probability of generating same code twice

ha Thanks.

I asked someone else and we did a little math and found that the probability is around 8 trillion trillion, or 8 million million million million. I'd say yeah it's next to impossible to generate the same code twice
NateL is offline  
Reply

  My Math Forum > High School Math Forum > Algebra

Tags
code, generating, generation, probability



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unresolve code :D RubikCubeLovers Elementary Math 0 January 9th, 2013 11:00 AM
code student360 Computer Science 1 November 2nd, 2011 05:02 PM
Java code Quantum++ Computer Science 1 September 16th, 2010 09:22 AM
5 button key code probability doc_reptile Advanced Statistics 6 October 20th, 2009 07:44 PM
Pi Code+Phi code..please complete Keith742 Algebra 1 June 21st, 2009 06:09 PM





Copyright © 2018 My Math Forum. All rights reserved.