2
$\begingroup$

if you are a Londoner you are familiar with the situation: When you rent a bike a machine will produce a $5$-number code made up of $\{1,2,3\}$. My friend said "oh, I had this number before", but I said it is very unlikely as there are plenty of combinations; when he asked how many, I got stuck.

So here is the difficulty: $k=5$ (number of combinations) is smaller than $n=3$. Repetition IS allowed as it can be a code of $11111$ or $12312$. The order matters as well, so the code $11112$ is not $21111$.

Any ideas how many combinations there is? Thanks!

$\endgroup$
1

2 Answers 2

1
$\begingroup$

3 way to pick the first number, 3 ways to pick the second number and so on which equates to $$3^5 =243$$ After only 18 visits, the chances are more likely than not, that you will get a number you have had before.

$\endgroup$
0
$\begingroup$

If it's the total number of combinations you are asking, then It's simply filling 5 places with 10 numbers? which amounts to ${10}^5$ cases.

IF THAT'S WHAT YOU ARE ASKING

$\endgroup$
2
  • 1
    $\begingroup$ And if you are allowed only three numbers $\{1,2,3\}$, this is $3^5$. $\endgroup$
    – mlc
    Commented May 6, 2017 at 9:29
  • $\begingroup$ Yeah indeed. @mlc $\endgroup$ Commented May 6, 2017 at 9:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .