Figure 1: Algorithm architecture.