I have not developed entirely the idea, but I am sure it works.
Just write the corresponding linear system. You will have n unknowns
and n(n-1)/2 equations. Provided that the system is consistent you can
find a solution by Gaussian elimination.
For the complexity, you can do it in less than n^3/3 +O(n^2)
operations, because it is simpler than just inverting a nxn matrix.
Inverting the matrix can let you solve the problem for many instances.
It would be interesting to exploit the special structure of this
matrix in order to speed up the computation. Please post if you find
such an improvement.

Best Regards,

Antonio

On Nov 7, 5:16 pm, Andrey <[EMAIL PROTECTED]> wrote:
> Any set of n integers form n(n - 1)/2 sums by adding every possible
> pair.
> The task is to find the n integers given the set of sums.
>
> Any ideas?
>
> I've found out the solution but I doubt it the best one...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to