Scores right now:
Djokovic 2W 0L, sets 4-1
Murray 1W 1L, sets 3-3
Berdych 1W 1L, sets 3-3
Tsonga 0W 2L, 1-4
Now let's go through some scenarios:
Berdych def. Djokovic + Murray def. Tsonga
Djokovic, Berdych and Murray will have equal wins and losses. Sets decide. If both matches go in straights, sets are Djokovic 4-3, Berdych and Murray 5-3. Berdych and Murray advance.
Murray will also advance if he wins in three if Berdych beats Djokovic in 2, I think, since he will have more sets won with the same difference.
If Berdych beats Djokovic in 3 and Murray Tsonga in 2, Djokovic and Murray will be through.
If Berdych and Murray both win in 3, Then Murray and Berdych will both have 5-4 set scores and H2H will decide since Djokovic will have the best ratio. Djokovic will advance surely.
Berdych def. Djokovic + Tsonga def. Murray
Djokovic and Berdych advance, with Berdych first from the group, Djokovic second.
Djokovic def. Berdych + Tsonga def. Murray
Djokovic will advance. Other players will have a three way tie, sets will decide.
If both matches are won in straights, Tsonga advances.
If Berdych wins a set against Djokovic and Tsonga wins in straights, Berdych advances.
If Berdych wins a set and Murray wins a set, Murray advances due to H2H.
If Berdych loses in straights and Murray wins a set, Murray advances.
Djokovic def. Berdych + Murray def. Tsonga
Djokovic and Murray advance.
Someone should probably double-check these