Permutations and Sample Spaces Suppose 3 cars can either turn left $(L)$, turn right $(R)$, or go straight $(S)$. I need to find the sample space for all the possibilities but I am not sure how to do that. I know that for 3 cars with 2 possibilities produces the sample space $S=\{RRR,RRL,RLR,RLL,LRR,LRL,LLR,LLL\}$. But adding on a third possibility confuses me. Is here a systematic way to list all possibilities? I also vague remember there was a formula to calculate the total number of possibilities, it was something like for $n$ choices, there are $2^n$ possibilities.
How would I systematically list all the possibilities?
 A: If there are $k$ "cars" and each car has $m$ choices, the total number of choices is $m^k$.
So in the case of $3$ cars and $3$ choices, the sample space has $3^3$ elements.
As far as listing goes, whether a way to list is good depends on the kind of information you need quick access to. The issues are complex and important. However, what the three cars do can be thought of as a word of length $3$ over the alphabet L, R, S. Listing alphabetically seems reasonable. So the first nine items are LLL, LLR, LLS, LRL, LRR, LRS, LSL, LSR, LSS.
If we think of L as the digit $0$, R as $1$, and S as $2$, then we can think of our string as a "three-digit" number is base $3$. 
A: I think the easiest way is to leave them in the order the question presented them (L, R, S order) and just create a list of 27 "triples" starting with LLL, then LLR, then LLS...  Think of L as being 1, R as being 2, and S as being 3, then put them "in ascending numerical order". 111 = LLL, 112 = LLR, 113 = LLS, 121 = LRL... 333 = SSS.
Obviously you will have 27 "triples" so that is the size of your sample space.
Hope this helps you.  I try to keep things simple when possible.
