I have two $3 \times 3$ matrices $\mathbf{a}$ and $\mathbf{f}$.
$\mathbf {f}$ is completely known to me. Also $a_{ij} \in [+1,-1]$
\begin{equation} \mathbf{f} = \left( \begin{array}{ccc} f_{11} \space\space f_{12} \space\space f_{13}\\ f_{21} \space\space f_{22} \space\space f_{23}\\ f_{31} \space\space f_{32} \space\space f_{33} \\ \end{array} \right) \end{equation}
\begin{equation} \mathbf{a} = \left( \begin{array}{ccc} a_{11} \space\space a_{12} \space\space a_{13}\\ a_{21} \space\space a_{22} \space\space a_{23}\\ a_{31} \space\space a_{32} \space\space a_{33} \\ \end{array} \right) \end{equation}
\begin{align} y &= \sum_{i=1}^{3}\sum_{j=1}^{3} a_{ij}f_{ij} \\ r &= y+n \end{align}
$n \sim \mathcal{N}(0,\sigma^2)$.
I am obersving $r$ and I need to estimate $\mathbf{a}$.
$\underline{Maximum \space Likelihood \space Approach:}$
$\mathbf{A}$: set of all possible $3 \times 3$ matrices $\mathbf{a}$ matrices. size($\mathbf{A}$)= $2^9$.
One way is to generate $\mathbf{A}$, compute $\mathbf{Y}$ (set of all possible outputs) and then compute distance $(r-y)^2$ and pick that corresponds to the minimum distance. This is the $\textit{maximum likelihood}$ way.
$\underline{Example: size(\mathbf{A})=2}$
\begin{align}
y &= a \\
r &= y+n
\end{align}

Can I pose this problem as an optimization problem that looks for the ML solution in an intelligent way.
I am precisely looking for a solution to this problem. What kind of optimization problem is this. Convex, non-convex ? Under what conditions, this problem is well-posed and has a solution.
I will be grateful for any useful lead
$\underline{NEW \space EDIT: Previously \space done \space work:}$
- Feldman, J.; Wainwright, M.J.; Karger, D.R., "Using linear programming to Decode Binary linear codes," Information Theory, IEEE Transactions on , vol.51, no.3, pp.954,972, March 2005
- Taghavi, M.H.; Siegel, P.H., "Equalization on Graphs: Linear Programming and Message Passing," Information Theory, 2007. ISIT 2007. IEEE International Symposium on , vol., no., pp.2551,2555, 24-29 June 2007