Complexity of structured computational problems