Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

A variable name for a certain computer language must be either an alphabet or an alphabet followed by a decimal digit. The total number of different variable names that can exist in that language is equal to.


seo-qna
Last updated date: 24th Jul 2024
Total views: 425.1k
Views today: 4.25k
Answer
VerifiedVerified
425.1k+ views
Hint: The formula for determining the number of possible arrangements by selecting only a few objects from a set with no repetition is expressed in the following way:
\[{}^n{C_r} = \dfrac{{n!}}{{r!(n - r)!}}\]
\[N = \]the total number of elements in a set
\[K = \] The number of selected objects (the order of the objects is not important)
\[! = factorial\]


Complete step by step solution:
The variable name consists only of a letter, then that letter can be chosen in 26 ways from the alphabets.
If the code is created using a letter followed by a digit, then code can be created in
\[{}^{26}{C_1} \times {}^{10}{C_1}\]
These two events are independent
Now,
Above combination can be done in only one way.
\[1! = 1\]
\[ \Rightarrow \dfrac{{26!}}{{1!(26 - 1)!}} \times \dfrac{{10!}}{{1!(10 - 1)!}} \times 1\] \[\left[ {{}^n{C_r} = \dfrac{{n!}}{{r!(n - r)!}}} \right]\]
\[ \Rightarrow \dfrac{{26.25!}}{{25!}} \times \dfrac{{10.9!}}{{9!}}\] \[\left[ \begin{gathered}
  n = 26 \\
  r = 1 \\
\end{gathered} \right]\]
\[ \Rightarrow 26 \times 10\]
\[ \Rightarrow 260\]
Hence
Total number of different variable names that can exist in that language is
\[ = 26 + 260\]
\[ = 286\]


Note:
\[10! = 1 \times 2 \times 3 \times 4 \times 5 \times 6 \times 7 \times 8 \times 9 \times 10\]
So, it can be writing as
\[10! = 9!\, \times 10\]
1)(Remember)\[1! = 1\]
2) In the above question, it is fixed followed by a decimal digit, So the rotation can be done by only 1 way.