—We present the optimal relay-subset selection and transmission-time for a decode-and-forward, half-duplex cooperative network of arbitrary size. The resource allocation is obtained by maximizing over the rates obtained for each possible subset of active relays, and the unique time allocation for each set can be obtained by solving a linear system of equations. We also give a recursive algorithm which reduces the number of operations as well as the computational load of finding the required matrix inverses. Our results, in terms of outage rate, confirm the benefit of adding potential relays to a small network and the diminishing marginal returns for a larger network. Furthermore, optimizing over the channel resources ensures that more relays are active over a larger SNR range.