As Alex says, 2nd or 3rd would do it, but that's almost certainly beyond us now. But your scenarios for 4th place are spot on. I can't think of any other possible circumstances barring some unlikely UEFA Fair Play allocation.
Just checked the Fair Play situation and Scotland are 9th with only the top 3 associations getting a club in, so that's gone!
Wouldn't write us of just yet. We need to play all the teams and can take points of any of them. All those above us will drop points to Celtic and to each other so I think things will be a lot closer than they look at the moment.
Here's my theory: Celtic take15 pts. We take 12 pts out of fifteen. The rest can then only take nine. Lets say Aberdeen take the 9 that would mean only 6 available for DU and Motherwell and St Johnstone. St Johnston take 3 from DU and Motherwell takes 3 from St Johnstone but lose to DU.
Final Standings
Celtic...............103pts
Aberdeen..........72pts
Inverness..........64pts
Motherwell........63pts
Dundee U.........57pts
St Johnstone....51pts
Simples really........................................now how to get that 12 pts.