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?