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

Home > Probability
Pandigital and divisible (Posted on 2010-12-26) Difficulty: 2 of 5
What percentage of pandigital* numbers is divisible by 990 ?


*A pandigital number consists of 10 distinct digits.

Try to solve analytically.

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4

I couldn't think of any analytic ways: All are divisible by 9, but only some are divisible by 2, 5 or 11. It's especially tricky if ruling out leading zeros. So falling back on the computer:

   10   V$="0123456789":H$=V$
   15   repeat
   20    gosub *Permute(&V$)
   30    if left(V$,1)>"0" then
   40      :inc OCt
   50      :if val(V$) @ 990=0 then inc HCt
  735   until V$=H$
  740   print HCt,OCt,HCt/OCt,HCt//OCt
  750   end
 

finds those cases where there is no leading zero. The results are:

 31680   3265920         0.0097001763668430334   11//1134
 
showing the probability as 31680/3265920 11/1134 ~= 0.97 %, or 1/103.090909090909090909.

The 3265920 is 10! - 9!, representing all cases, including leading zeroes, minus the cases with leading zeroes.

However, if leading zeros are allowed, then the following program takes into consideration all 10! = 3,628,800 cases:

   10   V$="0123456789":H$=V$
   15   repeat
   20    gosub *Permute(&V$)
   30    if left(V$,1)>" " then
   40      :inc OCt
   50      :if val(V$) @ 990=0 then inc HCt
  735   until V$=H$
  740   print HCt,OCt,HCt/OCt,HCt//OCt
  750   end
 
finds

 31680   3628800         0.0087301587301587301   11//1260
 
That's 11/1260 ~= 1/114.5454545454545454545.


  Posted by Charlie on 2010-12-26 19:45:19
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 (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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