Research Article
Efficient Data Transmission for Community Detection Algorithm Based on Node Similarity in Opportunistic Social Networks
| | Input: source node , relay node , destination node ; power of source node ; power of relay node ; | | | Output: optimal relay node ; | | (1) | Begin | | (2) | Power of Destination node ; | | (3) | Calculate Information received by relay node and destination node , ; | | (4) | Amplify the received signal and calculate Scaling factor ; | | (5) | Threshold of number of candidate relay nodes ; | | (6) | Function BER = AF_Simulation (max_SNR); | | (7) | for (snr = 0; snr ≤ max_SNR; snr++) | | (8) | for (i = 0; i ≤ n; i++) | | (9) | V = 1/(10^(snr/10)); //V is the variance and the noise energy is normalized | | (10) | sig = randsrc(1, N, [0 1]); //Generating binary input sequences | | (11) | sig_mod = QpskMapping(sig);//The input binary sequence is QPSK modulated | | (12) | End for | | (13) | If (n>=) | | (14) | Ci = min{Cs,ri, Cri,d}; | | (15) | Optimal relay node | | (16) | else | | (17) | Optimal relay node | | (18) | End If | | (19) | End for | | (20) | END |
|