chapter 5 example: frequency allocation/deallocation