Found an interesting maths puzzle (originally in German) for those so inclined and who fancy a small diversion:
spektrum.de/raetsel/wie-viele-

Translation: A train is pulling 11 passenger cars. There are 381 passengers total, and in any 3 consecutive cars there are 99 passengers. How many are in the ninth carriage?

(Please use CW to prevent spoilers in the replies so that others can enjoy the puzzle too)

Thanks for a fun puzzle. I haven't much math since finishing university in 2010, so it is good with a refresher 

@mattp
Answer is 15. Can be solved with some simple matrix algebra

twist 

@tajac @mattp How I solved it too. I initially expected to have to use the underdeterminedness to construct an integer solution from the least squares solution, but got a surprise. Using the backslash operation, my version of Matlab gives another less symmetric solution. However, an explicit pinv(M)*RHS gives your solution.

twist 

@imdef
All the ones that are not 15 can be anything as long as they sum to 84 in each pair 🙂
@mattp

twist 

@tajac @mattp True, but I expected the result of the backslash operation to be unique.

twist 

@imdef @mattp
Well, you have 10 equations to determine 11 variables. That inevitably leaves one degree of freedom up for grabs 🤷‍♂️ (to be fair, I didn't give it much though at first myself and intuitively expected the same)

Follow

twist 

@tajac @mattp To be clear, pinv(A)*B is unique even if Ax=B admits multiple solutions. Checking the Matlab manual on the A\B operation, it is computed using QR factorization and pivoting, so that may be why it can fail to be unique even when pinv(A)*B is.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.