Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OK, so I am choosing 4 letters/numbers out of 10 possible letters. These letters are X,Y,LT,LB,RT,RB,U,D,L,R. The first three letters can be any one of these, but must contain at least one X or Y. The last letter can be an U,D,L, or right. Can someone please figure out the possible combinations?

share|cite|improve this question
Seem like you might be writing a game, if so, why don't you write to a program to generate it out? Also, you are missing A,B? – Aryabhata Feb 3 '11 at 3:31
LT, LB, RT, RB are letters? – PEV Feb 3 '11 at 3:31

There are $10^3$ combinations without a restriction in the first three letters. Now there are $8^3$ possible combinations for the first three letters that do not contain a $Y$ nor $X$, so there are $10^3 - 8^3 = 488$ possibilities with your restrictions in the first three letters. There are 4 choices for the last letter, hence there are $488 \cdot 4 = 1952$ choices.

Oh, in case you don't allow repetition (it says "at least one $X$ or $Y$," that's a bit misleading):

Fix some letter from $U, D, L, R$ in the last position. Then you have in general $9 \cdot 8 \cdot 7 = 504$ choices for the first letter, without restrictions. $7 \cdot 6 \cdot 5 = 210$ of these choices do not have an $X$ or $Y$. So total you have $(504 - 210) \cdot 4 = 1176$ choices without repetition.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.