2
$\begingroup$

Assume that we have $52$ characters; $26+26$ lowercase and uppercase letters.

We want to create passwords of eight characters long.

There are two conditions

  • The letter I (uppercase i) has to be included.
  • Characters may appear only once.

So, for instance "aaaaaaIaa" is illegal, however "aIbcdefgh" is OK.

My solution:

Since no character may be duplicated and the string must contain at least one I , we have the following basic forms:

I********

*I*******

**I******

***I*****

****I****

*****I***

******I**

********I

Then the possible combination would be $ 8*Perm_{7}(51) = 8* \frac{51!}{(51-7)!} $

Is that correct ?

  • 0
    Your question is not clear.2017-01-21
  • 0
    How many passwords consisting of eight characters contain only upper- And lowercase letters, at least once the uppercase letter I and none Char multiple times?2017-01-21
  • 0
    it need to be multiplied with 8! i think2017-01-21

3 Answers 3

1

Include 'I', select $7$ characters and them permute the $8$ letters. So,

Number of possible passwords
$=\dbinom{51}{7}\times 8!$


Proof: Take a small example. Suppose we have the letters (a,b,c,d) to select from and we are counting the possible arrangements of $3$ letters where c must be come in each arrangement.

According to the same principle used, $\dbinom{3}{2} \times 3!=18$ arrangements are possible. These are

abc,acb,bac,bca,cab,cba
acd,adc,cad,cda,dac,dca
bcd,bdc,cbd,cdb,dbc,dcb

Accoding to some other answers, it must be $\dbinom{3}{2} \times 3=9$ which is clearly not the right way of approaching this problem.

  • 0
    It should be not 8! as we have to place I in any place and we have 8 ways. Not 8!2017-01-21
  • 0
    @KanwaljitSingh, see my edit. I tried with a small example and I think my answer is right.2017-01-21
  • 1
    @Kiran Yes, it's right.2017-01-21
  • 0
    The difference is that you are using combination and I am using permutation. So both are right.2017-01-22
  • 0
    To make it absolutely clear: $8! = 8\cdot7!$ and $8!\cdot\binom{51}{51-7} = 8!\cdot\frac{51!}{7!(51-7)!} = 8\cdot\frac{51!}{(51-7)!}$2017-01-22
0

Your solution is correct.

Multiplying with $8$ is OK, and the "basic forms" are OK. The question remains: How many possibilities are there to place the $51$ remaining characters in to the $7$ remaining places.

The first place can filled with $51$ characters, the second can be filled with only $50$ characters, ..., and finally the seventh place can be filled with the remaining $45$ characters.

So, the total number is

$$8\times 51\times 50\times \cdots \times 45\approx 4.7\times 10^{12}.$$


EDIT

There have been tow approaches to the same problem.

Problem

There are $n$ different symbols and $k$ slots to place them ($k

One of the symbols (the obligatory symbol) has a special role: it has to be part of all the arrangements. The other condition is that one symbol may appears only once.

Approach 1

One can place the obligatory symbol first. It may appear in $k$ different slots. As a result the the remaining $n-1$ symbols will have to be placed in the remaining $k-1$ slots. So the solution is

$$k\times(n-1)(n-2)\cdots (n-k+1).$$

If $n=52$ and $k=8$ then the result is

$$8\times 51\times 50\times 49 \times \cdots 45\approx 4.7\times 10^{12}$$

Approach 2

First we select $k-1$ symbols out of the $n-1$ ones and then multiply the resulting number with the possible orderings of the $k$ symbols (the obligatory one + the $k-1$ ones chosen.) The total is

$$\binom {n-1}{k-1}k!.$$

In our case the result is again $\binom{51}7\times 8!\approx 4.7\times 10^{12}$.

  • 0
    sorry am i not correct ?2017-01-21
  • 0
    My Result is the same is yours ,2017-01-21
  • 0
    $ \frac{51!}{(51-7)!} = \frac{51!}{44!} = 51 *50*...45 $2017-01-21
  • 0
    it is 8! and not 8 in my opinion2017-01-21
  • 0
    why should it be 8! ?2017-01-21
  • 0
    @MedAyssarBenelhedi: Sorry, very sorry. First I thought that your solution was wrong. Then I forgot to change the first sentence. My solution symply explains yours. (I think it is simpler.)2017-01-21
  • 0
    @zoli, please see my edit and the small example taken.2017-01-21
0

Yes you are correct.

Number of ways = $8 \times \frac{51!}{(51-7)!}$