Implement a Python function to determine the optimal exposition periods for a given set of book heights and a maximum allowed height difference.
Functionality Requirements:
The function should take three input parameters:
n: an integer representing the number of books (1 ≤ n ≤ 10^5).
k: an integer representing the maximum allowed height difference between the tallest and shortest book in an exposition period (0 ≤ k ≤ 10^9).
heights: a list of integers where each integer represents the height of a book (0 ≤ heights[i] ≤ 10^9).
The function should compute the maximum length of exposition periods that can be formed where the height difference between the tallest and shortest books in each period does not exceed k.
The function should return a tuple consisting of:
max_books: an integer indicating the maximum number of books that can be included in any exposition period.
periods: a list of tuples, each containing the 1-based start and end indices (inclusive) of the valid exposition periods.