Jan 10, 2025
Fiddler answer:
Extra Credit:
Explanation:
For the first Fiddler, I wrote MATLAB code to help find the smallest
function [survive, elim, numGroups] = playMingleOneRound(N, k) % Play one round of Mingle with N players and the target group size is % k. Output number of survivals in "survive" and number of eliminated % in "elim". Also output number of groups formed by surviving players. numGroups = floor(N/k); survive = k * numGroups; elim = N - survive; end function res = atLeastOneSurvived(N) % Function to find out if at least one survivor in Mingle after 38 % rounds for N players. Returns true if so and false otherwise. rounds = 1:38; survive = N; for k = rounds survive = playMingleOneRound(survive, k); if survive == 0 res = false; return; end end res = true; end %% Main script to find smallest N such that at least one survivor after 38 rounds of Mingling N = 38; % We need at least 38 players otherwise everyone is elminated in round 38 res = false; while res == false fprintf('Analyzing N = %d...\n', N) res = atLeastOneSurvived(N); if res == true break; end N = N + 1; end fprintf('Found smallest N = %d\n', N);
Here is the output:
Found smallest N = 454
So, it turns out that the smallest
For completeness, I also printed out the Mingle process for 454 players, showing that 38 players survive after 38 rounds:
Round: 1; Survived: 454; Eliminated: 0; Number of groups: 454 Round: 2; Survived: 454; Eliminated: 0; Number of groups: 227 Round: 3; Survived: 453; Eliminated: 1; Number of groups: 151 Round: 4; Survived: 452; Eliminated: 1; Number of groups: 113 Round: 5; Survived: 450; Eliminated: 2; Number of groups: 90 Round: 6; Survived: 450; Eliminated: 0; Number of groups: 75 Round: 7; Survived: 448; Eliminated: 2; Number of groups: 64 Round: 8; Survived: 448; Eliminated: 0; Number of groups: 56 Round: 9; Survived: 441; Eliminated: 7; Number of groups: 49 Round: 10; Survived: 440; Eliminated: 1; Number of groups: 44 Round: 11; Survived: 440; Eliminated: 0; Number of groups: 40 Round: 12; Survived: 432; Eliminated: 8; Number of groups: 36 Round: 13; Survived: 429; Eliminated: 3; Number of groups: 33 Round: 14; Survived: 420; Eliminated: 9; Number of groups: 30 Round: 15; Survived: 420; Eliminated: 0; Number of groups: 28 Round: 16; Survived: 416; Eliminated: 4; Number of groups: 26 Round: 17; Survived: 408; Eliminated: 8; Number of groups: 24 Round: 18; Survived: 396; Eliminated: 12; Number of groups: 22 Round: 19; Survived: 380; Eliminated: 16; Number of groups: 20 Round: 20; Survived: 380; Eliminated: 0; Number of groups: 19 Round: 21; Survived: 378; Eliminated: 2; Number of groups: 18 Round: 22; Survived: 374; Eliminated: 4; Number of groups: 17 Round: 23; Survived: 368; Eliminated: 6; Number of groups: 16 Round: 24; Survived: 360; Eliminated: 8; Number of groups: 15 Round: 25; Survived: 350; Eliminated: 10; Number of groups: 14 Round: 26; Survived: 338; Eliminated: 12; Number of groups: 13 Round: 27; Survived: 324; Eliminated: 14; Number of groups: 12 Round: 28; Survived: 308; Eliminated: 16; Number of groups: 11 Round: 29; Survived: 290; Eliminated: 18; Number of groups: 10 Round: 30; Survived: 270; Eliminated: 20; Number of groups: 9 Round: 31; Survived: 248; Eliminated: 22; Number of groups: 8 Round: 32; Survived: 224; Eliminated: 24; Number of groups: 7 Round: 33; Survived: 198; Eliminated: 26; Number of groups: 6 Round: 34; Survived: 170; Eliminated: 28; Number of groups: 5 Round: 35; Survived: 140; Eliminated: 30; Number of groups: 4 Round: 36; Survived: 108; Eliminated: 32; Number of groups: 3 Round: 37; Survived: 74; Eliminated: 34; Number of groups: 2 Round: 38; Survived: 38; Eliminated: 36; Number of groups: 1
The more interesting problem is in the Extra Credit. At first glance, this might seem impossible to solve, or at least, very complicated. However, with a few observations, we can solve the problem indirectly without calculating the expected values of every
First, note the geometric distribution, which states that if we perform an independent trial with each trial having a
Second, with
Third, note that the question asks the value of
That means, we need a number
The only way that the total player size remains the same after a round is if the group size,
Another methodical way to show that
The LCM of any set of numbers is the product of the highest powers of primes found in the prime factorizations of those numbers. Since 7 is prime, any other set of numbers 1 through 10 excluding a number would mean that we need to multiply back 7 and divide by any prime powers that we no longer need. As
Excluding 2 changes nothing, as 4 and 8 are all higher powers of 2. Excluding 3 also changes nothing as 9 is a higher power of 3. Same line of thinking applies to 4. For 5, as 10 is a multiple of 5, this also changes nothing. Same applies to 6 as well (6 = 2 times 3). For 8, once we elimiate it, we can divide 2520 by 2 as we don't need a third power of 2 anymore. However, (2520/2 = 1260 > 500). For 9, we can divide 2520 by 3 but (2520/3 = 840 > 500). Finally, for 10, if we exclude it instead of 7, we just need to divide 2520 by 2 but that's 1260 > 500.
Therefore, we can only exclude 7 to have a number for the total player size, i.e. 360, to have a 9/10 chance of remaining the same and a 1/10 chance of decreasing, thereby extending the expected number of rounds played by 10 than the previous number, which is what the problem is asking.
I also confirmed this with Monte-Carlo simulation of 100,000 trials for each player size ranging from 1 to 499 (note the big jump around
Therefore, the answer is