Resource Allocation in Relay Networks