I am trying to identify the grammatical structure of certain parts of sentences I have been given. Unfortunately, I am baffled with the parts I have been asked to identify in the following three pairs of sentences. Please help, and thank you for your time and guidance!

(a) She [had] her house [painted]
(b) She [had painted] her house

(a) He stopped [to smoke] a cigarette
(b) He [stopped smoking] cigarettes

(a) You [must see] him
(b) You [must have seen] him

(a) She [had] her house [painted]>> Her house was painted by somebody else (a painter)
(b) She [had painted] her house >> She painted the house herself. [Note: Past perfect generally requires some context, so this sentence could mean that she had painted the house before something else happened.]

(a) He stopped [to smoke] a cigarette>> He stopped doing whatever he was doing (es. walking, working etc.) in order to smoke a cigarette.
(b) He [stopped smoking] cigarettes>> He quit smoking. He didn't smoke cigarettes any longer.

(a) You [must see] him >> It's an order or an advice. "Look, I've seen this great movie. You must see it!" (advice) -- "You must see Frank and ask him about the project." (order -- a bit bossy, uh?)
(b) You [must have seen] him >> Deduction. "I've heard you were in my office yesterday. You must have seen Claire, my secretary."

This is what I learnt ... and I hope it makes sense. Emotion: smile
I know what each sentence means. What I was seeking to do was identify the grammatical structures involved, i.e. "past perfect." Thanks, anyway.