IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, VOL. 33, NO. 2, FEBRUARY 2015 199 On Optimal Policies for Network-Coded Cooperation: Theory and Implementation Hana Khamfroush, Student Member, IEEE, Daniel E. Lucani, Member, IEEE, Peyman Pahlevani, Student Member, IEEE, and João Barros, Senior Member, IEEE Abstract—Network-coded cooperative communication (NC-CC) has been proposed and evaluated as a powerful technology that can provide a better quality of service in the next-generation wireless systems, e.g., D2D communications. Previous contribu- tions have focused on performance evaluation of NC-CC scenarios rather than searching for optimal policies that can minimize the total cost of reliable packet transmission. We break from this trend by initially analyzing the optimal design of NC-CC for a wireless network with one source, two receivers, and half-duplex erasure channels. The problem is modeled as a special case of Markov decision process (MDP), which is called stochastic shortest path (SSP), and is solved for any field size, arbitrary number of packets, and arbitrary erasure probabilities of the channels. The proposed MDP solution results in an optimal transmission policy per time slot, and we use it to design near-optimal heuristics for packet transmission in a network of one source and N 2 receivers. We also present numerical results that illustrate the performance of the proposed heuristics under a variety of scenarios. To complete our analysis, our heuristics are implemented in Aalborg Univer- sity’s Raspberry Pi testbed and compared with random linear net- work coding (RLNC) broadcast in terms of completion time, total number of required transmissions, and percentage of delivered generations. Our measurements show that enabling cooperation only among pairs of devices can decrease the completion time by up to 4.75 times, while delivering 100% of the 10 000 generations transmitted, as compared to RLNC broadcast delivering only 88% of them in our tests. Index Terms—Network coding, cooperative communication, wireless networks. I. I NTRODUCTION W ITH the growing concern on minimizing the cost of packet transmission in wireless networks with multiple users, e.g., multi-media multicast services, finding optimal/near-optimal packet transmission policies that are ef- ficient in cost while maintaining reliability has become critical. Manuscript received April 15, 2014; revised September 15, 2014; and November 18, 2014; accepted November 7, 2014. Date of publication December 18, 2014; date of current version March 9, 2015. This work was supported in part by the Portuguese Foundation for Science and Technology (FCT) under Grants SFRH/BD/72961/2010 and PTDC/EEI-TEL/3006/2012 (CodeStream Project) and in part by the Danish Council for Independent Research through the Green Mobile Cloud Project under Grant 10-081621. H. Khamfroush and J. Barros are with the Instituto de Telecomunicações (IT), University of Porto, Porto 4200-465, Portugal (e-mail: hanakhamfroush@ gmail.com; jbarros@fe.up.pt). D. E. Lucani and P. Pahlevani is with the Department of Electronic Systems, Aalborg University, Aalborg 9220, Denmark (e-mail: del@es.aau.dk; pep@es. aau.dk). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/JSAC.2014.2384291 To this end, cooperative communication protocols that use network coding (NC) [1] to improve reliability, efficiency, and security of the network have been proposed and extensively studied in the literature [2]–[17]. Most of the previous work in this area could be fit into one or both of the following categories: (a) performance analysis of NC-CC for a predefined scenario [2]–[9], or (b) protocol design and optimization of a NC-CC scenario in terms of a specific metric [10]–[16]. For example, [2]–[5] evaluate the performance of different relay- based NC-CC in terms of bandwidth, outage probability, and achievable rate and [6] evaluates the performance of a non- relay based NC-CC scenario that uses NC only in short-range links in terms of number of transmitted packets. Authors in [7]–[9] provide some bounds on the bit error rate (BER), and outage probability of upstream NC-CC scenarios where multiple nodes working together to deliver their packets to a common destination. On the other hand, [10] looks at NC-CC in an optimization perspective and provides a theoretical for- mulation to calculate the maximal throughput of unicast traf- fic that can be achieved with cooperative network coding in multi-rate wireless networks and proposed a routing protocol based on the optimization result. A cluster-based cooperative coding protocol was proposed in [11] which also optimizes the number of relay nodes per cluster to trade-off between performance and overhead. The optimization of session group- ing, relay selection, and diversity order of the system for different NC-CC scenarios have been studied in [12], [13] and near-optimal solutions to these problems have been proposed. [14]–[16] focus on optimal design of NC-CC for upstream scenarios and try to develop adaptive strategies, or design optimal codes. Authors in [17] take a step forward and take a look at implementation requirements of some of the relay-based cooperative strategies. Previous work on downstream scenarios, i.e., where one/multiple sources transmit data to multiple users, e.g., [2]–[6], focused mostly on relay-based NC-CC, while the performance and optimal design of non-relay NC-CC is not well understood. Note that the term non-relay network refers to the networks that only include source and receivers and do not include a dedicated relay node. Although, a receiver can also act as a relay to help other receivers, but we use “relay networks” and “non-relay networks” to distinguish between the networks composed of dedicated relay nodes and non-dedicated relay nodes. To the best of our knowledge, this paper is the first theoretical and practical work that provides a mathematical analysis on the design of NC-CC policies in a non-relay based network with the support and validation of real-life measurements. We start by 0733-8716 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.