As per given by the question, there are 6 different Algebra books, 5 different Biology books, 4 different Chemistry books, and 3 different copies of the novel Dune.
Now,
(a). 10 books on a shelf if exactly 4 must be Algebra books?
here, 4 must be algebra book,
So,
Number of ways to arrange the exactly 4 algebra books are,
4!=244!=24
Remaining box are 6, then there are,
24+6=3024+6=30
(b). all of the books on a shelf if the copies of Dune must be on the ends?
There are 3 different copies of the novel Dune.
Total number of book is 18.
So.
18p3 = 18/(18-3)!
= 4896
Hence, 4896 books on a shelf if the copies of Dune must be on the ends.