Hi Heather,
http://www.mathplanet.com/education/pre-algebra/probability-and-statistic/combinations-and-permutations
http://www.mathsisfun.com/combinatorics/combinations-permutations.html
N would be 18 and r would be 2.
Permutations with Repetition
These are the easiest to calculate.
When we have n things to choose from ... we have n choices each time!
When choosing r of them, the permutations are:
n × n × ... (r times)
(In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.)
Which is easier to write down using an exponent of r:
n × n × ... (r times) = nr
Example: in the lock above, there are 10 numbers to choose from (0,1,...9) and we choose 3 of them:
10 × 10 × ... (3 times) = 103 = 1,000 permutations
Jim Gibbs