Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Let's do it. -- Gary Gilmore, to his firing squad


interests / rec.puzzles / Cards in slots (counting problem)

SubjectAuthor
* Cards in slots (counting problem)riverman
`* Re: Cards in slots (counting problem)Edward Murphy
 `- Re: Cards in slots (counting problem)Jonathan Dushoff

1
Cards in slots (counting problem)

<3a0d615a-876e-4711-acf4-755fa7f8beebn@googlegroups.com>

  copy mid

https://novabbs.com/interests/article-flat.php?id=628&group=rec.puzzles#628

  copy link   Newsgroups: rec.puzzles
X-Received: by 2002:ac8:7499:0:b0:3a5:65ac:9c8a with SMTP id v25-20020ac87499000000b003a565ac9c8amr8839499qtq.457.1668352363399;
Sun, 13 Nov 2022 07:12:43 -0800 (PST)
X-Received: by 2002:a05:6830:14c:b0:66d:6cc3:46e7 with SMTP id
j12-20020a056830014c00b0066d6cc346e7mr3133915otp.146.1668352363142; Sun, 13
Nov 2022 07:12:43 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.puzzles
Date: Sun, 13 Nov 2022 07:12:42 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=169.38.75.87; posting-account=4pG_2woAAAAXxj7bVs-6QT510QiPlCNo
NNTP-Posting-Host: 169.38.75.87
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3a0d615a-876e-4711-acf4-755fa7f8beebn@googlegroups.com>
Subject: Cards in slots (counting problem)
From: myronb...@gmail.com (riverman)
Injection-Date: Sun, 13 Nov 2022 15:12:43 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1409
 by: riverman - Sun, 13 Nov 2022 15:12 UTC

I have 15 slots with a card in each one. The cards are collectively numbered 1-15, and each card belongs in the slot of the same number.

I pull out the card in a random slot, and i says the number of a different slot. So I put it in the proper slot, removing the card that is already there. It likewise has the number of a different slot, so I repeat.

What are the odds that I end up relocating EVERY card to its rightful slot?

Re: Cards in slots (counting problem)

<tkrr7s$1g7a$1@gioia.aioe.org>

  copy mid

https://novabbs.com/interests/article-flat.php?id=630&group=rec.puzzles#630

  copy link   Newsgroups: rec.puzzles
Path: i2pn2.org!i2pn.org!aioe.org!SABVAYcHOklaNK/u1FQzwA.user.46.165.242.75.POSTED!not-for-mail
From: emurph...@zoho.com (Edward Murphy)
Newsgroups: rec.puzzles
Subject: Re: Cards in slots (counting problem)
Date: Sun, 13 Nov 2022 14:31:25 -0800
Organization: Aioe.org NNTP Server
Message-ID: <tkrr7s$1g7a$1@gioia.aioe.org>
References: <3a0d615a-876e-4711-acf4-755fa7f8beebn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49386"; posting-host="SABVAYcHOklaNK/u1FQzwA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Edward Murphy - Sun, 13 Nov 2022 22:31 UTC

On 11/13/2022 7:12 AM, riverman wrote:

> I have 15 slots with a card in each one. The cards are collectively numbered 1-15, and each card belongs in the slot of the same number.
>
> I pull out the card in a random slot, and i says the number of a different slot. So I put it in the proper slot, removing the card that is already there. It likewise has the number of a different slot, so I repeat.
>
> What are the odds that I end up relocating EVERY card to its rightful slot?

[spoiler space]

https://en.wikipedia.org/wiki/Random_permutation_statistics#Probability_that_a_random_element_lies_on_a_cycle_of_size_m

In this case, n = m = 15, so the probability is 1/15.

Let's build a proof of this result:

* Consider this modified procedure: You act as described, but if you
return to a slot already visited, then you start again at the lowest
numbered slot not already visited. This is guaranteed to finish,
even if it's not guaranteed to relocate every card in the process.

* To relocate every card, there are 14 valid choices for the first
card's proper slot, 13 for the second card's, and so on, so 14!
ways total.

* To just get through the procedure at all, there are 15 valid
choices for the first card's proper slot (including the one it's
already in), 14 for the second card's (all the slots except the
first card's proper slot), and so on, so 15! ways total.

* Thus, the probability of relocating every card is
14! / 15!
= 14! / (15 * 14!)
= 1/15

(How to prove the stated answer for n > m is left as an exercise.)

Re: Cards in slots (counting problem)

<97723f87-ce05-49d6-ad57-f047a8ae2a7fn@googlegroups.com>

  copy mid

https://novabbs.com/interests/article-flat.php?id=633&group=rec.puzzles#633

  copy link   Newsgroups: rec.puzzles
X-Received: by 2002:a05:6214:164f:b0:4bb:7f7a:2a62 with SMTP id f15-20020a056214164f00b004bb7f7a2a62mr13360236qvw.82.1668446046064;
Mon, 14 Nov 2022 09:14:06 -0800 (PST)
X-Received: by 2002:a05:6871:4683:b0:13b:8760:5f2b with SMTP id
ni3-20020a056871468300b0013b87605f2bmr7432865oab.251.1668446045700; Mon, 14
Nov 2022 09:14:05 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: rec.puzzles
Date: Mon, 14 Nov 2022 09:14:05 -0800 (PST)
In-Reply-To: <tkrr7s$1g7a$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=194.80.230.106; posting-account=Z3wesAoAAADgwKkKPL0X98kstUoD_GnZ
NNTP-Posting-Host: 194.80.230.106
References: <3a0d615a-876e-4711-acf4-755fa7f8beebn@googlegroups.com> <tkrr7s$1g7a$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <97723f87-ce05-49d6-ad57-f047a8ae2a7fn@googlegroups.com>
Subject: Re: Cards in slots (counting problem)
From: jdush...@gmail.com (Jonathan Dushoff)
Injection-Date: Mon, 14 Nov 2022 17:14:06 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3051
 by: Jonathan Dushoff - Mon, 14 Nov 2022 17:14 UTC

On Sunday, November 13, 2022 at 10:31:27 PM UTC, Edward Murphy wrote:
> On 11/13/2022 7:12 AM, riverman wrote:

> > I have 15 slots with a card in each one. The cards are collectively numbered 1-15, and each card belongs in the slot of the same number.

> > I pull out the card in a random slot, and i says the number of a different slot. So I put it in the proper slot, removing the card that is already there. It likewise has the number of a different slot, so I repeat.

> > What are the odds that I end up relocating EVERY card to its rightful slot?

Super-nice, but!

> [spoiler space]

We are _given_ that the first two cards move to new slots. So I would argue that the answer to the problem as stated is 1/13.

> https://en.wikipedia.org/wiki/Random_permutation_statistics#Probability_that_a_random_element_lies_on_a_cycle_of_size_m

> In this case, n = m = 15, so the probability is 1/15.

> Let's build a proof of this result:

> * Consider this modified procedure: You act as described, but if you
> return to a slot already visited, then you start again at the lowest
> numbered slot not already visited. This is guaranteed to finish,
> even if it's not guaranteed to relocate every card in the process.

> * To relocate every card, there are 14 valid choices for the first
> card's proper slot, 13 for the second card's, and so on, so 14!
> ways total.

> * To just get through the procedure at all, there are 15 valid
> choices for the first card's proper slot (including the one it's
> already in), 14 for the second card's (all the slots except the
> first card's proper slot), and so on, so 15! ways total.

> * Thus, the probability of relocating every card is
> 14! / 15!
> = 14! / (15 * 14!)
> = 1/15

> (How to prove the stated answer for n > m is left as an exercise.)

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor