Suppose you want to make a password using exactly 4 out of the 6 letters: e, t, a, b, p, k. You do not want to repeat any letter. Only lower-case letters are used. Provide the code that you would use in R to answer how many different passwords can be created.

Respuesta :

Answer:

15 different passwords.

Step-by-step explanation:

Since I need to make a password of 4 letters from 6 given letters without repeating any letters, this can be done using combination.

Combination has to do with selection of some object from a pool of many objects.

Generally, if r objects are to be selected from a pool of n objects, this can be done in nCr number of ways where:

nCr = n!/(n-r)!r!

Applying the formula, if 4 letters are to be selected from 6 letters, this can be done in 6C4 ways

6C4 = 6!/(6-4)!4!

= 6!/2!4!

= 6×5×4!/2×4!

= 6×5/2

= 15ways

This shows that I can use 15 different passwords without repeating any letter

ACCESS MORE