Talk About Network

Google





Programming > Assembly Language > Re: I pee in th...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 5076 of 5194
Post > Topic >>

Re: I pee in the open

by "Alexei A. Frounze" <alexfrunews@[EMAIL PROTECTED] > Jul 15, 2008 at 04:27 AM

On Jul 15, 2:43 am, "Wolfgang Kern" <nowh...@[EMAIL PROTECTED]
> wrote:
> Rod Pemberton wrote:
> >> assuming 52(m) cards to be distributed in junks of five(n)
> >> for the first five cards:
> >> m*(m-1)*(m-2)*(m-3)*(m-4)/fac(n)  ;the other meaning of 'FAC' yet ;)
> >> 52*51*50*49*48 / 2*3*4*5  = 2598960 variants
> >> the next set of five:
> >> 47*46*45*44*43 / 2*3*4*5  = 1533939 variants
> >> and so on ...
> > until...
> > 5*4*3*2*1 / 2*3*4*5  = 1 variant
>
> I'd have only two cards left at the end  :)
>
> > Houston, we have a problem...
> > It appears that's combinations (un-ordered set).
> > A deck order of 1,2,3,4,5 is distinctly different from a deck order of
> > 2,5,4,1,3.  The game needs to keep track of the deck order.  The
remaining
> > five cards could be 1,50,23,37,9.  I'd think we'd want permutations
> > (ordered sets).  For 52 cards:
> > 52!=52*51*... = (big number Wolf posted)
> > For five cards remaining:
>
> > 5*4*3*2*1 / 1! = 120
> > So, I asked: if 1,2,3,4,5 is ranked as first of 120 permutations of
> > 1,2,3,4,5, and all permutations are ranked from 1 to 120, what
permutation
> > out of 120 is 2,5,4,1,3?  (I used example value 33.)  Is there a way
to
> > generate the permutation from this rank number? Or, vice versa?
>
> I think the order of a set of five isn't relevant at all in a cards
game,
> so we may always see and sort it ascending (like most players do).
>
> But if you want an order oriented numbering it will depend on the
> chosen way if you can recalculate an order by their given number.
>
> >> but I hope you don't mean to make an array for all variants :)
> > Nope, I took it that Alex stated one could generate different deck
orders
> > for an un-ordered set from an equation - without generating all
possible
> > ordered sets...
>
> I'm not too familiar with gambling code, but I think it is possible
> to create an algo which works both directions.
> __
> wolfgang

http://en.wikipedia.org/wiki/Permutation#Numbering_permutations
http://en.wikipedia.org/wiki/Factoradic

Alex
 




 2 Posts in Topic:
Re: I pee in the open
"Alexei A. Frounze&q  2008-07-15 04:27:03 
Re: I pee in the open
"Wolfgang Kern"  2008-07-15 18:12:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 16:06:23 PST 2009.