Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

How many different eight-digit numbers can be written using the digits 1, 2, 2, 3, 3, 4, 5?

  • Last Updated : 22 Sep, 2021

A number is basically a count or measurement. It is a mathematical value used for counting and measuring objects, and for performing arithmetic calculations. Numbers are broadly classified into the following categories, 

  1. Natural Numbers
  2. Whole Numbers
  3. Integers
  4. Rational Numbers
  5. Irrational Number

Here, the categories in focus would be natural numbers and whole numbers. 

Attention reader! All those who say programming isn't for kids, just haven't met the right mentors yet. Join the  Demo Class for First Step to Coding Coursespecifically designed for students of class 8 to 12. 

The students will get to learn more about the world of programming in these free classes which will definitely help them in making a wise career choice in the future.

Natural Numbers



All numbers ranging from 1 to infinite are referred to as natural numbers. Example: 1, 2, 10, 12

Whole numbers 

All-natural numbers along with the number 0 are referred to as whole numbers. Example: 0, 1, 2, 10, 12. Every natural number is a whole number but every whole number is not a natural number.  Talking about digits, the numbers ranging from 0 to 9 are referred to as digits. Every number irrespective of its category is made up of digits.

Permutations

A permutation is defined as the number of ways a particular set can be arranged, where the order of the arrangement matters. Order of arrangement means the order in which the elements are placed in the set. For example: [1, 2, 3] and [2, 1, 3] are two different permutations. Even though the elements are the same in both sets but their order of arrangement is different.

Formula for Permutation

nPr = n!/(n – r)!

Where n = total items in the set

r = items taken for the permutation



“!” denotes factorial

Formula is given above but the problems on permutations can easily be solved by logic. Solving through logic is better because the problem may be tricky and at times, the formula may confuse the student. 

How many different eight-digit numbers can be written using the digits 1, 2, 2, 3, 3, 4, 5?

Solution:

Let the eight-digit number be _ _ _ _ _ _ _ _

Now think, how many options are available for the first blank here? It can either be 1 or 2 or 3 or 4 or 5. Why wasn’t the number 2 or 3 considered twice? Because it’s the same digit, right? As mentioned multiple times, it’s PURE LOGIC.

5 options are available for the first blank and all the subsequent blanks as there is no restriction on the repetition of digits. As 5 options are available for every blank, multiply 5 eight times which means 5 to the power of 8.

Count of different 8 digit numbers = 58 = 5 × 5 × 5 × 5  5 × 5 × 5 × 5 = 390625

A question was asked at the beginning of the article. Why wasn’t the digit 0 considered for now? While generating numbers with digits including 0, the digit 0 has to be handled explicitly as it cannot be placed at the beginning of the number. Why? 1230 is a 4 digit number made using the digits 1, 2, 3, 0. Now, is 0123 a 4 digit number? No, it’s not because 0123 is equal to 123 which is a 3 digit number. Thus, the digit 0 can’t be considered at the beginning of a number and it needs to be handled explicitly.

Similar Problems

Question 1: Given a set [1, 2, 3, 4, 5], generate all possible subsets of size 5.

Solution:



Let the set be _ _ _ _ _

Now, find the number of ways to fill all the blanks such that each generated set is different. For the first blank, how many options are available? Either of the five numbers – 1 or 2 or 3 or 4 or 5 can be filled, thus 5 options.

Now, one of the five numbers is already filled in the first blank. So, for the second blank, (5 – 1) = 4  options are available for this blank. Similarly, for the 3rd blank, there are 3 options. 

For the 4th blank, there are 2 options

For the 5th blank, there is 1 option.

So, total number of permutations = 5 × 4 × 3 × 2 × 1 = 5! = 120 

Question 2: Given a set [1, 2, 3, 4, 5], generate all possible subsets of size 3.

Solution:

Let the set be _ _ _

Similar to the previous example, find the number of ways to fill all the blanks such that each generated set is different.

For the first blank, either of the five numbers – 1 or 2 or 3 or 4 or 5 can be filled, thus 5   options.

Now, one of the five numbers is already filled in the first blank.

So, for the second blank, (5 – 1) = 4  options are available for this blank.

Similarly, for the 3rd blank, there are 3 options.

So, total number of permutations = 5 × 4 × 3 = 60 

Question 3: Generate all the different eight-digit numbers that can be written using the digits 1, 2, 3, 4, 5.

Solution:

Let the eight-digit number be _ _ _ _ _ _ _ _

Now, find the number of ways to fill all the blanks such that each generated number is different. For the first blank, how many options are available? Either of the five numbers – 1 or 2 or 3 or 4 or 5 can be filled. So, 5 options are available.

As there is no restriction on the repetition of digits, the same 5 options are available for all the other blanks as well. Perform the calculation part now. As 5 options are available for every blank, multiply 5 eight times which means 5 to the power of 8.

Count of different 8 digit numbers = 58 = 5 × 5 × 5 × 5 × 5 × 5 × 5 × 5 = 390625

My Personal Notes arrow_drop_up
Recommended Articles
Page :