0

Suppose we are given $k$ ordered blanks (e.g. a length $k$ word) and $n$ types of objects. Also we have $k>n$. Now we want to fill in these blanks with these objects so that we at least use one object of each kind. In how many ways can we fill these blanks?

The following are my thought: clearly there would be repetitions as the number of blanks is larger than the number of types of objects. I could figure out some cases when plug in certain numbers for $n$ and $k$. But is there a general formula for this?

N. F. Taussig
  • 76,571
Christina
  • 635
  • 4
  • 8
  • 1
    You can use the Inclusion-Exclusion Principle. There are $n^k$ ways to fill the blanks since there are $n$ choices for each of the $k$ blanks. However, we want to exclude those distributions which exclude one or more types of objects. Does that help? – N. F. Taussig Oct 13 '21 at 22:06
  • 1
    @NFTaussig Isn't this just ordered Stirling numbers $n!S(k,n)$? – Parcly Taxel Oct 13 '21 at 22:07
  • For an initial exposure to Inclusion-Exclusion, see this article. For a guide to setting up an Inclusion-Exclusion framework, see the first part of this answer. ...see next comment – user2661923 Oct 14 '21 at 00:27
  • Using N.F. Taussig's comment, and using the syntax in the first part of my answer, for $i \in {1,2,\cdots,n}$, let $A_i$ denote the set of $k$ length characters, where character $i$ is excluded. Then, everything should fall into place. – user2661923 Oct 14 '21 at 00:29
  • @ParclyTaxel It would help if you could give the OP a link to a corresponding article, perhaps a Wikipedia article. I didn't do this because I was unsure and didn't want to cite the wrong article. Once this is done, the OP can compare the results in the posted article with the results obtained by implementing Inclusion-Exclusion, from scratch. – user2661923 Oct 14 '21 at 00:34

0 Answers0