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
Asked
Active
Viewed 943 times
0

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 Answers
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
-
-
Take for instance $\pmatrix{0 & 1 & 1\ 1& 0& 1\ 1& 1& 0\}$ with $N = 3$ and calculate the various dot products of rows. Can you see how this generalizes for any odd $N$? – adam W Nov 09 '13 at 02:32
-
-
This (first link in the related column for this question) might give you some more ideas. – adam W Nov 10 '13 at 16:12