A dual pair of optimization-based formulations for estimation and control. (January 2015)