Efficient Algorithms for Improving the Accuracy in Motifs Prediction