Research Article

Shortest Paths Based Web Service Selection in Internet of Things

Algorithm 5

PruningBFSKNN( ).
Input: A (weighted) graph , candidate set , nearest neighbors, and source node ;
Output: A list of from , where ;
(1)let ;
(2)let ;
(3)while     do
(4) ;
(5) PruningBFSMapper ;
(6) = PruningBFSReducer();
(7)end while;
(8)/*******************************************
(9)Here we redefine “ ” as follows:
(10) and
(11) *******************************************/
(12) ;
(13) return