Dynamic Programming Decomposition Methods For Capacity Allocation And Network Revenue Management Problems