Implement the following Python tasks:
-
Given a list of (category, points) for books, choose up to 3 books with all different categories to maximize total points; return the maximum achievable points.
-
Given a dictionary mapping library_location -> list_of_people and a collection of closed locations, return a new dictionary containing only open locations and their associated people.
-
Given an ordered list of log entries (book_id, action) where action is 'checkout' or 'return', validate the sequence: return False if a book is checked out twice in a row without a return, or returned when it is not currently checked out; otherwise return True.