[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 16 KB, 427x415, 865796.jpg [View same] [iqdb] [saucenao] [google]
15221588 No.15221588 [Reply] [Original]

2 decks of 2 cards, shuffled have 4 possible outcomes. 2 decks of 3 cards has 16 right.

best i can do is
p = 2^x * (x-1)

open to suggestions because i dont know wtf im doing.

>> No.15221602

>>15221588
>suggestions
one deck of 2n cards (twice as long) has some #permutations.
your mixed deck is also that long, but has 1 duplicate of each of the n cards.

>> No.15221604

>>15221602
so it involves -2n? i wish you could be more specific

>> No.15221609

>>15221602
No he's saying if 2 same card from the two deck ends up next to each other it only counts 1 time

>> No.15221613

>>15221604
not doing a homework problem entirely.

It probably involves multiplying or dividing something by 2.

>> No.15221615

>>15221609
this sounds closer. its not as straightforward as it seems... so it seems

>> No.15221617

>>15221613
its not homework, im genuinely interested as part of a side card magic hobby i like to do.

>> No.15221623

!2n - some shit ???

>> No.15221624

>>15221588
https://en.wikipedia.org/wiki/Permutation#Permutations_of_multisets
I found it.
It simplifies into (n-1)!
2 deck of 2 cards = (4 - 1)! = 6
2 deck of 3 cards = (6 - 1)! = 120
Neat problem op

>2 decks of 2 cards, shuffled have 4 possible outcomes
No it's 6.
AABB
ABAB
ABBA
BAAB
BABA
BBAA

>> No.15221629

>>15221624
>No it's 6.

nah... your not taking into account the rifle shuffling of the cards, a result of AABB or BBAA means they werent shuffled at all but merely stacked on top of each other.

>> No.15221641
File: 381 KB, 498x498, 1677048901971.gif [View same] [iqdb] [saucenao] [google]
15221641

>>15221629

>> No.15221763

>>15221588
It is
(2n)!/2^n

>> No.15221799
File: 227 KB, 480x360, last frame of last video [Rise to Throne] (2018-08-11).png [View same] [iqdb] [saucenao] [google]
15221799

>>15221763
look motherfucker... if you take a two card deck, hold it in one hand and than shuffle it with another 2 card deck in the other hand, you will only ever get 4 variations, i have literally done this. just like other anon your counting 2 extra because they are stacks and not shuffles.

>> No.15223678

>>15221799
Ok.
These tiny numbers are confusing.
You have 2n cards.
So you have (2n)! permutations (if you count each card as different).
Since each card appears twice, for every permutation, you have 2^n ways to make it: each pair can appear in 2 orders.
So the total number of permutations if we count the same value card as identical is (2n)!/n^2.

>> No.15223686

>>15221799
But if you insist on tiny numbers, here:
AABB
ABAB
ABBA
BBAA
BABA
BAAB

>> No.15223689

>>15223678
*So the total number of permutations if we count the same value card as identical is (2n)!/2^n.
Goddamnit.

>> No.15223706
File: 1 KB, 74x165, notepad-12.png [View same] [iqdb] [saucenao] [google]
15223706

>>15221629
but then there are only 2 valid outcomes:
AABB
ABAB
each of the other are stacks of these two

>> No.15223709

>>15223706
Why are you counting 2 stacks as the same? The shuffled cards aren't put in a loop or something, they have a top card and bottom card. Like a permutation of cards in a deck has a first card, and the other ones in order after, it's not a ring of cards or whatever.

>> No.15223710

>>15223709
read
>>15221629
im trying to make sense of op

>> No.15223745

>>15221629
Ok I think you mean that a result of ABAB or BABA means they weren't shuffled, because there is and A in each deck. But whatever, the weirdest thing is that you assume that after shuffling they can only be in particular orders. Like. What?

>> No.15223855

>>15223745
>But whatever, the weirdest thing is that you assume that after shuffling they can only be in particular orders.

shuffling isnt really that random at all, matter of fact a perfect rifle shuffle in which the card interleaving is identical isnt random at all, best shuffle is to only be sooo good and no more. say you have two ordered sets A:{b,c} , B:{d,e} where b and d are the cards on top.

rifle shuffle
b will always be above c in the deck just like e will always be below d. entropy is introduced by the 50/50 choice of from which stack, but the order of the cards within each set relative to other members of that set remains the same...

>> No.15223864

>getting into the physical mechanics of shuffling actual cards.

If you must know, casinos do a wash shuffle of 6 to 8 decks in games like blackjack to ensure high entropy.

Also, the agreed standard for a single deck is that a non-perfect rifle done by a non-malicious human takes about 7 shuffles to be casino worthy

just FYI

>> No.15223866

>>15223745
>Ok I think you mean that a result of ABAB or BABA means they weren't shuffled

even your argument is pointlessly wrong, i assume you meant AABB or BBAA because thats the only thing that makes sense... your last post was a complete all around failure anon

>> No.15223872

>>15223864
actually its closer to 8 anon and this isnt completely accurate either because its based on perfect shuffles which never happen in the real world. i believe there is some modeling done with a shuffling algorithm known as GSR that does better but still sucks under certain conditions.

>> No.15223928

>>15223855
I think that some clarification about what op meant by shuffling would help.
I'm not a card player, and when I do play I "shuffle" the cards several times. I guess You are taking it to mean that the 2 decks are in order to begin with, and end up in the same order as they were in the separate decks. This is weird. Why are we assuming anything about the way the cards are shuffled or the order they are in before shuffling?

>> No.15223932

>>15223866
How would you assume that? One deck has several A cards and the other has several B cards? Obviously im assuming there are 2 decks, each with cards ABCDE etc.
So I someone did your weird single-pass shuffle, ABCD...ABCD.. would mean that they were not in fact shuffled, merely one was stacked over the other. But I don't know, you seem to be very attached to this rifle shuffle thing and missing the point of the question.

>> No.15223974

>>15223928
>Why are we assuming anything about the way the cards are shuffled or the order they are in before shuffling?

we got side tracked, its totally irrelevant to the the original question.

whats the formula for the number of permutations you get when rifle shuffling 2 decks of n cards.

>> No.15223979

>>15223974
>rifle shuffling
So you are asking a different question than op? The answer to op is (2n)!/2^n.
You want to know the number of permutations of 2 decks that are rifle shuffled once without resplitting, we just rifle the 2 decks together?
Huh. Gimme a sec.

>> No.15223983

>>15223979
>You want to know the number of permutations of 2 decks that are rifle shuffled once without resplitting, we just rifle the 2 decks together?
>Huh. Gimme a sec.

OP here...this is what im wanting to know

>> No.15223984

>>15223983
And we are assuming that the original decks are in any order or ordered? Because if they are ordered then indeed 2 decks of 2 cards can only produce 2 outcomes: ABAB or AABB.

>> No.15223988

>>15223984
ordered. but how to calculate for arbitrary n?

>> No.15223994

>>15223983
And 2 packs of 3 cards has indeed 5 outcomes:
aabbcc
aabcbc
ababcc
abacbc
abcabc

>> No.15223998

>>15223988
idk but checked so ill try

>> No.15224023

>>15223983
So idk im just counting now, for a deck of 1 card, 1 outcome, for 2, 2, for 3, 5, for 4, 14. hng

>> No.15224027

>>15224023
yep...looks right, now we're cooking.
2n
n^2
2^n
n-1

3 terms in solution?

>> No.15224031

>>15221588
>2 decks of 2 cards, shuffled have 4 possible outcomes
1122
2112
2211
1212
2121
1221
Bro if you can't even do the small n cases by hand then finding the pattern is hopeless.
(2n C 2,2,...,2) = (2n)!/2^n

>> No.15224045

>>15224027
ok i got it. let me check real quick

>> No.15224053

>>15224027
ok no i don't, shit

>> No.15224064

>>15224027
Ok i think i got it.
(2n)!/(n!n!(n+1))

>> No.15224068

(2n)!/((n+1)!n!)

>> No.15224075

>>15224064
lol...what a gnarly thing that is but it seems to fit, its getting late thanks for the help anon i owe you one, good work...i'll work on trying to clean it up tommorrow

>> No.15224090

>>15223994
>>15224075
what about
aacbbc
abbacc
abbcac
abcbac
acabbc
acbabc
acbbac

>> No.15224093

>>15224090
your still missing 4 more

>> No.15224102

>>15224075
Ok I have the explanation.
So think of it as a modified permutation of multisets.
We have 2 decks and we choose 1 card from each deck until we have taken all the cards. Say deck Joe and deck Eve. If they have 3 cards in their deck, then its a permutation of {j,j,j,e,e,e}.
So that gives us 6!/(3!3!) or (2n!)/(n!n!).
But, obv that is 20, too many for us. Because for us, jeje is the same as ejej.
So now consider their cards, abc and ABC.
For each permutation, say ABCABC, we have n+1 ways of making it with our 2 decks:
abcABC, AbcaBC, ABcabC, ABCabc.
we have two series of ABC, and we can take from zero to n upper case for the first occurence, hence divide 20 by 3+1.

>> No.15224105

>>15224093
which ones?

>> No.15224108

>>15224090
Ok the problem op is asking is say you have 2 ordered decks, amd you flip them into each other, how many permutations?
So you start with ABC and abc. And once you flip them together, "rifle shuffle", each deck is still in order. So you can have AabBcC or aABCbc etc. But you cannot have AbcaBC or ACBabc.
And then when we count the permutations, A and a are the same.
So we only actually have AABBCC, AABCBC, ABACBC, ABABCC, ABCABC as possible outcomes.

>> No.15224109

>>15224108
>2 ordered decks
ok i see

>> No.15224111

>>15224109
Anyway the answer is (2n)!/((n+1)!n!)