Vettel wins the title if:

He finishes in the top four

He finishes fifth, sixth or seventh and Alonso doesn't win

He finishes eighth or ninth and Alonso is third or lower

He finishes 10th or worse and Alonso is not on the podium

Alonso wins the title if:

He wins and Vettel is fifth or lower

He is second and Vettel eighth or lower

He is third and Vettel is 10th or lower