  We analyze a wireless line network employing wireless network coding. The two
end nodes exchange their packets through relays. While a packet at a relay
might not find its coding pair upon arrival, a transmission cost can be reduced
by waiting for coding with a packet from the other side. To strike a balance
between the reduced transmission cost and the cost incurred by the delay, a
scheduling algorithm determining either to transmit an uncoded packet or to
wait for coding is needed. Because of highly uncertain traffic injections,
scheduling with no assumption of the traffic is critical. This paper proposes a
randomized online scheduling algorithm for a relay in arbitrary traffic, which
can be non-stationary or adversarial. The expected total cost (including a
transmission cost and a delay cost) incurred by the proposed algorithm is at
most e/(e-1) ~ 1.58 times the minimum achievable total cost. In particular, the
proposed algorithm is universal in the sense that the ratio is independent of
the traffic. With the universality, the proposed algorithm can be implemented
at each relay distributedly (in a multi-relay network) with the same ratio.
Moreover, the proposed algorithm turns out to generalize the classic ski-rental
online algorithm.
