Design and Analysis of Algorithms - integer division (recursive)

n = m1 + m2 + ... + mi; (where mi is a positive integer and 1 <= mi <= n), then the {m1, m2, ..., mi} is a division of n.

If {m1, m2, ..., mi} is not more than the maximum value m, i.e., max (m1, m2, ..., mi) <= m, it is said to belong to a m n divided. Here we denote the number n is divided into m q (n, m);

When n = 6 we can obtain the following division of these types (note, case m> = 6)

 

Guess you like

Origin www.cnblogs.com/wkfvawl/p/11486992.html