numeric algorithm adjacent_difference