Passwords are used by many computer systems to authenticate identity. Users are
ID: 3809149 • Letter: P
Question
Passwords are used by many computer systems to authenticate identity. Users are always advised to choose passwords that are easy to remember but hard to guess. Lets say one starts with Superman and then applies one modification to it where a modification consists of inserting a number at some position. This process can produce a string like Super5man.
b1. How many different strings can we create starting with Superman?
Suppose we want to apply two modifications to produce a string like 9Super5man or a string like Super95man. We want to determine the different strings. He does this in two steps:
Step 1. Choose the first number (say 5) and insert it in Superman. (It produces Super5man, etc.)
Step 2. Choose the second number (say 9) and insert it in the string obtained after Step 1. (If the string from step 1 was Super5man, then the result can be 9Super5man or Super95man, etc.)
b2. To determine the number of different strings Bob can create, we can just apply the Product Rule.
Explain why the product 1 rule will result in overcounting. In particular, what strings will be counted more than once?
b3. How would you solve the problem? Explain why you think it is correct.
Explanation / Answer
Lets start with the first step:
1.) How many Strings we can create with the starting a superman. Here we have two Numbers 5 and 9. As per the two steps.
In String “Superman” there are 8 characters from S to n. so we can add 5 at any position, means at the starting of String (Before S), in the mid of the String e.g(Sup5erman) and at the end of the String (After n). So there are 9 ways we can add 5 in string superman.
Which are:
5Superman, S5uperman, Su5perman , .…… ,Superman5
After the step a, now we have to insert 9 in new String. Now the length of the string is 9. So the there are 10 places where we can add 9.
So we don’t know where is 5 in superman string. That means if the string is 5Superman, there are 10 steps to add 9 in String and if the String is S5uperman, there are 10 more steps to add 9 in S5uperman. As per the step a the number to add 9 in a string is the product of the present length of String.
That means the possibility to add 9 in String is: 10*9 = 90.
E.g.
95Superman, 59Superman,5S9uperman and so on.
2. So here we applied the product rule which describes that:
If we have a procedure consisting of sequential tasks T1, T2, ... , Tm that can be done in n1, n2, ..., nm ways, respectively, then there are n1n2...nm ways to carry out the procedure
The product 1 rules says that if the power of any number is 1 then the result would be the same number.
Means (n)1 = n
Eg. If I multiply or take the product of a number by 1 means 3*1=3, 5*1=5 always remain the same.
Here in the example the product 1 rule will result in overcounting and it should be neglect in mathematical scenario.
3.) By using the product rule we can solve the question easily, as shown above. This is accurate mechanism to find out the result.