I recently came across Snatoms by Derek Muller (Famous Veritasium guy).
It made me think about this question:
Let's say we have a 'C' shape which can have 4 attachments to it
'O' shape that can have 2 attachments to it
and 'H' shape that can have only 1 attachment
How many possible valid combinations can be made out of 6 'C', 6 'O' shapes and 12 'H' shapes? Is there any way to generalize this? (Don't think about chemistry concepts while solving this problem, and by "valid" combinations I mean to exclude combinations that are not possible for instance CH5 to CH12)