Sums of Numbers and Digit Conditions
Open the lesson
How to find the sum of all numbers formed by arranging given digits without repetition: why each digit appears (n-1)! times in each place, the 111...1 place-value trick, the zero trap where arrangements beginning with 0 must be subtracted, and two solved JEE-style examples with digits 1, 2, 3, 4 and 0, 1, 2, 3.
Chapters
Transcript
0:00Introduction
Hello everyone! Okay, a small challenge before we start. Take the digits one, two, three and four, and use each one exactly once. You get twenty four different four digit numbers: one thousand two hundred and thirty four, one thousand two hundred and forty three, and so on, all the way up to four thousand three hundred and twenty one. Now, add all twenty four of them. By hand, that is a long, boring addition, right? By the end of this video, you will do it in one line. And such sums do appear in JEE questions, sometimes with a small zero trap hidden inside. So, let's begin.
0:39Each digit, equally often in each place
So, here is the setting. We have n distinct digits, none of them zero, and we use each one exactly once, so no repetition, okay? Arranging all n of them in every possible order gives n factorial numbers. That is the n with the exclamation mark on screen: the factorial sign. Now, the key question. Pick any one digit, and look only at the units place, the last place. In how many of these numbers does that digit sit there? Let's see. Fix that digit in the units place. The other n minus one digits can fill the remaining places in any order. That is n minus one, in brackets, factorial ways. So the answer is n minus one factorial. With me? And is the units place special? Not at all! The same argument works for the tens place, the hundreds place, every place. So each digit appears n minus one factorial times in each place. Every digit gets equal turns, completely fair. Right? Now add up just the units column. Each digit sits there n minus one factorial times, so the units-place total is n minus one factorial, times the sum of the digits. The cross you see means times, okay?
1:57Place values and the 111...1 trick
So now we know something nice. Every place, units, tens, hundreds, has exactly the same total: n minus one factorial, times the sum of the digits. Clear? But the places are not worth the same. The tens total is worth ten times as much, and the hundreds total, a hundred times. So how do we combine these equal place totals into one full sum? Multiply each place total by its place value, and add! And since every place total is the same, we only need to add the place values: one, plus ten, plus hundred, and so on. That gives one one one, up to one, with n ones. The dots in the middle stand for more ones. Got it? So here is the whole result in one line. Sum equals n minus one factorial, times the sum of the digits, times one one one up to one, with n ones. This is the topper's trick: no long addition at all. But remember the conditions: n distinct digits, none of them zero, each used exactly once, in all n factorial orders. Okay?
3:04The zero trap
Alright, now the trap. Suppose zero is one of the digits. Then some of the arrangements begin with zero, right? Look at the badge: zero, one, two, three. Is that a four digit number? No, it is not! Zero one two three is really just one hundred and twenty three, a three digit number. So it does not belong in a sum of four digit numbers. Clear? So the fix is simple. First use the formula on all n factorial arrangements, treating zero like any other digit. Then subtract the sum of the arrangements that begin with zero. All arrangements, minus the zero starters. That's it! Got it?
3:46Example 1: sum of 4-digit numbers from 1, 2, 3, 4
Now, remember our challenge from the start? Let's finish it. Find the sum of all four digit numbers formed by one, two, three and four, without repetition. Four distinct digits, and no zero. Pause the video, and try it with the formula. Done? Okay, let's check. Here n is four. So each digit appears three factorial times in each place, and three factorial is six. So, six times. Right? Next, the sum of the digits: one plus two plus three plus four, ten. With me? Now the last factor, the one one one up to one. How many ones do we need here? Four ones, one for each place, yes! One thousand one hundred and eleven. So the sum is three factorial times ten times one thousand one hundred and eleven. Six times ten is sixty, and sixty times one thousand one hundred and eleven is sixty six thousand, six hundred and sixty. Twenty four numbers added, in one line. Challenge done!
4:51Example 2: sum of 4-digit numbers from 0, 1, 2, 3
Now a harder one, with the trap inside. Find the sum of all four digit numbers formed from zero, one, two and three, without repetition. Pause the video and try it. Watch the zero! Done? Okay, let's check. First, treat zero like any other digit. Four factorial is twenty four arrangements. Each digit appears three factorial times in each place, that is six times, and the digit sum is zero plus one plus two plus three, which is six. So three factorial times six times one thousand one hundred and eleven: thirty nine thousand, nine hundred and ninety six. So the answer is thirty nine thousand nine hundred and ninety six, right? No, no, careful! That total includes arrangements like zero, one, two, three, which begin with zero. Drop the leading zero, and what is left? Exactly the three digit numbers formed from one, two and three. Clear? Now, use the same formula on them. Here n is three. What is their sum? Two factorial, that is two, times the digit sum six, times one hundred and eleven. That is one thousand three hundred and thirty two. Very good! So the answer is thirty nine thousand nine hundred and ninety six, minus one thousand three hundred and thirty two. Thirty eight thousand, six hundred and sixty four. All arrangements, minus the zero starters: that is the whole method. With me?
6:20Quick revision: (n-1)! times digit sum times 111...1
So, quick revision. Each digit appears n minus one factorial times in each place. The sum is n minus one factorial, times the sum of the digits, times one one one up to one, with n ones. And when zero is among the digits, subtract the arrangements that begin with zero. Now go and try the two practice problems on this page. You will find them easy, I promise. All the best!
More videos in Unit 4 · Permutations & Combinations
- The Fundamental Principles of Counting
- Factorials and Permutations
- Forming Numbers
- Arrangements of Objects that are not all Different
- Together, Apart and in Given Places
- Words from Some of the Letters
- Rank in Dictionary Order
- Circular Arrangements
- Combinations and their Properties
- Selections with Conditions
- Identical Objects and Divisors
- Selection followed by Arrangement
- Counting in Geometry
- Overview
- Dividing Different Objects into Groups
- Identical Objects into Different Boxes
- Different Objects into Different Boxes
- Derangements
- Identical Boxes
- The Inclusion–Exclusion Principle
- Counting Integers: Divisibility and g.c.d.
- Counting Functions
- Subsets and Pairs of Subsets
- Recurrences and Miscellaneous Counting
- Overview
- Mixed Problems: Set 1 (Numbers, Words, Arrangements)
- Mixed Problems: Set 2 (Selections, Divisors, Geometry)
- Mixed Problems: Set 3 (Distributions, Functions, Inclusion–Exclusion)
- Overview
- Part A: JEE Main Level
- Part C: Concept Checks