Le Monde puzzle [#1112]
This article is originally published at https://xianblog.wordpress.com
Another low-key arithmetic problem as Le Monde current mathematical puzzle:
Find the 16 integers x¹,x²,x³,x⁴,y¹,y²,y³,y⁴,z¹,z²,z³,z⁴,w¹,w²,w³,w⁴ such that the groups x¹,y¹,z¹,w¹, &tc., are made of distinct positive integers, the sum of the x’s is 24, of the y’s 20, of the z’s 19 and of the w’s 17. Furthermore, x¹<max(y¹,z¹,w¹), x²<max(y²,z²,w²), x³<max(y³,z³,w³)=z³, and x⁴<max(y⁴,z⁴,w⁴), while x¹<x².
There are thus 4 x 3 unknowns, all bounded by either 20-3=17 or 19-3=16 for x³,y³,z³. It is then a case for brute force resolution since drawing all quadruplets by rmultinom until all conditions are satisfied
valid=function(x,y,z,w){ (z[3]>max(y[3],w[3]))&(x[1]<x[2])&(sum(x)==24)& (sum(y)==20)&(sum(z)==19)&(sum(w)==17)}
returns quickly several solutions. Meaning I misread the question and missed the constraint that the four values at each step were the same up to a permutation, decreasing the number of unknowns to four, a,b,c,d (ordered). And then three because the sum of the four is 20, average of the four sums. It seems to me that the first sum of x’s being 24 and involving only a,b, and c implies that 4c is larger than 24, ie c>6, hence d>7, while a>0 and b>1, leaving only two degrees of freedom for choosing the four values, meaning that only
1 2 7 10
1 2 8 9
1 3 7 9
1 4 7 8
2 3 7 8
are possible. Sampling at random across these possible choices and allocating the numbers at random to x,y,z, and w leads rather quickly to the solution
[,1] [,2] [,3] [,4] [1,] 3 7 7 7 [2,] 2 8 2 8 [3,] 7 2 8 2 [4,] 8 3 3 3
Thanks for visiting r-craft.org
This article is originally published at https://xianblog.wordpress.com
Please visit source website for post related comments.