Resource Allocation for Maximizing theDevice-to-Device Communications Underlaying LTE-Advanced Networks