How many ways to combine A, B, C and that pesky D?

edited April 2015 in Game Design Help
Arh! Maths, my nemesis! Why must you haunt me so? In my defence, I was surreptitiously reading Beowulf during classes.

I know there are 24 ways to combine A, B, C and D. ...right? From AAAA to DDDD stopping off at ABCD somewhere in the middle. Can you help me name name, gang?

Help me, and I might just tell you what I'm drawing up over here.

Comments

  • 1. AAAA 2.BBCC 11.DDDD 12.ACCC 23. ????
    3. AAAB 4.BCCC 13.DDDA 14.BBBD 24. ????
    5. AABB 6.CCCC 15.DDAA 16.BBDD
    7. ABBB 8.CCCD 17.DAAA 18.BDDD
    9.BBBB 10.CCDD 19.AAAC 20.ABDC
    11.BBBC 12.CDDD 21.AACC 22. ????
  • edited April 2015
    So I'm not sure if I entirely understand the question. There are only 24 permutations if you first say that each letter can be used only once per construction.

    ABCD BACD ETC.
    ABDC BADC
    ACBD BCAD
    ACDB BCDA
    ADBC BDAC
    ADCB BDCA

    However if AAAA is a legitimate construction, then there are 256 potential permutations. Or if you are saying that order doesn't matter, and you are just concerned with unique combinations of 4, as it looks like your second post (posted while I was typing) suggests, then there are evidently still more than 24 (tho I can't remember how to calculate it atm). There is at least ABCC, ABDD, ACBB, ACDD, ADCC, AABC, AABD, AADC.

    edit: and DDBC BBDC CCBD.
  • edited April 2015
    If you can have A, B, C, or D in any slot, replacements possible, then there's 4^4 = 256 ways. Basically: 4 letters in the first slot x 4 letters in the second slot x 4 letters in the third slot x 4 letters in the fourth slot.

    Here's a rundown of some of them, to give you an idea...
    AAAA AAAB AAAC AAAD AABA AABB AABC AABD
    AACA AACB AACC AACD AADA AADB AADC AADD
    ABAA ABAB ABAC ABAD ACAA ACAB ACAC ACAD

    There's 24 right there, and I haven't even started. :-)

    As a contrast, if you don't allow repeats, that's 4 x 3 x 2 x 1 = 12 possible arrangements of the letters.
  • It's like calculating dice results. 2d6 gives (6×6=) 36 different outcomes. This is nothing more than 4d4 (=4×4×4×4).
  • edited April 2015
    Okay, so I think what the OP is getting at is unique combinations where order doesn't matter but repetition is allowed. So AACA would be equivalent to ACAA and AAAC and CAAA, etc.. If this is the case I think the answer is 7 choose 4 = 35, including the 23 options you've posted (you've got two 11s and 12s) the 11 I posted, and one more (ADBB). How I got that is kinda complicated but explained in micromass's post (#8) here: https://www.physicsforums.com/threads/combinations-order-doesnt-matter-repetitions-allowed.550502/
  • It's like dice results, except the dice are rolled all at once and not one at a time. This means that the series "AABA" is the same as "ABAA" is the same as "BAAA". (Correct me if I'm wrong - that's one muddled way of asking the question.)

    Because the position does not matter, we're not looking for permutations, and because we're pulling from the same pool for each letter (the full range A-D, regardless of what was pulled last), we're not looking at combinations either. What we are looking for is combinations with repetition, which happens to have a neat combinatorial formula: given a set of four cells (A-D) and four picks, the number of different combinations is [seven over four] = 35.

    ("Seven over four" is a specific combinatorics operation, you can check it in e.g. Wikipedia. A bit of specific multiplication, with the goal of finding out how many ways you can pull four things out of a set of seven things.)

    The easiest way to list them all is to assume that the series is always sorted from A to D, and then start listing them in order, moving through all combinations, but skipping any that would not have the results in the correct order. Like so:

    AAAA
    AAAB
    AAAC
    AAAD

    AABB
    AABC
    AABD

    AACC
    AACD

    AADD

    - As you can see, we avoided listing e.g. "AABA" because that would be the same as "AAAB" which we already listed. This is easy if you move through the last digits in sequence, and move up one digit every time you end up at D. Moving on:

    ABBB
    ABBC
    ABBD
    ABCC
    ABCD
    ABDD
    ACCC
    ACCD
    ACDD
    ADDD
    BBBB
    BBBC
    BBBD
    BBCC
    BBCD
    BBDD
    BCCC
    BCCD
    BCDD
    BDDD
    CCCC
    CCCD
    CCDD
    CDDD
    DDDD

    I hope that answered the question.
  • Arh! Maths, my nemesis! Why must you haunt me so? In my defence, I was surreptitiously reading Beowulf during classes.
    Hwæt! We of the Dice-Danes / in days long gone
    Rolled whale-bone wyrd, / wrought glory with dice.
    One of the People-kin, / Potemcynn named,
    Sailed forth from Story-games, / the golden hall.
    Until the riddle was solved / no rest would there be, nor safety
    From the manslaughter of Math, / the mad night-stalker...

  • Thank you, everyone. I think I've my answer of 35. It takes a good mind to find the right answers in the wrong questions.

    Now, as you've been patient, I'll try tell you what I'm doing:

    I'm trying to build a deck of actions. In this game you control a stable of nobles loosely arranged into a House and each turn you play four cards out of a hand of seven. The composition of the hand determines what happens to your house that season.

    "A" Cards represent Positive events. So let's call them "P."
    "B" Cards represent Internal events. So let's call them "I."
    "C" Cards represent External events. So let's call them "E."
    "D" Cards represent Negative events. So let's call them "N."

    PPPP is a universal postive, effecting all players. NNNN is it's opposite. A harsh winter, a plague.
    IIII allows a player to bring a new piece onto the board, and EEEE represents the drawing together of webs to eliminate another player's piece.

    I'm trying to work out solutions to all 35 combinations. Perhaps IIEE is a marriage? What then is PIEN, or the enigmatic PPNN? An unresolved conflict?

    If anyone feels like playing a little mental game and giving me a few suggestions, I'd be very grateful!
  • edited April 2015
    My suggestion isn't necessarily to define solutions for all possible combinations; I feel like that'd be way too much to get my head around. Instead, I'd recommend doing it in a component fashion: have ten different (possibly generic) events, each formed by a combination of two of the four cards. You play four cards, and out of the cards you played, you pick two pairings.

    Example
    PP: a "boon", a bounty or gain given out
    II: "growth", an event which fleshes out or increases something
    EE: "motion", some force which alters the course of events and imposes its will
    NN: a "bane", some foul or malevolent outcome
    PI: "inspiration", the rise of a young new element to power
    PE: "salvation", someone coming from without who brings a great help
    PN: "disruption", confusion and a bit of anarchy that brings damage but promise
    IE: "crisis", a clash between outside forces and internal agents
    IN: "corruption", a decay of systems within
    EN: "shadow", a menacing turn of events without

    So you have ten possible main events, but they also change depending on which other event they're coupled with, as well as the larger context of the event. Maybe if an event is repeated, it redoubles the intensity of the event? (So PPPP would be a great blessing for all, and PNPN would be massive upheaval of the status quo.)
  • edited April 2015
    I think the main problem with the two categories is that they cancel eachother out, hence the enigmatic PPNN. It's a golden idea though to work with the cards in this way.

    You could also make each letter have a different category, that don't exclude eachother. A is positive, D is not negative, but rather success. AD (earlier PN) could then be a Pyrrhic Victory for instance (or its opposite).

    If a letter turns up twice, it may signify the flipside: negative instead of positive, unsuccessful instead of success. A third time may reverse it once more. This way the sequence could also be important and exciting. If you want complexer rules, you could also have the player hold a hand of cards, like in hold'em poker, where they could play a card to cancel an effect. Maybe the last card has the strongest effect (like the over-arcing mood in a scene), and cannot be reversed?
  • edited April 2015
    Negative doesn't necessarily cancel out positive. I don't think any of the opposed pairs necessarily contradict one another; many things in life, and especially in stories, have such contradictory elements side-by-side.
Sign In or Register to comment.