how many different signals can be formed with 3 dots(.),2 dashes(-),4 stars(*)?
If you are not required to use all the symbols then the problem gets more complicated. I can think of a couple of ways to approach it. One way is to break the problem into cases depending on the number of signals used, say . Then for a given r, find all the solutions in non-negative integers to
where
Given one solution to the equation, the number of signals that can be sent with that number of symbols is
(a multinomial coefficient). All this looks pretty tedious, although I guess it can be done.
I'm too lazy to do it that way, so I would prefer a generating function approach. Let be the number of signals that can be sent with r of the symbols and define
(an exponential generating function). Then it's clear (once you know how to do it) that
Expand f (here it helps to have access to a computer algebra system, or you can use Wolfram Alpha), write the result in exponential generating form as in the definition of f (notice the factors 1/r!), and you have the coefficients . Your final answer is then
The case r=0 corresponds to a "signal" of no symbols, so you need to decide whether that is acceptable.