Read The Library of Babel by Jose Luis Borges
25 ^ (80 * 40 * 410) = 25 ^ 1,312,000
Careful readers will note that the letters on the spine could also be used to distinguish between different books. Few specifications on the spine are given. We ignore the spine for this question.
One could sort all the books in alphabetical order, O(n log n), and then walk through the entire list comparing each book to the one immediately following, O(n).
One could compare each book to all the other books, O (n^2).
One could create a bit string 25^1,312,000 bits long. Each bit in the bit string corresponds to one possible permutation of the symbols in a book. Iterate through each of the 25^1,312,000 books and set the bit in the bit string that corresponds to the particular string of symbols found in the book, O(n). If any bit is switched more than once, a duplicate occured.