Question 1062838
2. so algebra books stays together, and discrete mathematics stays together... so we consider the algebra books as one book only and the discrete mathematics books as one book only.. we add that to five history books. we have now 7 books. And we we can arrange the 7 books in 7! ways..

since the algebra books are group together, we can arrange them in 8! ways
since the discrete mathematics books are group together, we can arrange them in 4! ways

total number of ways = 7!8!4!

1. compute for the number of ways the algebra books are together and discrete mathematics are together, then subtract it from the number of ways the 17 books are arranged

total number of ways = 17! - 7!8!4!