it seems i have understood you. you may have solved the problem

来源: 2010-06-17 10:48:31 [博客] [旧帖] [给我悄悄话] 本文已被阅读:

my explanation use a list of n+N-1 symbols, you break it into two segments as two sides of a n x N rectangle. I think once you arrive this point, you must have solved the problem. C(n+N-1, n)