Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 [2]  All

Author Topic: How many possible kingdoms are there?  (Read 9204 times)

0 Members and 1 Guest are viewing this topic.

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 9707
  • Respect: +10765
    • View Profile
Re: How many possible kingdoms are there?
« Reply #25 on: March 23, 2020, 07:25:31 pm »
0

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.

I would agree.
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

hhelibebcnofnena

  • Minion
  • *****
  • Offline Offline
  • Posts: 529
  • she/her
  • Respect: +409
    • View Profile
Re: How many possible kingdoms are there?
« Reply #26 on: March 23, 2020, 09:54:44 pm »
0

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.

I would agree.

The best way to calculate that would probably be to calculate the # of kingdoms, pretending Young Witch wasn't even a card, and then double-count all the kingdoms with cards costing or .
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 9707
  • Respect: +10765
    • View Profile
Re: How many possible kingdoms are there?
« Reply #27 on: March 23, 2020, 10:52:50 pm »
0

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.

I would agree.

The best way to calculate that would probably be to calculate the # of kingdoms, pretending Young Witch wasn't even a card, and then double-count all the kingdoms with cards costing or .

Not following... the Young Witch Kingdoms would have 11 piles instead of 10; which would do a lot more than just double count wouldn't it?
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #28 on: March 23, 2020, 10:56:23 pm »
+3

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.

I would agree.

The best way to calculate that would probably be to calculate the # of kingdoms, pretending Young Witch wasn't even a card, and then double-count all the kingdoms with cards costing or .

Way ahead of you there. Black Market is hard though. Busting out integrals for that so I don't have to write a different equation for each possible size. Still working out the various formulas, by the way.

Not following... the Young Witch Kingdoms would have 11 piles instead of 10; which would do a lot more than just double count wouldn't it?

The eleventh pile is Young Witch herself. So if we get a bunch of 10-card kingdoms, all of which have at least one or card, then add Young Witch to that kingdom, it becomes a valid kingdom.
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #29 on: March 23, 2020, 11:53:52 pm »
0

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: How many possible kingdoms are there?
« Reply #30 on: March 24, 2020, 12:22:09 am »
0

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.

That is definitely not true in general:

∫₁⁵ x dx = 12
1 + 2 + 3 + 4 + 5 = 15
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

crj

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1477
  • Respect: +1644
    • View Profile
Re: How many possible kingdoms are there?
« Reply #31 on: March 24, 2020, 01:10:18 am »
0

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.
Ignoring the set-theoretical arguments for a moment, this doesn't make sense in real-world terms. A kingdom containing Young Witch, Ambassador and Fortune Teller will play out very differently depending on which of the latter two is the Bane.
Logged

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 9707
  • Respect: +10765
    • View Profile
Re: How many possible kingdoms are there?
« Reply #32 on: March 24, 2020, 02:35:30 am »
+1

So, I'm going to assume that since we don't care about ruins order, knights order, or which card obelisk picks, we also don't care which card specifically is the bane, only that there are 11 kingdom cards including young witch, and at least one of them costs $2 or $3.
Ignoring the set-theoretical arguments for a moment, this doesn't make sense in real-world terms. A kingdom containing Young Witch, Ambassador and Fortune Teller will play out very differently depending on which of the latter two is the Bane.

Yes but how the game will play out isn’t the question being asked. There’s various definitions of “different kingdom”, but people in general here seem to be going with a question of which cards are available. If you include which card is the bane, then you should also include the order of Knights, order of Black Market deck, Obelisk choice, etc.
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #33 on: March 24, 2020, 12:33:31 pm »
0

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.

That is definitely not true in general:

∫₁⁵ x dx = 12
1 + 2 + 3 + 4 + 5 = 15

Ok, is there a way to do that where I don't have to individually calculate (or rather, type into wolfram alpha) f(x) for each integer value in the range?
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2707
    • View Profile
Re: How many possible kingdoms are there?
« Reply #34 on: March 24, 2020, 01:09:10 pm »
0

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.

That is definitely not true in general:

∫₁⁵ x dx = 12
1 + 2 + 3 + 4 + 5 = 15

