I've just edited my post #58 and added a screen image of my Excel worksheet to show how I used MIF's Combinations Calculator output in Excel.
So you won't necessarily need to look at the YABASIC option...but it is interesting, and a totally different approach!
Btw, the idea for the YABASIC method came from the way I go about doing this longhand.
]]>The code can be run online (free) here: YABASIC
I pasted the above code into YABASIC, and below is their output. The combos are in descending order, as per my code (which I changed to agree with MIF's calculator's order).
For comparison (to help in making custom tweaks for other scenarios), here's the code and YABASIC output for the Post #1 scenario.
The output can be copied from YABASIC via left-click in their output screen, followed by Ctrl+A and then Ctrl+C. Ctrl+V pastes it where you want.
I pasted it into Excel, but had to use the Text Import Wizard to place the data into their respective columns (instead of just a single column).
Edit: I changed the code so the output is in descending order (same as MIF's Combinations Calculator output).
]]>But at least they confirmed the total numbers of combinations mentioned in earlier posts, and spot checks I did on actual combo compositions were accurate.
These are my settings and outputs for the Post #1 and Post #55 scenarios:
In the 'List Them' entry, the first element in each scenario is the group comprising the fixed minimum number of players that must appear in each combo.
Without this 'trick' of reducing the number of elements, I failed in both scenarios:
Post #1: My 'has 3' rule was rejected (the limit is 2, as Mitch said in post #13).
Post #55: "List too large" error (MIF's max combinations is 10,000,000, which is well under the 86,493,225 for this scenario).
I copied MIF's output for post #55 and pasted it into Excel via the Text Import Wizard. That gave a single row/multiple column layout that I converted to multiple rows/multiple columns via Paste/Transpose. Player counts were then obtained by formula, producing the following:
To help explain some things, here's a screen image of my Excel worksheet:
]]>
I got 84 for the corrected version.
Mine are the same as yours, but I've got these 4 extras:
1,6,4,1
1,5,5,1
1,4,6,1
3,4,4,1
Max on Roster = 12
Made up of a combination of QBs, RBs, WRs, & TEs
Each position has a minimum and maximum allowed as shown below
QBs (Min = 1, Max = 7)
RBs (Min = 2, Max = 8
WRs (Min = 2, Max =8)
TEs (Min = 1, Max = 7
This time I came up with 80 combinations (no repeat, order doesn't matter) as shown in the below list.
Did I get it correct this time?
# QB RB WR TE TOT
01 1 8 2 1 12
02 1 7 3 1 12
03 1 7 2 2 12
04 1 6 3 2 12
05 1 6 2 3 12
06 1 5 4 2 12
07 1 5 3 3 12
08 1 5 2 4 12
09 1 4 5 2 12
10 1 4 4 3 12
11 1 4 3 4 12
12 1 4 2 5 12
13 1 3 7 1 12
14 1 3 6 2 12
15 1 3 5 3 12
16 1 3 4 4 12
17 1 3 3 5 12
18 1 3 2 6 12
19 1 2 8 1 12
20 1 2 7 2 12
21 1 2 6 3 12
22 1 2 5 4 12
23 1 2 4 5 12
24 1 2 3 6 12
25 1 2 2 7 12
26 2 7 2 1 12
27 2 6 3 1 12
28 2 6 2 2 12
29 2 5 4 1 12
30 2 5 3 2 12
31 2 5 2 3 12
32 2 4 5 1 12
33 2 4 4 2 12
34 2 4 3 3 12
35 2 4 2 4 12
36 2 3 6 1 12
37 2 3 5 2 12
38 2 3 4 3 12
39 2 3 3 4 12
40 2 3 2 5 12
41 2 2 7 1 12
42 2 2 6 2 12
43 2 2 5 3 12
44 2 2 4 4 12
45 2 2 3 5 12
46 2 2 2 6 12
47 3 6 2 1 12
48 3 5 3 1 12
49 3 5 2 2 12
50 3 4 3 2 12
51 3 4 2 3 12
52 3 3 5 1 12
53 3 3 4 2 12
54 3 3 3 3 12
55 3 3 2 4 12
56 3 2 6 1 12
57 3 2 5 2 12
58 3 2 4 3 12
59 3 2 3 4 12
60 3 2 2 5 12
61 4 5 2 1 12
62 4 4 3 1 12
63 4 4 2 2 12
64 4 3 4 1 12
65 4 3 3 2 12
66 4 3 2 3 12
67 4 2 5 1 12
68 4 2 4 2 12
69 4 2 3 3 12
70 4 2 2 4 12
71 5 4 2 1 12
72 5 3 3 1 12
73 5 3 2 2 12
74 5 2 4 1 12
75 5 2 3 2 12
76 5 2 2 3 12
77 6 3 2 1 12
78 6 2 3 1 12
79 6 2 2 2 12
80 7 2 2 1 12
I corrected my post (#49) to reflect the correct lineup parameters and align the headers of the columns with the entries (looks like it was creating confusion).
Thanks everyone for your responses, let me address each individually
Bob (post #50) - It looks like you are correct, 5-3-3-1 is a valid roster combination. When I have time I'll redo my spreadsheet.
phrontister (post #51 & 53) - As I mentioned above I corrected my original post. It should clear things up and the TEs minimums / maximums are 1 - 7. I'm sure that this will increase the number of combinations in your calculations.
mathland (post #52) - Thanks
-- Mitch
]]>I got 56 combos:
Done by hand, with rows in descending order & columns ranked from left to right (governed by previous row's content).
Done with Mathematica formulas, giving the same result as Excel's.
I don't know how to display M's output like my E's, but copy/paste from M to E, + some manipulation in E, would fix that.
I proceeded with the exercise by assuming that maybe you meant 'WRs' instead of 'PKs' where you said "Made up of a combination of QBs, RBs, TEs & PKs"...because PKs appears nowhere else.
Happy to redo my list if I made a false assumption.
Btw, some WRs in your list are below their minimum of 2.
]]>Some things in your last post puzzle me:
1. The WRs don't appear in the combinations parameter, but they appear
(a) in the minimum/maximum list, and
(b) in the list of 34 combinations.
2. The PKs only feature in the combinations parameter.
Is there some info missing from what you gave?
But very likely I'm not understanding this fully!
]]>I think there may be more, such as 5 3 3 1
I haven't looked for all cases yet.
Bob
]]>First, you are correct phrontister. Sorry it took so long to reply. And I've corrected the post.
But I have another combination of football positions that I would appreciate it if someone would verify my final number of combinations that can make up a fantasy football roster
The parameters are:
Max on Roster = 12
Made up of a combination of QBs, RBs, WRs, & TEs CORRECTED
Each position has a minimum and maximum allowed as shown below
QBs (Min = 1, Max = 7)
RBs (Min = 2, Max = 8
WRs (Min = 2, Max =8)
TEs (Min = 1, Max = 7) CORRECTED
I came up with 34 combinations (no repeat, order doesn't matter) as shown in the below list.
Am I correct in my count of 34 different combinations?
QB RB WR TE TOT
7 2 2 1 12
6 3 2 1 12
6 2 3 1 12
6 2 2 2 12
5 4 2 1 12
5 2 4 1 12
5 2 2 3 12
4 5 2 1 12
4 2 5 1 12
4 2 2 4 12
3 6 2 1 12
3 2 6 1 12
3 2 2 5 12
2 7 2 1 12
2 2 7 1 12
2 2 2 6 12
1 8 2 1 12
1 7 3 1 12
1 7 2 2 12
1 6 4 1 12
1 6 2 3 12
1 5 5 1 12
1 5 2 4 12
1 4 6 1 12
1 4 2 5 12
1 3 7 1 12
1 3 2 6 12
1 2 8 1 12
1 2 7 2 12
1 2 6 3 12
1 2 5 4 12
1 2 4 5 12
1 2 3 6 12
1 2 2 7 12
Total = 34
Thanks - Mitch
]]>Spreadsheet completed showing 6824 possibilities in total. I'll email it to you.
For each lineup/bench possibility I have calculated the number of ways the bench players can be shuffled into the lineup by swapping one player for another of the same positional type. I'll give you one example of how it works:
Look at the sheet row 13. Here's the roster, 3rd lineup bench and calculation:
Roster number 12 = QB QB RB RB RB RB WR WR WR TE PK PK TM TM
Lineup 3 = QB RB RB RB RB WR WR TE PK TM
Bench 3 = QB WR PK TM
Calcs = 24
QB 2 altogether(including the bench), lineup needs 1, so choose 1 from 2 = 2 choices
Four RB, all used so 1 choice
WR 3 altogether, lineup needs 2, so choose 2 from 3 = 3 choices
TE just 1 choice
PK 2 altogether, lineup needs 1, so choose 1 from 2 = 2 choices
TM 2 altogether, lineup needs 1, so choose 1 from 2 = 2 choices
Altogether 2 x 1 x 3 x 1 x 2 x 2 = 24
I have checked a couple dozen entries to make sure the calcs went ok.
Then I totalled the five calcs columns, and then totalled these five to get the final total in cell T49.
Hope that is all ok and I can move on now. Please don't change the rules.
Bob
]]>I'm glad you've got the sheet.
Step 1 was to find all the rosters. I got 46 and I think that's correct. Phro has checked there's no repeats.
Step 2. There are only 5 possible lineups so I inserted those onto the sheet. But some lineups are not possible with some rosters.
eg. With the first roster there are 3 WRs, but the lineup wants 4. So it cannot be done, hence the impossible label. What I did was to run each lineup through each roster, trying to make the lineup and working out what's left on the bench. If there wasn't enough of a position I recorded 'impossible; otherwise I recorded the bench.
You're right that there is one more step to do. I wanted you to cast an eye over my progress so far, in case I'm still missing something in the rules. I suggest you pick a few rosters and think whether the sheet row shows the lineup/bench possibilities. If you cannot find anything wrong I'll do the final step. The code is in my head; so I've just got to implement it.
What I'll do is add another column, after each bench column, that gives the number of player combinations for that lineup/bench. Then it will just be a case of summing up the columns to get the grand total.
Hope that clarifies what I've sent and my plan for the last step.
Bob
]]>