Appendix A: The Junction Tree Algorithms