필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Investigating numbers with few repeated numbers

조회 수: 2 (최근 30일)
Dnyandeep Sagar
Dnyandeep Sagar 2019년 4월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
how many 18 digit numbers are there such that no digit occurs more than three time in n?
  댓글 수: 1
Stephen23
Stephen23 2019년 4월 11일
@Dnyandeep Sagar: what have you tried so far?

답변 (1개)

Amal George M
Amal George M 2019년 4월 11일
편집: Amal George M 2019년 4월 11일
The first digit has to be a non-zero digit, and hence it can only be populated 9 ways.
Let a denote the number of times the first digit is repeted in the rest of the 17 possible locations. and () denote the number of times the other digits are repeated in the rest of the 17 possible locations.
Then the number of ways the rest of the locations can be filled is equalvent to the number of solutions to under the constraints and .
This problem can be remodelled as a multiplication problem. Consider the algebraic expression. If we expand this expression, then the coefficent of power of x will be the number of solutions such that sum is n. This can be found by
>> syms x
>> y=((1+x+x^2+x^3)^9*(1+x+x^2));
>> coX=coeffs(y,x);
>> coX(18)
ans =
69834
Now, since first place can be filled 9 ways, the final answer willl be 628506.
Correct me if I got this wrong.

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by