  Batched sparse (BATS) code is a promising technology for reliable data
transmission in multi-hop wireless networks. As a BATS code consists of an
outer code and an inner code that typically is a random linear network code,
one main research topic for BATS codes is to design an inner code with good
performance in transmission efficiency and complexity. In this paper, this
issue is addressed with a focus on the problem of minimizing the total number
of packets transmitted by the source and intermediate nodes. Subsequently, the
problem is formulated as a mixed integer nonlinear programming (MINLP) problem
that is NP-hard in general. By exploiting the properties of inner codes and the
incomplete beta function, we construct a nonlinear programming (NLP) problem
that gives a valid upper bound on the best performance that can be achieved by
any feasible solutions. Moreover, both centralized and decentralized real-time
optimization strategies are developed. In particular, the decentralized
approach is performed independently by each node to find a feasible solution in
linear time with the use of look-up tables. Numerical results show that the gap
in performance between our proposed approaches and the upper bound is very
small, which demonstrates that all feasible solutions developed in the paper
are near-optimal with a guaranteed performance bound.
