Jump to content

LASCNN algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Charmk (talk | contribs) at 15:43, 15 August 2020. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

LASCNN is a Localized Algorithm for Segregation of Critical/Non-critical Nodes [1][2]

Pseudocode

LASCNN (MAHSN)
(1) Forβˆ€π΄βˆˆπ‘€π΄π»π‘†π‘
(2)   If (π΄β†’πΆπ‘œπ‘›π‘›πΏπ‘–π‘ π‘‘.getSize()==1)then
(3)      𝐴→SetNonCritical()=LEAF
(4)   Else
(5)      Continue = TRUE
(6)      While (Continue==TRUE)
(7)         Continue = FALSE
(8)            Forβˆ€π΄π‘π‘‘π‘–Vπ‘’πΆπ‘œπ‘›π‘›βˆˆπΆπ‘œπ‘›π‘›πΏπ‘–π‘ π‘‘
(9)               If (π΄βˆ‰π΄π‘π‘‘π‘–Vπ‘’πΆπ‘œπ‘›π‘›)then
(10)                 If (π΄β†’πΆπ‘œπ‘›π‘›π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ .getSize()==0)
(11)                    π΄β†’πΆπ‘œπ‘›π‘›π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ .add(𝐴𝑐𝑑𝑖Vπ‘’πΆπ‘œπ‘›π‘›)
(12)                    Continue = TRUE
(13)                 else
(14)                    If (𝐴𝑐𝑑𝑖Vπ‘’πΆπ‘œπ‘›π‘›βˆ©πΆπ‘œπ‘›π‘›π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ ==TRUE)
(15)                       𝐴𝑐𝑑𝑖Vπ‘’πΆπ‘œπ‘›π‘›βˆͺπΆπ‘œπ‘›π‘›π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ 
(16)                       Continue = TRUE
(17)                    Endif
(18)                 Endif
(19)              Endif
(20)           End For
(21)     End While
(22)  Endif
(23)  If (π΄β†’πΆπ‘œπ‘›π‘›π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ .getSize()<π΄β†’π‘π‘’π‘–π‘”β„Žπ‘π‘œπ‘Ÿπ‘ .getSize())
(24)     𝐴→SetCritical()=TRUE
(25)  else
(26)     𝐴→SetNonCritical()=INTERMEDIATE
(27)  Endif
(28)End For

See also

References

  1. ^ Imran, Muhammad, Mohamed A. Alnuem, Mahmoud S. Fayed, and Atif Alamri. "Localized algorithm for segregation of critical/non-critical nodes in mobile ad hoc and sensor networks." Procedia Computer Science 19 (2013): 1167-1172.
  2. ^ Alnuem, Mohammed, Nazir Ahmad Zafar, Muhammad Imran, Sana Ullah, and Mahmoud S. Fayed. "Formal specification and validation of a localized algorithm for segregation of critical/noncritical nodes in MAHSNs." International Journal of Distributed Sensor Networks 10, no. 6 (2014): 140973