LocalImprovementHeuristic( , 0-1MKP instance)
{
for   to  
   ;
   and ;
  if  
   update the best solution;
   choose a random element among ;
    ;
  else
   choose a random element among ;
    ;
return   corresponding to the best solution;
}
Algorithm 2: Local improvement heuristic.