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

Home > Probability
52-card lottery (Posted on 2023-03-29) Difficulty: 3 of 5

Let a 52 deck of numbered cards be created as follows:

2 special cards: 0 and 1
25 powers of 2: 2, 4, 8, ..., 2^25
25 powers of 3: 3, 9, 27, ..., 3^25

Shuffle the deck and draw at random 3 cards. Evaluate the product of the 3 numbers, say P.

What is the probability of P=0?
What is the probability of P being a non zero integer square?
What is the probability of P being a 4-digit number?

No Solution Yet Submitted by Ady TZIDON    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Computer solution | Comment 6 of 12 |
(In reply to Computer solution by Larry)

For some reason I got 6200 squares (variable goodCt) for probability 62/221 ~= 0.280542986425339 in my computer solution:


clearvars,clc
goodCt=0; ct4=0;
deck=[sym(0) sym(1)];
for p=1:25
  deck(end+1)=sym(2)^p;
  deck(end+1)=sym(3)^p;
end
c=combinator(52,3,'c');
for i=1:length(c)
  hand=deck(c(i,:));
  if length(find(hand==0))==0 
    p=prod(hand);
    sr=sqrt(p);
    if round(sr)^2==p
      goodCt=goodCt+1;
    end
    if p>999 && p<10000
      ct4=ct4+1;
      disp([hand p])
    end
  end
end
disp([goodCt ct4 length(c)])
sym(goodCt/length(c))
sym(ct4/length(c))




  Posted by Charlie on 2023-03-29 09:54:38
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 (0)
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