Exact decomposition of the algebraic Riccati equations of deterministic and stochastic multimodeling optimal control and filtering problems