[Math] In how many ways can two books from different subjects be selected

combinatorics

In how many ways can we select two books from different subjects among five distinct computer science books, three distinct mathematics books, and two distinct art books?

I was able to answer the above question by creating a tree diagram, however, I want to be able to understand the results using permutation/combination theory. Is anyone willing to explain? This is what I got after conducting the tree diagram: CM or CA or AM 15 + 10 + 6 = 31 ways. I don't want to take the long route in answering questions like this in the future.

Thanks for all your help!

Best Answer

Well, your basic method of splitting this into 3 cases is correct:

Case 1: Comp Sci book + Math book (CM): $5$ choices for the C book, and $3$ choics for the Math book gives $5 \cdot 3 = 15$ options

Similarly, Comp Sci and Art (CA) gives $5 \cdot 2=10$ options, and Math plus Art (MA) gives $3 \cdot 2 = 6$ options.

Really not sure how you could do this more efficiently ...