The structure of history matching problems