Cody

Problem 45187. Combinations using Stirling numbers of the second kind

Solution 1991700

Submitted on 26 Oct 2019 by William
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
n = 4; k = 3; y_correct = 14; assert(isequal(stirlingSum(n,k),y_correct))

2   Pass
n = 10; k = 5; y_correct = 86472; assert(isequal(stirlingSum(n,k),y_correct))

3   Pass
n = 15; k = 6; y_correct = 676207628; assert(isequal(stirlingSum(n,k),y_correct))

4   Pass
n = 11; k = 9; y_correct = 678514; assert(isequal(stirlingSum(n,k),y_correct))

5   Pass
n = 14; k = 12; y_correct = 190899230; assert(isequal(stirlingSum(n,k),y_correct))

6   Pass
n = 14; k = 1; y_correct = 1; assert(isequal(stirlingSum(n,k),y_correct))

7   Pass
n = 17; k = 4; y_correct = 715860651; assert(isequal(stirlingSum(n,k),y_correct))

8   Pass
n = 10; k = 10; y_correct = 115975; assert(isequal(stirlingSum(n,k),y_correct))