Child of #11 In more abstract terms than #15 , how did I come up with the algorithm that would suffice for my goals?