TITLE: What is the largest determinant you can get by filling in 0,1 or 2 into a 4-by-4 matrix?
QUESTION [10 upvotes]: For example
$$\left| \begin{array}{ccc}
2 & 0 & 0 & 2 \\
2 & 0 & 2 & 0 \\
0 & 2 & 1 & 2 \\
2 & 2 & 0 & 0 \end{array} \right|=40$$
Can it get bigger than that? And what's your approach?

REPLY [10 votes]: First of all, the option of filling in a "1" can always be avoided because the determinant is always a linear function of any entry. So substituting either 2 or 0 can ensure an equal or bigger determinant.
And if the question is to fill in either 2 or 0, then as Mark Bennet pointed out, it can be simplify into a binary matrix. However, this "simplified" problem is actually a particular case of the very complicated "Hadamard's maximal determinant problem" (MathWorld | Wikipedia). The general solution still has not been discovered yet.
The answer for this particular case is $48=3\times2^4$. And there're 60 different possible matrices that have this determinant.