(UPDATE: Okay, I see how to do it. I could imagine assigning this with some hints, but it still strikes me as too hard to be a homework problem without hints. I'm skeptical that the 5 close voters actually saw how to do it.)
I am confused at people's willingness to call a question homework. I have a reputation for assigning overly hard problem sets, and I would never assign most of the problems that get labeled as homework here.
]]>Lots of discussion about the propriety of the question happening in comments. I'm creating this thread so any future discussion can happen here.
I think Gerry's comment "gondolf, this looks like a problem at the level of an undergrad intro combinatorics class. Maybe there's more to it than that - can you convince us? Say, show us that you've tried some pretty sophisticated approaches that didn't work? Or that you have some reason for wanting the answer unrelated to a class you're enrolled in?" is the key one for determining whether this thread should be re-opened.
]]>