On the complexity of computing the capacity of codes that avoid forbidden difference patterns