|Assuming a bidirectional relay assisted network, we first study the problem of optimal resource sharing between two transceiver pairs. One of the pairs, referred to as the primary pair, owns the spectral resources while the other pair, called the secondary pair, is considered to own the relay infrastructure. Assuming amplify-and-forward relaying scheme and aiming to establish a cooperation between the two networks, we study three different design problems in a single carrier scenario. In the first approach we maximize the smaller of the secondary transceiver rates subject to two separate constraints on the total powers consumed in the primary and the secondary networks while providing a minimum data rate to the primary pair. In the second approach, we replace the per network power constraint by a constraint on the average total power consumed in both networks. The third approach combines the two aforementioned methods to materialize spectrum leasing and sharing for the case when the primary network is active with a certain probability. Then we investigate two different design approaches to the multi-carrier scenario. The first approach relies on maximizing the secondary network average sum-rate subject to two spectral power masks for the two networks while providing a minimum sum-rate to the primary pair in a multi-relay scenario. In the second approach, we replace the spectral power mask for each network by a constraint on the total power consumed in that network. Different from the previous studies, we further investigate the resource allocation problem between several energy harvesting relay nodes such that a unidirectional communication link is established between a pair of users and the harvested energy is optimally allocated between the relays such that the overall throughput of the network is maximized. Assuming the availability of full knowledge of channel state information and that of the energy packets, we maximize the throughput of the network under two sets of constraints on the status of the battery. We then consider the problem of maximizing the average throughput of the system, for the case when only the statistics of the channels are available.