Ok, is there a way to do that where I don't have to individually calculate (or rather, type into wolfram alpha) f(x) for each integer value in the range?

The best thing to do would be to look for a closed-form solution of the sum, which is nontrivial.  Wolfram Alpha can sometimes figure it out for you.  Actually, you could just type in your formula and tell it to do a sum.  That should work as well.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #35 on: March 24, 2020, 01:53:36 pm »
0

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.

That is definitely not true in general:

∫₁⁵ x dx = 12
1 + 2 + 3 + 4 + 5 = 15

Ok, is there a way to do that where I don't have to individually calculate (or rather, type into wolfram alpha) f(x) for each integer value in the range?

The best thing to do would be to look for a closed-form solution of the sum, which is nontrivial.  Wolfram Alpha can sometimes figure it out for you.  Actually, you could just type in your formula and tell it to do a sum.  That should work as well.

So it did! Cool. Back to work.
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

Dominionaer

  • Golem
  • ****
  • Offline Offline
  • Posts: 180
  • Respect: +66
    • View Profile
Re: How many possible kingdoms are there?
« Reply #36 on: March 24, 2020, 03:50:03 pm »
+1

What about Druid? Do different Druid Boons count as a different kingdom?

Yeah, probably. There are 1,320 different combinations of those, by the way.
?
(12 choose 3) = 220
Logged

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #37 on: March 24, 2020, 05:43:17 pm »
+1

Ok, here's the formulas I have so far:

Our starting point is the 366 kingdom cards, minus Druid, the three Looters, Young Witch, and Black Market, so 360 cards. Let's let An=360!/(n!(360-n)!), so that I can use variables instead of writing out the formula each time I need to grab a different number of cards from this set. So, without those 6 cards (which will be added back in later), we start with A10 kingdoms.

To add Platinum and Colony, as well as Shelters, we'll do the same as in the op, but corrected with the new numbers. Removing Prosperity leaves us with 335 cards, so let Bn=335!/(n!(335-n)!). We've already taken out 3 Dark Ages cards, so we just need to cut the other 32, leaving us with 328 cards, so let Cn=328!/(n!(328-n)!), and we'll let Dn=303!/(n!(303-n)!), or the kingdoms without either. This gives us the follwoing:
Platinum/Colony = A10-B10
Shelters = A10-C10
Both = A10-B10-(C10-D10), or A10-B10-C10+D10
Add all of these to our initial A10 and combine like terms: 4A10-2B10-2C10+D10, or 2(2A10-B10-C10)+D10

Now, to add Druid, we'll calculate the number of 9-card kingdoms (the 10th card is Druid) and multiply by the number of possible combinations of set aside boons. 12!/(3!*9!)=220, so for each kingdom with Druid, there are actually 220 kingdoms. To get the 9-card kingdoms, we'll use the above total formula, using subscript 9 instead of 10. Since Druid costs , any kingdom that has it can also add Young Witch to make a new, valid kingdom, so we'll multiply all of this by 2 again. 2*220=440, and multiply to get:
Kingdoms with Druid = 440(2(2A9-B9-C9)+D9), or 880(2A9-B9-C9)+440D9

Adding Looters gets a little tricky. We're going to limit our scope to 2-player games for this, partly because that's all people care about here, and partly because it makes the math MUCH easier. In a 2-player game, there is a pile of 10 ruins. Since we don't care about probability of any given ruins pile, and there just happen to be 10 copies of each of the 5 ruins, that gives us 510 possible ruins piles. However, that also accounts for the order of the pile. We could do 50!/(10!40!), but that assumes 50 unique ruins, and is several orders of magnitude larger than 510, so until I figure out how to ignore the order of the pile, 510 it is. Since all games with Looters automatically have a chance for shelters, we can ignore the shelters combination formulas and just use 2An-Bn, where n is the number non-Looter cards in the kingdom, and then multiply everything by 2. So:
One Looter = 6*510(2A9-B9)
Two Looters = 6*510(2A8-B8)
Three Looters = 2*510(2A7-B7)

