As I mentioned earlier, I have been offered a position at the R&D department of Fair Isaac. This was through the campus interviews.
The first round was a mathematical test that we had to pass in order to be shortlisted for the interviews. I did not do the test that well. However, I have been thinking about a few of the problems, and shall be publilshing the soutions here as and when I get the time.
I was returning from Kharagpur to Hyderabad. The train journey always is the most boring part of the holidays. However, this time it wasn’t so. You have lots of free time to think, and i was thinking about the conversation I had with Pooja. She had asked me about my performance in the second module of the Fair Isaac test, and I replied that I had taken a few calculated smart risks.
It so turns out that I did indeed make a fool of myself. Here I am posting the question and the right solution. Never ask me for the smart logic I had applied in the test. Obviously it back-fired.
Question:
Given that a, b, c, d are all integers, find the number of solutions to the following set of equations:
a + b + c + d = 0
1/a + 1/b + 1/c + 1/d = 0
|a| + |b| + |c| + |d| = 2008
Solution:
From the first two set of equations we can conclude that a = -b, and c = -d.
Using the third equation, we get that
2a + 2c = 2008
=> a + c = 1004
Now, a or c cannot be 0. So the possible set of solutions to this eqation is
{ (1, 1003), (2, 1002) , … , (1003, 1) }
The size of this set is 1003. So, the solution to our original question is
{ (a, -a, c, -c), (a, -a, -c, c), (-a, a, c, -c), (-a, a, -c, c) }
Thus the number of solutions to the given set of equations is 4 x 1003 = 4012
I hope this solution is right.
0 Response to “Fair Isaac Prelims Question 1”