A Appendix Additional Background Derivations and Algorithm Details