  The computational cost of solving an inverse problem governed by PDEs, using
multiple experiments, increases linearly with the number of experiments. A
recently proposed method to decrease this cost uses only a small number of
random linear combinations of all experiments for solving the inverse problem.
This approach applies to inverse problems where the PDE solution depends
linearly on the right-hand side function that models the experiment. As this
method is stochastic in essence, the quality of the obtained reconstructions
can vary, in particular when only a small number of combinations are used. We
develop a Bayesian formulation for the definition and computation of encoding
weights that lead to a parameter reconstruction with the least uncertainty. We
call these weights A-optimal encoding weights. Our framework applies to inverse
problems where the governing PDE is nonlinear with respect to the inversion
parameter field. We formulate the problem in infinite dimensions and follow the
optimize-then-discretize approach, devoting special attention to the
discretization and the choice of numerical methods in order to achieve a
computational cost that is independent of the parameter discretization. We
elaborate our method for a Helmholtz inverse problem, and derive the
adjoint-based expressions for the gradient of the objective function of the
optimization problem for finding the A-optimal encoding weights. The proposed
method is potentially attractive for real-time monitoring applications, where
one can invest the effort to compute optimal weights offline, to later solve an
inverse problem repeatedly, over time, at a fraction of the initial cost.
