Suggested answer for Exercise 7
What you have to notice first in example (1) is that this structure is ambiguous: with mistakes can refer to sentences or an analysis. This is an instance of structural ambiguity. With mistakes cannot be a complement in either of the interpretations, since it is not selected by either sentences or analysis. In both cases with mistakes functions as an adjunct, the ambiguity can be explained by the different positions where the adjunct appears within the tree. In one of the interpretations the Prepositional Phrase is the adjunct of analysis, in this case we have the meaning when the analysis itself contains the mistakes. In the other interpretation, when it is the sentences which contain the mistakes (with a potentially good analysis of the bad sentences), the Prepositional Phrase with mistakes is the adjunct of sentences.
The whole structure is a DP, since it is the determiner head that defines the definiteness of the nominal expression.
The two trees therefore will look as follows: