Hey glasshalffull - great question (and I love the optimism in your username!).
If I can get on my teacher's soapbox for a second, this is where I hate the way that most people study. The GMAT is decidedly not a test of "do you know the formulas" - for the rest of your life you'll have Google on your smartphone and a team of Ivy League interns to know all that stuff for you. So it's not really a formula-based test. Thinking beats remembering just about every time on the GMAT, so if you're ever thinking "I should just plug this into 'the formula'", ask yourself why that formula applies and whether there's any special circumstance to it.
The permutations formula is N!/[(N-K)!], and that applies when you need to select K unique items from a set of N unique items, and and the order matters (arrangements of items, typically).
The combinations formula is N!/[K!(N-K)!] and applies when you need to select K unique items from a set of N unique items and the order does not matter.
Here, the order does matter, right? AAAB is a totally different code from AABA. So because the order of the items matters, we wouldn't use the combinations formula.
We also wouldn't use the permutations formula. Why not? Because we're not using unique items - as we saw with AAAB vs. AABA, we can use the same letter multiple times. What we're really calculating - formula or no formula - is how many options we have for each slot. And for this one, we have:
For a 4-letter code:
The first slot: 26 available options
The second slot: 26 avialable options
The third slot: 26 available options
The fourth slot: 26 available options
And we multiply those together, because for each of the 26 first-letter options, we can branch out into 26 unique second options, then for each of those there are 26 third options, etc.
So the number of 4-letter codes is 26*26*26*26.
____________________________________________________________________
Now here's how they'd ask it as a permutations problem that uses that formula:
How many 4-letter codes can be issued for stocks if each letter can only be used once in any given code?
Here, we'd have:
First letter: All 26 available options
Second letter: Any of the 25 that we didn't use for #1
Third letter: Any of the 24 that remain after the first 2
Fourth letter: Any of the 23 remaining letters after the first 3
or 26*25*24*23
We'd get that, too, by plugging N (26 unique items) and K (the number that we're going to use in our code) into that formula:
N! / [(N-K)!]
26! / [(26-4)!]
26! / 22!
Remember, 26! = 26*25*24*23*(22!), so the 22! in both numerator and denominator would factor to just leave 26*25*24*23.
Honestly, I'd argue that most combinatorics problems are easier to solve by thinking through the number of options than by just using the formula, and even those that would be better off via a formula tend to require some kind of thinking beyond just the formula, so you'll want to know some of the logic behind it anyway to be able to do that thinking.
_____________________________________________
Alright, one more thing, and please don't take this as blatant salesmanship but if you're looking for a good book to click with this kind of thinking in a step-by-step way that takes you from basic combinatorics to complicated applications, my good friend and colleague, Chris, wrote most of the Veritas Prep Combinatorics and Probability book, and made the subject much, much clearer for me.
https://www.amazon.com/Combinatorics-Pro ... _lmf_tit_5