Abstract-We consider a scenario in which two sources exchange stochastically varying traffic with the aid of a bidirectional relay that may perform network coding over the incoming packets. Each relay use incurs a unit cost, e.g., transmission energy. This cost is shared between the sources when packets from both are transmitted via network coding; if traffic from a single source is sent, the cost is passed on to only that source. We study transmission policies which trade-off the average cost with the average packet delay. First, we analyze the cost-delay trade-off for a centralized control scheme using Lyapunov stability arguments. We then consider a distributed control scheme, where each source selfishly optimizes its own cost-delay trade-off by playing a non-cooperative game. We determine the Nash equilibrium and show that it performs worse than the centralized algorithm. However, appropriate pricing at the relay achieves the centralized performance. These algorithms require full information of queue backlogs. Next, we relax this assumption and any source makes the transmission decision depending on whether the other sources queue backlog exceeds a threshold, or not. This needs only one bit information exchange and leads to asymptotically optimal cost, as the delay grows. Finally, we consider cost sharing with only local queue information at each source. The results illustrate new cost-delay trade-offs based on different levels of cooperation and queue information availability.