design ana.lysis of algorithm QB