3.1. Problem Formulation Based on Integer Linear Programming
Instantaneous decodability can be naturally cast into the framework of integer optimization. To this end, let us fix the packet transmission round to
and consider the knowledge of all receivers, which is also available at the source because of the feedback. The state of the entire system at time index
(in terms of packets that are still needed by the receivers) can be described by an
binary receiver-packet incidence matrix
with elements
Columns of matrix
are denoted by
to
. We assume that packets received by all receivers are removed from the receiver-packet incidence matrix. Hence,
does not contain any all-zero columns.
Example 1.
Consider
receivers and
packets. Before the transmission begins, the receiver-packet incidence matrix
is an all-one
matrix. If we send packet
in the first transmission round
and assuming that only receiver
successfully receives it,
will become
If we send packet
in the next transmission round
and assuming that only receiver
successfully receives it,
will then be
The condition of instantaneous decodability means that at any transmission round we cannot choose more than one packet which is still unknown to a receiver
. In the example above, at
, we cannot send
because it contains more than one packet unknown to
.
Let
represent a binary decision vector of length
that determines which packets are being coded together. The transmitted packet consists of the binary XOR of the source packets for which
. More formally, we can define the instantaneous decodability constraint for all receivers as
, where
represents an all-one vector of length
and the inequality is examined on an element-by-element basis (Note that although
is a binary or Boolean vector,
is calculated in real domain. Hence,
is in fact a pseudo-Boolean constraint.). This condition ensures that a transmitted coded packet contains at most one unknown source packet for each receiver. A vector
is called infeasible if it does not satisfy the instantaneous decodability condition. In other words,
is called infeasible if and only if there exists at least one
for which
in
. A vector
is called a solution if and only if it satisfies
. In the rest of this paper, "
" and "
is a solution" are used interchangeably.
Now consider sets
, where
is the nonempty set of receivers that still need source packet
. Note that these sets can be easily determined by looking at the columns of matrix
. The "importance" of packet
can be, for example, taken to be the size of set
, which is the number of receivers that still need
.
We now formally describe the optimization procedure that should be performed at the transmitter. Maximizing the number of receivers for which a transmission is innovative, subject to the constraint of instantaneous decodability, can be posed as the following (binary-valued) integer linear program (ILP):
where
. This is a standard problem in combinatorial optimization, usually called set packing [9]. Here the universe is the set of all receivers and we need to find disjoint (due to instantaneous decodability condition) subsets
with the largest total size. In the (most desirable) case when equality holds in
for every receiver, we also speak of a set partition. This is equivalent to a zero-delay transmission.
In Section 4, we will consider other measures of packet importance and discuss the role of
in tailoring the optimization problem according to the application requirements or channel conditions, such as memory in erasure links.
We assume that elements of
, which signify packet importance, are all positive. If one has already found a solution such as
with
, then changing this solution into
by changing
into
can only result in a
strictly smaller than
. We say that given solution
,
is clearly suboptimal and hence, can be discarded in an algorithm that searches for the optimal solution(s).
3.2. Efficient Search Methods for Finding the Optimal Solution of (4)
It is well known that the set packing problem is NP-hard [9]. Here, we present an efficient ILP solver designed to take advantage of the specific problem structure. Later, we will see that for many practical situations of interest, our method performs well empirically. Based on this framework, we will also present some heuristics in Section 5 to deal with more complicated and time-consuming problem instances.
We begin presenting our method by first defining constrained and unconstrained variables.
Definition 6.
Two binary-valued variables are said to be constrained if they cannot be simultaneously
in a solution. Or formally,
and
are constrained if for any
satisfying
,
(Again, note that the addition of variables takes place in real domain.). We also say that
is constrained to
and vice versa. It can be proven that
and
are constrained if and only if there exits at least one row index
in
for which
.
Definition 7.
The set of all variables constrained to
is called the constrained set of
and is denoted by
. That is,
If
and
are not constrained to each other (
and
), then columns
and
in
cannot have nonzero elements in the same row position. That is, for each row index
,
and
.
Definition 8.
A variable
is said to be unconstrained if
. The set of all unconstrained variables is denoted by
and is referred to as the unconstrained set.
If
is an unconstrained variable, then for each row index
,
for all
(otherwise,
and
would become constrained).
Example 2.
Consider the following receiver-packet incidence matrix 
One can easily verify the relations defined above. For example, variables
and
are constrained because for
,
. Variables
and
are not constrained to each other because columns
and
do not have a nonzero element in the same row position. Variable
is unconstrained because no other column has a nonzero element in rows 6 or 7. In summary,
,
,
,
and
.
To design an efficient search algorithm, one needs to efficiently prune the parameter space and reduce the problem size. We make the following observations for pruning of the parameter space.
-
(1)
Unconstrained variables must be set to 1. In other words, setting those variables to 0 does not contribute to the optimal solution (note that the elements in
are positive). In the above example,
and
must be set to 1 because no other variable is constrained to them (we will make this statement formal in the optimality proof of the algorithm in the appendix).
-
(2)
If a constrained variable is set to 1 all members of its constrained set must be set to 0. In the above example, setting
forces
and
to zero.
-
(3)
At a given step, the parameter space can be pruned most by resolving the variable with the largest constrained set.
Application of the third observation, in a search algorithm results in greedy pruning of the parameter space. We note that greedy pruning is only optimal for a given step of the algorithm and is not guaranteed to result in the optimal reduction of the overall complexity of the search.
We now make a final remark before presenting the search algorithm. In particular, we have observed that finding constrained sets for each variable in each step of the algorithm can be somewhat time consuming. A very effective alternative is to first sort matrix
, column-wise, in descending order of the number of
's in each column. Setting the "most important" head variable
(with the highest
) to
is likely to result in the largest constrained set (because it potentially overlaps with many other variables) and hence, many variables will be resolved in the next recursion. We will refer to the approach based on finding the largest constrained set as the greedy pruning strategy and to the alterative approach as the sorted pruning search strategy.
The greedy pruning search strategy is shown in Figure 1, which with appropriate modifications can also represent the sorted pruning variation.Let
denote the problem of size
whose input is an
receiver-packet incidence matrix
and whose output is a set of solutions of the form
of length
which satisfy the instantaneous decodability condition
. The algorithms can be described as shown in Algorithm 1.
Algorithm 1: Recursive search for the optimal solution(s) of (4).
(
) Start with the original problem of size
.
(
) if sorted pruning strategy is desired then
(
) Rearrange the variables in
in descending order of packet importance (number of
's in each column).
(
) end if
-
(5)
Solve
:
-
(6)
if
then
-
(7)
Return
(since the variable is not constrained).
-
(8)
else
-
(9)
if
greedy pruning strategy is desired
then
-
(10)
Determine the constrained set for all variables
to
.
-
(11)
Denote the index of the variable with the largest constrained set by
and the cardinality of its constrained
set by
.
-
(12)
else
(13) Determine the constrained set for the head variable
with cardinality
and also the set of unconstrained
variables (Note that we have overused index 1 to refer to the head variable in the reordered matrix at each
recursion.). Set
.
-
(14)
end if
(15) Denote the cardinality of the unconstrained set
by
.
(16) Set all the unconstrained variables to 1.
(17) Set
and the variables in its corresponding constrained set
to 0.
(18) Reduce the problem by removing resolved variables. Reduce
accordingly.
(19) Solve
(Note that
unconstrained variables are set to one,
and
variables constrained by
are set to zero, hence a total of
variables are resolved.).
(20) Combine the solution with previously resolved variables. Save solution.
(21) Set
.
(22) Reduce the problem by removing resolved variables. Reduce
accordingly.
(23) Solve
(Note that
unconstrained variables are set to one and
, hence a total of
variables
are resolved.).
(24) Combine the solution with previously resolved variables. Return solution(s).
(25) end if
In the appendix, we prove by structural induction that Algorithm 1 is guaranteed to return all optimal solutions of (4). However, we note that not every solution returned by Algorithm 1 is optimal. The nonoptimal solutions can be easily discarded by testing against the objective function (4) at the end of the algorithm. We also note that in Algorithm 1, we can simply remove those packets received by every receiver from the problem. If there are
such variables, we can start step
above from
instead of
. The Matlab code for both the greedy and sorted pruning algorithms can be found at http://users.rsise.anu.edu.au/~parastoo/netcod/.
We conclude this section by a brief note on the computational complexity of Algorithm 1. Let us denote the number of recursions required to solve the problem of size
by
. According to Algorithm 1, this problem is always broken into two smaller problems of size
and
. Therefore, one can find the number of recursions required to solve
by recursively computing
. The recursion stops when one reaches a problem of size 1 (only one packet to transmit) where
.