2
$\begingroup$

I have the following problem: In $N$ days, I have to do at most $K$ tasks given that I can do only single task in one day and can do every task in $M$ ways. In how many ways can I do this? For instance, I have $N=1$, $K=1$ and $M=1$.

The problem can be interpreted as that in $N=1$ day, I have to do at most $K=1$ task given that I can do that task in $M=1$ ways. So what are the number of ways I can do this task and the answer for this is $1$. But I am confused over the general formula for the problem.

For $N=4$, $M=3$, $K=2$, the answer comes out to be $45$, but I am get baffles on seeing the answers.

Please help me out. Thanks in advance.


Added later. This is the exact question; can you now help me about it?

Chef Dengklek will open a new restaurant in the city. The restaurant will be open for $N$ days. He can cook $M$ different types of dish. He would like to cook a single dish every day, such that for the entire $N$ days, he only cook at most $K$ distinct types of dishes. In how many ways can he do that?

  • 1
    Your revised question suggests that exactly one task must be done each day and that the same task can be done on different days; that was not obvious from the initial question2011-11-04
  • 1
    Is the fact that this question is a combinatorics question or not, a question? If it is not, you might skip the question mark in the title.2011-11-04
  • 3
    How do you know the answer is 45? How do you know the answer for 5, 7, 3 is 5887? What are you not telling us?2011-11-04
  • 0
    @Gerry Myerson these are the sample test cases for the problem at hand lol you made it a mission critical problem ;) dont worry man its not that important and i m nt hiding anything2011-11-04

3 Answers 3