Optimality and Complexity of Opportunistic Spectrum Access: A Truncated Markov Decision Process Formulation