To add Druid to the Looters, we reduce all the subscripts by 1, and multiply by 440 (because why not double count for Young Witch while we're at it?)
One Looter = 2,640*510(2A8-B8)
Two Looters = 2,640*510(2A7-B7)
Three Looters = 880*510(2A6-B6)

Now for the rest of the kingdoms with Young Witch, we're going to end up making some more new variables. There are 108 kingdom cards that cost or . However, we've already removed Druid and Black Market, which cost and respectively, leaving 106. 360-106=254, so let En=254!/(n!(254-n)!).

Next, we have to double count all those that include Prosperity, which means creating yet another variable for the kingdoms with neither Prosperity nor or cards. 3 Prosperity cards cost (Loan, Trade Route, and Watchtower) and have already been removed in our 254. So subtracting the other 22 leaves Fn=232!/(n!(232-n)!).

Now we need the ones with Dark Ages. The set has 3 cards costing and 6 cards costing . Take the 32 from earlier, subtract those 9, we get 23 Dark Ages cards still included. 254-23=231, so let Gn=231!/(n!(231-n)!).

Finally, we create one more variable that includes none of these. So we take our 232, subtract our 23, and we get 209, so let Hn=209!/(n!(209-n)!). So all of the formulas for kingdoms with Young Witch, excluding those with Druid, Looters, or Black Market, are as follows:
Just Young Witch = A10-E10
Young Witch and Platinum/Colony = A10-B10-(E10-F10), or A10-B10-E10+F10
Young Witch and Shelters = A10-C10-(E10-G10), or A10-C10-E10+G10
Young Witch and Both = A10-B10-(C10-D10)-(E10-H10), or A10-B10-C10+D10-E10+H10
Add them up and combine like terms: 4A10-2B10-2C10+D10-4E10+F10+G10+H10, or 4(A10-E10)-2(B10+C10)+D10+F10+G10+H10

Now we add Young Witch to the Looters, or rather, looters to Young Witch. Once again, we can ignore the Shelters component and just multiply by two.
One Looter = 6*510(A9-B9-E9+F9)
Two Looters = 6*510(A8-B8-E8+F8)
Three Looters = 2*510(A7-B7-E7+F7)

We finally arrive at the dreaded Black Market, and here is where things get even more dicey than the Ruins situation above. Allowing for a 0-card Black Market deck based on the brief number theory discussion earlier is simple enough; I could have even included it in all the other formulas above, but that would have confused me when I got to this step, so instead we'll go through several of the above formulas and do two things to them:
1) Reduce the subscript by 1
2)Double count for Young Witch, since Black Market costs (skip this step for formulas that include Druid, since we've already done that there)
Starting point, Platinum/Colony, and Shelters = 4(2A9-B9-C9)+2D9
Druid = 880(2A8-B8-C8)+440D8
One Looter = 12*510(2A8-B8)
Two Looters = 12*510(2A7-B7)
Three Looters = 4*510(2A6-B6)
Druid and one Looter = 2,640*510(2A7-B7)
Druid and two Looters = 2,640*510(2A6-B6)
Druid and three Looters = 880*510(2A5-B5)

Next, we get kingdoms that actually have a Black Market deck. For a Black Market deck of n cards, where 0<n<351, and neither the deck nor the kingdom includes Druid, Looters, or Young Witch, there are 360!/(n!(360-n)!)*(360-n)!/(9!(351-n)!) possible kingdoms. That simplifies to 360!/(9!n!(351-n!)). Getting the exact sum ∑n=1350 360!/(9!n!(351-n!)) in wolfram alpha expends more computation time than the free version allows, but that doesn't matter because it output it does give me is this:
Quote from: Wolfram Alpha
5.4142756889123355558613982831116653273300579874856051... × 10^757
which is a number so insanely huge that all the other previous math is essentially pointless now. Good job Black Market.

This is as far as I've gotten. That number for Black Market does not account for: which of the two options is chosen from each split pile, which knight is chosen, druid at all, looters at all, shelters, or platinum and colony. Which means that number can only get even crazier. I haven't put the energy into figuring out those formulas; that is also the only one I've put through Wolfram Alpha, but I think we can agree it's pointless running any of the others if we're going to go for all possible Black Market decks.
« Last Edit: March 25, 2020, 11:01:16 am by Doom_Shark »
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

ghostofmars

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 162
  • Respect: +71
    • View Profile
Re: How many possible kingdoms are there?
« Reply #38 on: March 25, 2020, 07:58:54 am »
+1

Wait, the integral thing: will that actually get me what I want? If I integrate f(x) from say, 1 to 300, will I get the same result as calculating f(1) + f(2) + f(3) + ... + f(300)? I barely remember AP calculus AB, so I'd love to hear from someone better at calculus than I am.
Euler–Maclaurin formula
Logged

Gherald

  • Minion
  • *****
  • Offline Offline
  • Posts: 676
  • Awe: +35
  • Respect: +1398
    • View Profile
Re: How many possible kingdoms are there?
« Reply #39 on: March 25, 2020, 10:54:28 am »
0

In other news, there are 10^80 atoms in the Universe
Logged
My opponent has more loot than me

GendoIkari

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 9707
  • Respect: +10765
    • View Profile
Re: How many possible kingdoms are there?
« Reply #40 on: March 25, 2020, 12:00:46 pm »
+1

In other news, there are 10^80 atoms in the Universe

I love how huge the universe is when compared to earth; yet how tiny it is compared to math.
Logged
Check out my F.DS extension for Chrome! Card links; Dominion icons, and maybe more! http://forum.dominionstrategy.com/index.php?topic=13363.0

Thread for Firefox version:
http://forum.dominionstrategy.com/index.php?topic=16305.0

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #41 on: March 25, 2020, 01:39:59 pm »
0

For a Black Market deck of n cards, where 0<n<351, and neither the deck nor the kingdom includes Druid, Looters, or Young Witch, there are 360!/(n!(360-n)!)*(360-n)!/(9!(351-n)!) possible kingdoms. That simplifies to 360!/(9!n!(351-n!)). Getting the exact sum ∑n=1350 360!/(9!n!(351-n!)) in wolfram alpha expends more computation time than the free version allows, but that doesn't matter because it output it does give me is this:
Quote from: Wolfram Alpha
5.4142756889123355558613982831116653273300579874856051... × 10^757
which is a number so insanely huge that all the other previous math is essentially pointless now. Good job Black Market.

So it turns out, when I typed out the simplified version of this equation (and subsequently copied it into Wolfram Alpha), I ended up putting the "!" on the wrong side of a set of parentheses, giving me "(351-n!)" rather than "(351-n)!" which means that the number is wrong. Summing up the corrected formula does not exceed the computation time limit, and so using scientific notation and rounding to two decimal places, we actually get 1.16 × 10123. Still insanely huge, and still several times the estimated number of atoms in the Universe, just significantly less so.
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.

hhelibebcnofnena

  • Minion
  • *****
  • Offline Offline
  • Posts: 529
  • she/her
  • Respect: +409
    • View Profile
Re: How many possible kingdoms are there?
« Reply #42 on: March 25, 2020, 01:46:53 pm »
0

and still several times the estimated number of atoms in the Universe

I would say that 10^43 is quite a bit more than several. I might say it was several orders of magnitude (I assume that was what you meant).
Logged
Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen Fluorine Neon Sodium

Doom_Shark

  • Tactician
  • *****
  • Offline Offline
  • Posts: 434
  • Shuffle iT Username: Doom_Shark
  • Respect: +410
    • View Profile
Re: How many possible kingdoms are there?
« Reply #43 on: March 25, 2020, 01:49:18 pm »
0

and still several times the estimated number of atoms in the Universe

I would say that 10^43 is quite a bit more than several. I might say it was several orders of magnitude (I assume that was what you meant).

Yes, it is what I meant, thank you.
Logged
"I swear to drunk I'm not officer, God."
Generation 33 The first time you see this, copy it, add 1 to the generation number, and add it to your signature. (On any forum) Social experiment.
Pages: 1 [2]  All
 

Page created in 0.066 seconds with 22 queries.