(a) If the books can be arranged in any order, then there are 8 books in total, and each one can be placed in any of the 8 positions on the bookshelf. Therefore, the number of ways to arrange the books is:
8! = 40320
(b) If the mathematics books must be together and the novels must be together, then we can treat each group as a single "super-book" and arrange the three super-books in any order. Within each super-book, the books can be arranged in any order as well. Therefore, the number of ways to arrange the books is:
3! * 4! * 3! = 864
(c) If the novels must be together but the other books can be arranged in any order, then we can treat the four novels as a single "super-novel" and arrange the two super-books (the super-novel and the other three books) in any order. Within the super-novel, the novels can be arranged in any order as well. Therefore, the number of ways to arrange the books is:
2! * 4! = 48