alogrithm int_to_m_base, matrix operate and so on