I'm trying to figure out what the equation is that can calculate the total number of combinations for placing "pips" into rows, where each row has a maximum. I'm not quite sure if that explains it, so here's an example:
6 pips with 3 rows each with a maximum of 5, has 25 combinations:
- "xxxxx" "x" ""
- "xxxxx" "" "x"
- "xxxx" "x" "x"
- "xxxx" "xx" ""
- "xxxx" "" "xx"
- "xxx" "xxx" ""
- "xxx" "" "xxx"
- "xxx" "xx" "x"
- "xxx" "x" "xx"
- "xx" "xxxx" ""
- "xx" "xxx" "x"
- "xx" "xx" "xx"
- "xx" "x" "xxx"
- "xx" "" "xxxx"
- "x" "xxxxx" ""
- "x" "" "xxxxx"
- "x" "xxxx" "x"
- "x" "x" "xxxx"
- "x" "xxx" "xx"
- "x" "xx" "xxx"
- "" "xxxxx" "x"
- "" "x" "xxxxx"
- "" "xxxx" "xx"
- "" "xx" "xxxx"
- "" "xxx" "xxx"
What's the equation that can calculate this, given a(m, r, p) = ? where m is the maximum number of pips per row, r is the number of rows, and p is the pips to select?