Question:
Hi Could you explain the question and answer to me in plain English? Please do what you can of the problem.?
?
2015-07-21 12:21:06 UTC
Hi Could you explain the question and answer to me in plain English?
Please do what you can of the problem.

You have a chain with N links numbered 1 through N. Every minute, you draw a random link from a bag, and connect it to any other consecutively-numbered link that you drew before. For example, if you drew 4,1,5,7,3, you would end up with three subchains: 1,(3,4,5),7. You keep on drawing until you have drawn all N links and connected them into a single chain of length N. Let M be the maximum number of subchains in this process.

What is the mean of the distribution of M if N=8
What is the standard deviation of the distribution of M if N=8
What is the mean of the distribution of M if N=16
What is the standard deviation of the distribution of M if N=16
What is the mean of the distribution of M if N=32
What is the standard deviation of the distribution of M if N=32
Please provide the script used to generate this result (max 10000 characters)
You can use
C/C++
Fortran
IDL
Java
Matlab
Perl
Python
R
Stata
SQL or
VBA
Three answers:
ooorah
2015-07-21 13:41:21 UTC
Alright, you have 5 chains in a bag. You pick a chain at random. Let's say it's chain number 2. After 1 draw, you have 1 subchain. The maximum number of subchains you've seen on this experiment run is 1.



Pick another. Say it's chain 4. Because 2 is not supposed to connect to 4, you don't connect them. After 2 draws, you have 2 subchains.The maximum number of subchains you've seen on this experiment run is 2.



Pick another. Say it's chain 1. Chain 1 connects to chain 2, so you connect them. After 3 draws, you have 2 subchains. The maximum number of subchains you've seen on this experiment run is 2.



Pick another. Say it's chain 3. Chain 3 connects to both 2 and 4, so you connect them. After 4 draws, you have 1 subchain. The maximum number of subchains you've seen on this experiment run is 2.



Pick your last chain (5). Connect it to chain 4. 5 draws, 1 subchain. Max subchains seen = 2.



You'll want to generalize your code to run the experiment with N chain links instead of just 5. They only seem to care about the maximum number of subchains seen, so you could just keep track of M through each experiment run. You'll want to run the experiment many times to get an average number for M for N chain links. Then you'll want to do this while varying N so that you can determine, experimentally, a relationship between N and your average M.



FYI, the way you are determining this falls under the category of Monte Carlo simulations.
jerica
2015-07-21 12:57:26 UTC
Links numbered 1-N, does that mean it goes 1-10 and than A-N. Ughhh idk let me ask my ridiculously smart friend Mary.
?
2015-07-21 12:23:20 UTC
ssss


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...