Text this: Optimal sensing performance for cooperative and non-cooperative cognitive radio networks