Algorithms use patterns in data to predict future behavior, including that of criminals, making them ideal for helping law-enforcement agencies fight crime.