## 6 Data Transmission
### Number of Packets Transmitted or Received
#### 6.2.2 Scenario II: With Retransmission  
Under the assumptions in Section 3.2, simplified CSMA/CA protocol without RTS/CTS is adopted to improve the success rate of data transmission. There are three situations in a data transmission process: (1) the receiver fails to receive the DATA; (2) the receiver successfully receives the DATA but the transmitter fails to receive the ACK; and (3) both DATA and ACK are successfully received. For the first two situations, the transmitter will retransmit the DATA until it receives the ACK message from the receiver or the maximum number of retry attempts is reached. Assume each transmission is an independent event. Let \(A\) and \(B\) be the retransmission rates of DATA and ACK, respectively. All the transmission possibilities and the corresponding probabilities in one hop are enumerated in Table 3 (the maximum number of retry attempts is 2). Take the case in the first row as an example, it describes the situation that: (1) the transmitter sends DATA to the receiver; (2) the receiver successfully receives it then sends an ACK back to the transmitter; and (3) the receiver again successfully receives the ACK and no retransmission occurs. The transmission process is denoted in Columns 1-6, where 1, 0 and N/A represent the transmission success, failure, and no transmission, respectively. In this case, the number of retry attempts for either DATA or ACK is 1, and this information is recorded in Columns 7 and 8. Since packet transmission is an independent event, the probability that this situation happens can be calculated via the multiplication rule, and the calculation result, \((1-A)(1-B)\), is in Column 9. When DATA is finally successfully transmitted to the receiver, Column 10 shows \"S\". In Column 10, S and F denote whether or not the sensed DATA can be transmitted successfully within the maximum number of retry attempts. Since packet transmission is an independent event, the probabilities of transmitting the DATA and the ACK \(n\) times can be written as  
\[\omega_{data,n}= \begin{cases}(1-A)(1-B),&n=1,\\ A(1-A)(1-B)+B(1-A)^{2}(1-B),&n=2,\\ A^{2}+2 AB(1-A)+B^{2}(1-A)^{2},&n=3,\end{cases}  \tag{18}\]  
and  
\[\omega_{ack,n}= \begin{cases}(1-A^{2})(1-B)+A^{2}(1-A)(1+2B),&n=1,\\ B(1-A)^{2}(1-B)+AB(1-A)^{2}(2+B),&n=2,\\ B^{2}(1-A)^{3},&n=3,\end{cases}  \tag{19}\]  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multicolumn{6}{c}{**Transmission Results**} & \multicolumn{3}{c}{**Number of**} \\ \hline \multicolumn{2}{c}{**Attempt 1**} & \multicolumn{2}{c}{**Attempt 2**} & \multicolumn{2}{c}{**Attempt 3**} & \multicolumn{2}{c}{**Attempts**} & \multicolumn{1}{c}{**Probability**} & \multicolumn{1}{c}{**Success or**} \\ \hline
**DATA** & **ACK** & **DATA** & **ACK** & **DATA** & **ACK** & **DATA** & **ACK** & **Failure** \\ \hline
1 & 1 & N/A & N/A & N/A & N/A & 1 & 1 & \((1-A)(1-B)\) & S \\
1 & 0 & 1 & 1 & N/A & N/A & 2 & 2 & \(B(1-A)^{2}(1-B)\) & S \\
0 & N/A & 1 & 1 & N/A & N/A & 2 & 1 & \(A(1-A)(1-  
respectively. Thus, the expected numbers of transmission attempts of DATA and ACK, respectively, are  
\[ \begin{cases}\omega_{data}=\omega_{data,1}+2\omega_{data,2}+3\omega_{data,3},\\ \omega_{ack}=\omega_{ack,1}+2\omega_{ack,2}+3\omega_{ack,3}.\end{cases}  \tag{20}\]  
Hence, the numbers of packets transmitted and received, for both DATA and ACK, under the retransmission can be expressed as  
\[N_{t,re,data}=\left\{ \begin{array}{l}\frac{(L-i+1)(L-i+2)}{2}a\omega_{data },\text{Case }1,\\ \frac{(L-i+1)(L-i+4)}{4}a\omega_{data},\text{Case }2,\\ (L-i+1)a\omega_{data},\quad\text{Case }3,\end{array} \right. \tag{21}\]  
\[N_{t,re,ack}=\left\{ \begin{array}{l}\frac{(L-i)(L-i+3)}{2}a\omega_{ack}, \text{Case }1,\\ \frac{(L-i)(L-i+5)}{4}a\omega_{ack},\text{Case }2,\\ (L-i)a\omega_{ack},\qquad\text{Case }3,\end{array} \right. \tag{22}\]  
and  
\[N_{r,re,data}=\left\{ \begin{array}{l}\frac{(L-i)(L-i+3)}{2}a\omega_{data}, \text{Case }1,\\ \frac{(L-i)(L-i+5)}{4}a\omega_{data},\text{Case }2,\\ (L-i)a\omega_{data},\qquad\text{Case }3,\end{array} \right.