0

For a given NxN matrix what is not the value of N such that the dot product of a row with itself will be even and dot product of any row with a different row is odd.
a) 2k b) 2k,4k,4k+1 c) 4k

learner
  • 133
  • this was asked to my friend in a written interview test, am unable to understand question properly. I am unable to see any logic why order can affect dot product to be odd or even shouldn't it depend on entries in matrix? So I thought I might be missing something and hence asked this question here – learner Nov 08 '13 at 15:49

1 Answers1

1

Here are some ideas that may help the thought process, presented as a HINT. Given that any row must dot as odd with any other row, there is not a zero row mod 2 (no row with all even values). Given that any row dots even with itself, each row has an even number of odd elements.

Consider

$$\pmatrix{0 & 1 & 1& 1&\\ 1& 0& 1& 1& \cdots\\ 1& 1& 0& 1& \\ 1& 1& 1& 0& \\ \vdots & & & & \ddots }$$

This shows existence for any $N = 2k + 1$.

Next consider the smallest even dimension $N =2$ ...

adam W
  • 5,565