An Algorithm to Understand Gene Regulation