The document proposes a low-complexity water filling algorithm to allocate subcarrier, bit, and power resources in an OFDM-based cognitive radio system with multiple primary user frequency bands. The algorithm formulates the resource allocation as a multidimensional knapsack problem to maximize the cognitive radio user's bit rate while keeping interference to primary users below thresholds. It allocates power to subcarriers using water filling to satisfy both interference and total power constraints, iterating to refine the solution if initial allocations violate constraints. The algorithm aims to provide a simple, optimal method for resource allocation in cognitive radio OFDM systems considering interference between primary and cognitive users.