Source: Quantnet Forums
A question which is asked on interview in some software development companies.
I guessed 3 natural numbers - x,y,z. You can ask me about two sums of these numbers with any coefficients - a,b,c. For example, you give me a, b and c and I tell you the result of the expression a*x+b*y+c*z. Give me the algorithm to find x,y and z.
Irrespective of whether you get the solution, its interesting that you are solving a system of three variables using two equations. You are able to do that because the coefficient in the second equation depends on the answer of the first equation. :)
Update (November 6, 2011):
Solution: Posted by Harsh Pareek (Graduate Student at UT Austin, CSE IITB 2011 Alumnus), Rudradev Basak (IITD CSE Senior Undergraduate) and AnonymousD in comments!