A new computer model could help military strategists devise the most damaging cyber attacks as well as guard America’s critical infrastructure. The model also could benefit other projects involving interconnected groups, such as restoring ecosystems, halting disease epidemics and stopping smugglers.