On Cooperative Patrolling: Optimal Trajectories, Complexity Analysis, and Approximation Algorithms