Editorial for A Math Contest P15 - Matrix Fixed Point
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Our goal is just to find a vector that satisfies and sums to . By rearranging, we can find that:
Thus, we just need to find the kernel of . In particular, since the answer exists and is unique, we know that so the basis has exactly one element, and we can just scale the single basis vector so that its sum is .
This can be done with Gaussian elimination.
Alternatively, we can just solve directly for the linear system by further constraining it so that the only result is where . This can be done by adding an additional row of s to , and making the target vector .
Time Complexity:
Comments