How many 3-digit numbers can be formed using only the digits 1 to 7 if the number 2 must be included. Repetition is allowed
possibility 2** *2* **2 so it would be 3*7*7 (2 can be repeated as well, right ?)
1st find total 3 digits numbers which can be formed by using numbers from the set -> [1-7] then subtract the number of 3 digit numbers which don't have a single 2 in them and have digits only from this set-> [1-7]-{2}
Thats a very lengthy way to go about things. I bet there is a cleaner solution
think of it as this:- there is 3 ways to arrange a number 2 as fixed in 3-digit number right ? then found the how many 2-digits number can be formed from 1 to 7. just like that :3
Ok So I came up with 7^3-6^3=127
Thanks guys .... I was thinking of manually going through all the numbers that dont include 2 and i was like hmmm that wld be lengthy And then I came back to the problem and Eureka .... im like we can cut to the chase by just subtracting 6^3
Join our real-time social learning platform and learn together with your friends!