This script (written in Python) is used to simulate Algorithm 1 and Algorithm 8. Please see Section F in the paper for details. 