You have 6 different Algebra books, 5 different Biology books, 4 different Chemistry books, and 3 different copies of the novel Dune.
In how many distinct ways can you arrange:
a) 10 books on a shelf if exactly 4 must be Algebra books?
b) all of the books on a shelf if the copies of Dune must be on the ends?