added declaration for rkm_for_k_patterns_of_same_len