/*Stage 1. Linear Expansion Algorithm (LE)         */
/*For a follower                  */
if  Priority == “ 𝐹 𝑖 then /* 𝑖 { 1 𝑁 𝑛 2 }            */
if  Object detected Object assigned sonar range limit then
  Stop driving;
else
  repeat
    Search for RSSI of AP “ 𝐹 𝑖 + 1 ” or “ 𝑇 ” when 𝑖 = 𝑁 𝑛 2 ;
  until 𝐹 𝑖 + 1 ” or “ 𝑇 RSSI found;
  if 𝐹 𝑖 + 1 ” or “ 𝑇 RSSI assigned RSSI threshold limit  then
   Stop driving;
  else
   Drive straight;
Algorithm 2: The LE algorithm for a follower.