Maximum Flow Algorithm in MANETs