Serving the Quantitative Finance Community

 
User avatar
Barvinok
Topic Author
Posts: 0
Joined: June 19th, 2007, 6:24 pm

intern position interview

July 16th, 2007, 8:56 am

Hello!Recently I have been asked the following problem at the interview for the internship position of quant analyst With a hint I solved it, but.. Find the eigenvalues and eigenvectors of the following n x n matrix:all entries on both of the diagonals are equal to 1;all the other entries of the matrix are equal to 0Good luck!
 
User avatar
amit7ul
Posts: 0
Joined: December 7th, 2004, 8:36 am

intern position interview

July 16th, 2007, 12:43 pm

if n is evenall eigenvalues are 0 and eigenvectors are [0, 0 ,..0]if n is oddn eigenvalues are 1-(nth root of unity) 's
 
User avatar
Barvinok
Topic Author
Posts: 0
Joined: June 19th, 2007, 6:24 pm

intern position interview

July 16th, 2007, 12:52 pm

QuoteOriginally posted by: amit7ulif n is evenall eigenvalues are 0 and eigenvectors are [0, 0 ,..0]if n is oddn eigenvalues are 1-(nth root of unity) 'sI guess it would be fair to give a hint I had been given too:Split the initial matrix to the sum of two, and calculate the powers of the non-identity component
Last edited by Barvinok on July 15th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
Grisha
Posts: 0
Joined: July 1st, 2007, 10:01 am

intern position interview

July 16th, 2007, 1:02 pm

Last edited by Grisha on July 15th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
Vassili
Posts: 0
Joined: September 15th, 2006, 12:30 pm

intern position interview

July 16th, 2007, 1:21 pm

QuoteOriginally posted by: amit7ulif n is evenall eigenvalues are 0 and eigenvectors are [0, 0 ,..0]if n is oddn eigenvalues are 1-(nth root of unity) 'sIt can't be so. the n=2 matrix is (1, 1 ; 1, 1) whose eigenvalues are 0 and 2.Your solution is true for every n: The eigenvalues are 1-(nth root of the cyclotomic polynomial).I think that, even if they give u the hint that Barvinok mentioned, this is a pretty tough question for an interview...
 
User avatar
amit7ul
Posts: 0
Joined: December 7th, 2004, 8:36 am

intern position interview

July 17th, 2007, 4:56 am

cyclotomic polynomial ??
 
User avatar
Vassili
Posts: 0
Joined: September 15th, 2006, 12:30 pm

intern position interview

July 17th, 2007, 6:28 am

QuoteOriginally posted by: amit7ulcyclotomic polynomial ??Yeah... the x^n-1 polynomial... cyclotomic is a fancy word for 'cutting the circle'...
 
User avatar
Firind
Posts: 0
Joined: March 25th, 2007, 2:12 am

intern position interview

July 18th, 2007, 1:47 pm

One can directly calculate the det of the eigenvalue matrix by row reductionWhen n is even, det[A] = [(1-x)^2-1]^(n/2)wehn n is odd, det[A] = (1-x) [(1-x)^2-1]^[(n-1)/2]
 
User avatar
Barvinok
Topic Author
Posts: 0
Joined: June 19th, 2007, 6:24 pm

intern position interview

July 18th, 2007, 8:38 pm

..minimal polynomial of the matrix..and something about its roots..?
 
User avatar
Tapacb
Posts: 0
Joined: July 19th, 2007, 7:27 am

intern position interview

July 19th, 2007, 4:21 pm

if n is even n/2 eigenvalues are 0 and eigenvectors are [1, 0 , 0,..,0, 0, -1], [0, 1, 0,.., 0, -1, 0], [0, 0, 1,.., -1, 0, 0], ...n/2 eigenvalues are 2 and eigenvectors are [1, 0 , 0,..,0, 0, 1], [0, 1, 0,.., 0, 1, 0], [0, 0, 1,.., 1, 0, 0], ... if n is odd then (n-1)/2 eigenvalues are 0, (n-1)/2 eigenvalues are 2 (eigenvectors like in even case). And last eigenvalue is 1 and eigenvector is [0, 0 , ..0, 1, 0..., 0, 0]
 
User avatar
Barvinok
Topic Author
Posts: 0
Joined: June 19th, 2007, 6:24 pm

intern position interview

July 19th, 2007, 4:45 pm

