Research Article

A Mobile Information System Based on Crowd-Sensed and Official Crime Data for Finding Safe Routes: A Case Study of Mexico City

Algorithm 3

The safe routing algorithm.
   Input: Set of nodes
    start node
    finish node
   Result: Set of distance values (weighted crime rate)
(1) Assign distance values ,
(2) Let
(3) Let current node
(4) while  exists()  do
(5)   foreach  neighbor()  do
(6)    Let be
(7)    if    then
(8)     
(9)    
(10)  if   or   then
(11)   return
(12)  else
(13)