All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
All Different Equals One Duplicate (Posted on 2025-04-05) Difficulty: 2 of 5
Consider the construction of a string of characters which is C characters in length, by randomly selecting from an N-character alphabet (selecting randomly with replacement).

If the probability that all characters are distinct equals the probability that exactly one character appears twice but all the other characters appear just once, then what is the number of characters in the alphabet?

Find N in terms of C.

No Solution Yet Submitted by Larry    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Seems to be this | Comment 1 of 2
The probability that all are different is

   C(n,c)*c! / n^c 
   
The probability that there's exactly one duplicate is

   n*C(n-1,c-2)*c!/2 / n^c
   
leads to

warning('off', 'all') 
 for n=3:99
   for c=3:n
     diff=  nchoosek(n,c)*factorial(c) / n^c;
     oneDup= n*nchoosek(n-1,c-2)*factorial(c)/2 / n^c;
     if diff==oneDup
       disp([c,n])
     end
   end
   % fprintf('\n')
 end


showing

     C     N

     3     5
     4     9
     5    14
     6    20
     7    27
     8    35
     9    44
    10    54
    11    65
    12    77
    13    90
    
which follows N = (C^2 + C) / 2 - 1    

  Posted by Charlie on 2025-04-05 12:20:10
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information