When 2 blocks arrive at around the same time, the rule is to break the tie in favor of the earliest block.
If 2 blocks arrive at the same time, then the tie is broken by the next block.
This means that for around 10 minutes, network hashing power is split over two blocks.
A deterministic tie breaking rule would break the tie in favor of the block with the lowest hash.
This would reduce the number of long duration forks.
If two blocks arrived, then the network would "know" which of the two blocks wins the tie.
The disadvantage of this system is that it allows miners to game the system.
For example, if the target was 1 million and the most recent block hashed to 900,000, then the block would be a valid block.
However, a miner who wanted to double spend a transaction in that block could mine on the blocks parent. If the miner hit the block, then he would have a random number between 0 and 999,999. There is a good chance his new block would be able to orphan the current leaf block.
Before:
A <- B(900,000)
After
A <- B(900,000)
<- B'(600,000)
The remaining miners would recognize B' as the longest chain.
A compromise would be to only engage the rule where the fork is more than 1 block back.
If the 2 candidate blocks have the same parent, then mine on the one that arrived first. However, if fork point is at the grandparent or before, then mining on the block with the lowest hash.
Let S be the set of all blocks which tie for highest POW
Let E be the earliest block in S to arrive
Remove from S all blocks that have the same parent as E
Mine on the block in S with lowest hash
If all miners agree on E, then they will pick the same block to build on.
No matter which block a miner picks as E, all miners will agree if there is a grandparent fork.