## 3 Improve L1 Optimization to Correct 100% of Corrupted Propagated Errors in Network Coding
### Overcome \"All-or-Nothing\" Problem with Reputation-Based Trust Model of Social Network
#### 4.2.2 Collecting Experiences to Build the Trust for an Intermediate Node in WSN  
Every relay node will send ACKs of the full rank report to the \(h\) hops upstream nodes. Every relay node will receive some ACKs of the full rank report from \(h\) hops downstream. How does one judge the packets of a relay node that has full rank of received packets? Because the topology is variable, we cannot fix the incoming edges for a relay node, therefore, we cannot judge what time the rank of received packets for a relay node is full. In this model, we define \"the full rank\" as the \"max rank\" of the received packets. Then, we select combinations of packets which has the minimum of packets and is full rank. For example, the max flow min cut is 10, then the dimension of NEC is also 10. For a relay node, the rank of all the received packets is 5. We think the \"full rank\" is 5 (not 10) for this relay node. We select the combinations whose number is minimum among all the combination of the received packets. We can certainly find a combination of 5 incoming edges whose received packets are full rank. Then, the nodes will send ACKs along the corresponding incoming edges to all the \(h\) hops upstream nodes. After a period of time \(\Gamma\), every relay node will have a record about the times of its own received ACKs. The times of its own received ACKs for a relay node will be treated as its own trust value. The value of \(\Gamma\) and \(h\) can be set according to the situation. The bigger the value of \(h\), the more precise the trust value. If \(h\) is set as the number of hops from source to the sink, there is no need to use the trust model of social network which is based on probabilistic method rather than deterministic method. In this case, the network coding scheme is optimal and there is no longer the so-called \"all-or-nothing\" problem. However, the big \(h\) will consumed too much resource which is unacceptable for WSN. Generally, for a common WSN, \(h\) is set as 2 which is based on the next experiment results. It is enough to make reputation-based trust of the relay node while the \(h\) is set as 2. The reputation-based trust of a relay node reflects the reality about socialistic characteristic in network coding. The factors reflecting the trust value for a relay node come from two aspects: the topology and the random coefficients of network coding scheme. The two factors produce the randomness. If the two-factor producing randomness is fixed in a manner, the reputation-based trust value will really reflect the degree of importance for a relay node which makes the received packets of the downstream nodes full rank. Although the topology for some kinds of WSN, for example, underwater wireless sensor networks, is variable, it tends to stay stable for a period of time. Another randomness coming from the random network coding can be restrained. Every node just randomly  
Figure 4: No cluster head architecture of WSN. generates a local coding kernel for itself, and will perform network coding with the first time local coding kernel for the next time. Thus, the topology and local coding kernel are all stable. The reputation-based trust value will reflect the social characteristic for a node, and we can use the concepts of social networks to research the \"all-or-nothing\" problem of network coding in WSN. Figure 5 is an example of the above scheme. For the relay node 6, we want to find its reputation-based trust value. During time \(\Gamma\), the relay node 6 will keep receiving ACKs from its downstream relay nodes. For simplicity, we only give its two downstream nodes which are nodes \(i1\) and \(i2\). The details about node \(i1\) are omitted and we focus on node \(i2\). The max flow min cut of this network is 10. For node \(i2\), it has many incoming edges and we assume there are 20 incoming edges. After computing, we know the rank of all the received packets is, for example, 5. Then, we select a combination of 5 incoming edges whose received packets are full rank. The 5 packets span a vector space whose rank is 5.