Let $A \in \{\pm 1\}^{n \times n}$ be a symmetric matrix whose diagonal entries are $+1$. Let $f(A)$ be the smallest number of signs we need to change in $A$ so that it becomes positive semidefinite (while preserving symmetry). My questions are:
Let $A_n$ be an $n \times n$ matrix with all off-diagonal entries equal to $-1$. What is the value of $f(A_n)$?
Let $f_{\max}(n)$ be the maximum of $f(A)$ over all suitable $n \times n$ matrices. Is $f_{\max}(n) = f(A_n)$ true? What is the value of $f_{\max}(n)$?
I am also interested in the same questions for weighted $f(A)$, where changing any element by $x$ costs us $|x|$, and we want to make $A$ positive semidefinite as cheaply as possible.