QuoteOriginally posted by: Tapacbif n is even n/2 eigenvalues are 0 and eigenvectors are [1, 0 , 0,..,0, 0, -1], [0, 1, 0,.., 0, -1, 0], [0, 0, 1,.., -1, 0, 0], ...n/2 eigenvalues are 2 and eigenvectors are [1, 0 , 0,..,0, 0, 1], [0, 1, 0,.., 0, 1, 0], [0, 0, 1,.., 1, 0, 0], ... if n is odd then (n-1)/2 eigenvalues are 0, (n-1)/2 eigenvalues are 2 (eigenvectors like in even case). And last eigenvalue is 1 and eigenvector is [0, 0 , ..0, 1, 0..., 0, 0]Good for you
 
User avatar
quantus
Posts: 0
Joined: July 22nd, 2007, 6:49 pm

intern position interview

July 23rd, 2007, 3:33 pm

QuoteOriginally posted by: BarvinokHello!Recently I have been asked the following problem at the interview for the internship position of quant analyst With a hint I solved it, but.. Find the eigenvalues and eigenvectors of the following n x n matrix:all entries on both of the diagonals are equal to 1;all the other entries of the matrix are equal to 0Good luck!Why not to just proceed by definition of eigenvector?Assume we have eigenvector (a_1,..., a_n) and corresponding eigenvalue \lambda, thenBy multiplying the first row of the matrix by the eigenvector you get: a_1+a_nBut by definition of eigenvector it should equal to \lambda a_1. Thusa_1+a_n = \lambda a_1a_1+a_n = \lambda a_n Similarlya_2+a_{n-1}= \lambda a_2a_2+a_{n-1}= \lambda a_{n-1}and so on.So there are only 2 possibilities for eigenvalues.1) \lambda = 2. Then a_1 = a_n, a_2 = a_{n-1} etc.2) \lambda = 0. Then a_1 = -a_n, a_2=-a_{n-1} etc.We can also notice that "half" of the matrix is linearly dependent on the other "half", so "half" of the eigenvalues must be 0, then all of the other "half" clearly must be 2.We have to pay a little attention on what we mean by "half" depending on whether n is even or odd.
 
User avatar
MCarreira
Posts: 64
Joined: January 1st, 1970, 12:00 am

intern position interview

May 14th, 2008, 2:48 pm

QuoteOriginally posted by: Tapacbif n is even n/2 eigenvalues are 0 and eigenvectors are [1, 0 , 0,..,0, 0, -1], [0, 1, 0,.., 0, -1, 0], [0, 0, 1,.., -1, 0, 0], ...n/2 eigenvalues are 2 and eigenvectors are [1, 0 , 0,..,0, 0, 1], [0, 1, 0,.., 0, 1, 0], [0, 0, 1,.., 1, 0, 0], ... if n is odd then (n-1)/2 eigenvalues are 0, (n-1)/2 eigenvalues are 2 (eigenvectors like in even case). And last eigenvalue is 1 and eigenvector is [0, 0 , ..0, 1, 0..., 0, 0]I got basically the same results:if n is even n/2 eigenvalues are 0 and eigenvectors are [-1, 0 , 0,..,0, 0, 1], [0, -1, 0,.., 0, 1, 0], [0, 0, -1,.., 1, 0, 0], ...n/2 eigenvalues are 2 and eigenvectors are [1, 0 , 0,..,0, 0, 1], [0, 1, 0,.., 0, 1, 0], [0, 0, 1,.., 1, 0, 0], ...if n is odd(n-1)/2 eigenvalues are 0 and eigenvectors are [-1, 0 , 0,..,0, 0, 1], [0, -1, 0,.., 0, 1, 0], [0, 0, -1,.., 1, 0, 0], ...(n-1)/2 eigenvalues are 2 and eigenvectors are [1, 0 , 0,..,0, 0, 1], [0, 1, 0,.., 0, 1, 0], [0, 0, 1,.., 1, 0, 0], ...The last eigenvalue is 1 and eigenvector is [0, 0 , ..0, 1, 0..., 0, 0]
 
User avatar
vgoklani
Posts: 0
Joined: March 21st, 2007, 6:49 pm

intern position interview

May 14th, 2008, 5:51 pm

Last edited by vgoklani on May 22nd, 2008, 10:00 pm, edited 1 time in total.
 
User avatar
Bentley
Posts: 0
Joined: September 14th, 2007, 3:54 pm

intern position interview

May 22nd, 2008, 6:14 am

Hi!I obtain the same answer than tapacb and Mcarreira, but I do not make any use of your hint...in fact it is a bit confusing for me...do you need to split the matrix??... What advantage you get from it (without using that hint the problem is solved quite easily...just apply the same elemental operations to half the rows of the matrix) PS: when you say both the diagonals you mean and "x shaped matrix", arent you?