Figure 1:
Algorithm Description.