Message
| OK, given those limitations, I see that the calculations would be:
2 items: 29
3 items: 29 * 28 = 812
4 items: 812 * 27 = 21924
5 items: 21924 * 26
and so on ...
So the first item in your list (once you sort it alphabetically) can combine with 29 other items, so that is 29 things to try. And if it has 3 reagents, then for each of those 29 you can combine with a further 28 giving 812 possibilities. For each of those 812 you can combine with another 27, and so on.
I wrote some Lua code to test out how many there would be:
-- work out crafting recipe
MIN_REAGENTS = 1
MAX_REAGENTS = 8
REAGENT_COUNT = 30
local count = 0
for reagent = 1, REAGENT_COUNT - 1 do
print ()
print ("Starting with reagent", reagent)
print ()
local previous = 1
for reagents = MIN_REAGENTS, MAX_REAGENTS - 1 do
local thisCount = previous * (REAGENT_COUNT - reagents - reagent + 1)
print (string.format ("%i items, combinations = %i", reagents + 1, thisCount))
previous = thisCount
count = count + thisCount
end -- for
end -- for each starting reagent
print ()
print ("Total combinations =", count)
Results:
Starting with reagent 1
2 items, combinations = 29
3 items, combinations = 812
4 items, combinations = 21924
5 items, combinations = 570024
6 items, combinations = 14250600
7 items, combinations = 342014400
8 items, combinations = 7866331200
Starting with reagent 2
2 items, combinations = 28
3 items, combinations = 756
4 items, combinations = 19656
5 items, combinations = 491400
6 items, combinations = 11793600
7 items, combinations = 271252800
8 items, combinations = 5967561600
Starting with reagent 3
2 items, combinations = 27
3 items, combinations = 702
4 items, combinations = 17550
5 items, combinations = 421200
6 items, combinations = 9687600
7 items, combinations = 213127200
8 items, combinations = 4475671200
Starting with reagent 4
2 items, combinations = 26
3 items, combinations = 650
4 items, combinations = 15600
5 items, combinations = 358800
6 items, combinations = 7893600
7 items, combinations = 165765600
8 items, combinations = 3315312000
Starting with reagent 5
2 items, combinations = 25
3 items, combinations = 600
4 items, combinations = 13800
5 items, combinations = 303600
6 items, combinations = 6375600
7 items, combinations = 127512000
8 items, combinations = 2422728000
Starting with reagent 6
2 items, combinations = 24
3 items, combinations = 552
4 items, combinations = 12144
5 items, combinations = 255024
6 items, combinations = 5100480
7 items, combinations = 96909120
8 items, combinations = 1744364160
Starting with reagent 7
2 items, combinations = 23
3 items, combinations = 506
4 items, combinations = 10626
5 items, combinations = 212520
6 items, combinations = 4037880
7 items, combinations = 72681840
8 items, combinations = 1235591280
Starting with reagent 8
2 items, combinations = 22
3 items, combinations = 462
4 items, combinations = 9240
5 items, combinations = 175560
6 items, combinations = 3160080
7 items, combinations = 53721360
8 items, combinations = 859541760
Starting with reagent 9
2 items, combinations = 21
3 items, combinations = 420
4 items, combinations = 7980
5 items, combinations = 143640
6 items, combinations = 2441880
7 items, combinations = 39070080
8 items, combinations = 586051200
Starting with reagent 10
2 items, combinations = 20
3 items, combinations = 380
4 items, combinations = 6840
5 items, combinations = 116280
6 items, combinations = 1860480
7 items, combinations = 27907200
8 items, combinations = 390700800
Starting with reagent 11
2 items, combinations = 19
3 items, combinations = 342
4 items, combinations = 5814
5 items, combinations = 93024
6 items, combinations = 1395360
7 items, combinations = 19535040
8 items, combinations = 253955520
Starting with reagent 12
2 items, combinations = 18
3 items, combinations = 306
4 items, combinations = 4896
5 items, combinations = 73440
6 items, combinations = 1028160
7 items, combinations = 13366080
8 items, combinations = 160392960
Starting with reagent 13
2 items, combinations = 17
3 items, combinations = 272
4 items, combinations = 4080
5 items, combinations = 57120
6 items, combinations = 742560
7 items, combinations = 8910720
8 items, combinations = 98017920
Starting with reagent 14
2 items, combinations = 16
3 items, combinations = 240
4 items, combinations = 3360
5 items, combinations = 43680
6 items, combinations = 524160
7 items, combinations = 5765760
8 items, combinations = 57657600
Starting with reagent 15
2 items, combinations = 15
3 items, combinations = 210
4 items, combinations = 2730
5 items, combinations = 32760
6 items, combinations = 360360
7 items, combinations = 3603600
8 items, combinations = 32432400
Starting with reagent 16
2 items, combinations = 14
3 items, combinations = 182
4 items, combinations = 2184
5 items, combinations = 24024
6 items, combinations = 240240
7 items, combinations = 2162160
8 items, combinations = 17297280
Starting with reagent 17
2 items, combinations = 13
3 items, combinations = 156
4 items, combinations = 1716
5 items, combinations = 17160
6 items, combinations = 154440
7 items, combinations = 1235520
8 items, combinations = 8648640
Starting with reagent 18
2 items, combinations = 12
3 items, combinations = 132
4 items, combinations = 1320
5 items, combinations = 11880
6 items, combinations = 95040
7 items, combinations = 665280
8 items, combinations = 3991680
Starting with reagent 19
2 items, combinations = 11
3 items, combinations = 110
4 items, combinations = 990
5 items, combinations = 7920
6 items, combinations = 55440
7 items, combinations = 332640
8 items, combinations = 1663200
Starting with reagent 20
2 items, combinations = 10
3 items, combinations = 90
4 items, combinations = 720
5 items, combinations = 5040
6 items, combinations = 30240
7 items, combinations = 151200
8 items, combinations = 604800
Starting with reagent 21
2 items, combinations = 9
3 items, combinations = 72
4 items, combinations = 504
5 items, combinations = 3024
6 items, combinations = 15120
7 items, combinations = 60480
8 items, combinations = 181440
Starting with reagent 22
2 items, combinations = 8
3 items, combinations = 56
4 items, combinations = 336
5 items, combinations = 1680
6 items, combinations = 6720
7 items, combinations = 20160
8 items, combinations = 40320
Starting with reagent 23
2 items, combinations = 7
3 items, combinations = 42
4 items, combinations = 210
5 items, combinations = 840
6 items, combinations = 2520
7 items, combinations = 5040
8 items, combinations = 5040
Starting with reagent 24
2 items, combinations = 6
3 items, combinations = 30
4 items, combinations = 120
5 items, combinations = 360
6 items, combinations = 720
7 items, combinations = 720
8 items, combinations = 0
Starting with reagent 25
2 items, combinations = 5
3 items, combinations = 20
4 items, combinations = 60
5 items, combinations = 120
6 items, combinations = 120
7 items, combinations = 0
8 items, combinations = 0
Starting with reagent 26
2 items, combinations = 4
3 items, combinations = 12
4 items, combinations = 24
5 items, combinations = 24
6 items, combinations = 0
7 items, combinations = 0
8 items, combinations = 0
Starting with reagent 27
2 items, combinations = 3
3 items, combinations = 6
4 items, combinations = 6
5 items, combinations = 0
6 items, combinations = 0
7 items, combinations = 0
8 items, combinations = 0
Starting with reagent 28
2 items, combinations = 2
3 items, combinations = 2
4 items, combinations = 0
5 items, combinations = 0
6 items, combinations = 0
7 items, combinations = 0
8 items, combinations = 0
Starting with reagent 29
2 items, combinations = 1
3 items, combinations = 0
4 items, combinations = 0
5 items, combinations = 0
6 items, combinations = 0
7 items, combinations = 0
8 items, combinations = 0
Total combinations = 31039364129
So that is 31,039,364,129 combinations, assuming I got that right. I still think it will take too long. You might want to ask the boss-person of the MUD if they really want you to hit their MUD with 31,039,364,129 attempts to work out their crafting system, or maybe to save everyone a lot of effort, make a post telling you what the recipes are. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|