What function returns all possible permutations with repeating list elements? [closed]

Let's say I want to find a sample space of such experiment: There are three exits from the box: Left (L), right (R) and front (F). Three mice have been put in that box. Find the sample space of an event which mouse has chosen which exit. Function Permutations[] gives all different outputs.

L={L,R,F}
Permutations[L]


How can I find also outcomes like {F,F,L}, {R,R,R}... ?

-
It's only terminology. The OP has to state if he/she wants variations or combinations. (In other words: Is (LLF) the same as (LFL)?) –  Stefan Feb 18 at 14:48
yep, sounds like he wants Tuples and is confused about the meaning of Permutations –  Szabolcs Feb 18 at 14:53
@Ajasja When I use your example, I don't get the event {RRR} which the OP demanded. So Permutations does NOT give the asked results. –  Stefan Feb 18 at 15:02
@Misery Please try to re-state your question in an easier to understand way, to avoid all these close and reopen votes. I'd suggest giving an example input and the complete output your desire. –  Szabolcs Feb 18 at 15:10
Question should be restated as: Given a list of 3 distinct objects, how does one form the list of all possible triples of these objects, repetitions allowed? –  murray Feb 18 at 15:17

closed as too localized by Ajasja, belisarius, Verbeia♦Feb 18 at 14:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

 Tuples[{l, r, f}, 3]
(* {{l, l, l}, {l, l, r}, {l, l, f}, {l, r, l}, {l, r, r}, {l, r, f},
{l, f, l}, {l, f, r}, {l, f, f}, {r, l, l}, {r, l, r}, {r, l, f},
{r,  r, l}, {r, r, r}, {r, r, f}, {r, f, l}, {r, f, r}, {r, f, f},
{f, l,  l}, {f, l, r}, {f, l, f}, {f, r, l}, {f, r, r}, {f, r, f},
{f, f,  l}, {f, f, r}, {f, f, f}} *)


?

-

The only problem is that you have a recursive definition ( you want L to be a list and outcome).

In general using identifiers that start with a capital letter is best avoided. D and C are some examples of this.

This is much safer and works as expected:

list = {"L", "R", "F"}
Permutations[list]


If you would like to have "permutations with repetition" then Tuples is the right tool for the job (as kguler already noted):

Tuples[list, 3]

-
And E, and I, and N, and O... –  belisarius Feb 18 at 14:38