Suppose you have a lock and you don't know the combination to it.
Each field can contain any number ranging from 0 through 9. How many combinations can there possibly be? How to find the right combination?
One way to find the right combination is by trying all the possible combinations until the right one is found. Since the maximum value for each field is 9 and in this case we have 4 fields we can count from 0000 to the maximum value which is 9999 to generate all the possible combinations.
To know how many possible combinations there are, simply take the maximum value and add 1 to it. In this case 9999 + 1 = 10000. The 1 is simply because 0000 also counts as a possible combination.
Each field can contain any number ranging from 0 through 9. How many combinations can there possibly be? How to find the right combination?
One way to find the right combination is by trying all the possible combinations until the right one is found. Since the maximum value for each field is 9 and in this case we have 4 fields we can count from 0000 to the maximum value which is 9999 to generate all the possible combinations.
To know how many possible combinations there are, simply take the maximum value and add 1 to it. In this case 9999 + 1 = 10000. The 1 is simply because 0000 also counts as a possible combination.
Comentarios
Publicar un comentario