List 1: Write down the numbers 1 to 99
1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 99
List 2: Take every successive set of three numbers (3k-2, 3k-1, 3k) for k=(1...33) and randomly apply a permutation to the trio. Example:
3, 1, 2, 4, 5, 6, 7, 9, 8, ..., 98
List 3: Multiply the first numbers, second numbers, etc of lists 1 and 2. Example:
3, 2, 6, 16, 25, 36, 49, 72, 72, ..., 9702
What is the expected sum of the values in list 3?
The answer is 328,284.
The expected sum for each trio is
trios 1 through 9
12 75 192 363 588 867 1200 1587 2028
trios 10 through 18
2523 3072 3675 4332 5043 5808 6627 7500 8427
trios 19 through 27
9408 10443 11532 12675 13872 15123 16428 17787 19200
trios 28 through 33
20667 22188 23763 25392 27075 28812
These add up to 328,284.
For example, the third trio (7, 8, 9 in list 1) has:
list 3
permutation member values total
9 8 7 63 64 63 190
9 7 8 63 56 72 191
8 9 7 56 72 63 191
8 7 9 56 56 81 193
7 9 8 49 72 72 193
7 8 9 49 64 81 194
and the totals average 192 as listed in the list of expected values for each trio.
trioAvg=[];
for k=1:33
set1=[3*k-2,3*k-1,3*k];
sets=perms(set1);
setTot=[];
for i=1:length(sets)
set2=sets(i,:);
set3=set1.*set2;
setTot(end+1)=sum(set3);
end
trioAvg(end+1)=mean(setTot);
end
sum(trioAvg)
|
Posted by Charlie
on 2024-09-27 08:57:23 |