Here are some question in my book.


There are some alphabets a,b,c and some numbers 1,2,3,4. And librarian try to make a password whose 9 digits.

(1) The number of the total use of alphabet is odd number.

(2) The number of the total use of the number is even number.

(3) When it comes to password, the group of the alphabets should be in front of the group of the numbers. (E.g.) acbca2122, aaaaaaa33

Under the conditions (1)~(3), How many the number of the passwords the librarian can make?


The solution of the above question used each case's(alphabet and number) ordinary generating functions and producted between them.

But I have a doubt why should I use the ordinary generating functions for instead of the exponential generating functions to find $nth$ array.

(In my experiences, ordinary generating function and exponential generating functions are often used for distribution and array respectively in my experiences)

So Does anyone tell me Why Should I use the ordinary generating function instead of the exponential generating functions?

Any help or advices will be appreciated.

Thank you.


For a very thorough discussion, see e.g. Wilf's "generatingfunctionology". A more "combinatorial" view is given by Sedgewick and Flajolet "Analytic Combinatorics". Both are freely available, the second one is significantly heavier going (but you'd just want the more descriptive view there).

Short answer: If the objects are interchangeable (not distinguished say by positions), use ordinary generating functions, otherwise exponential generating functions are called for. In this case, for passwords the order of the letters is relevant.

Without a more detailed explanation how the specific problem is solved, we can't really tell if the solution given is right.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.