I have a doubt in the question of 8 coins(where we have to find the lighter coin)

how do we know how to group the coins for optimal solution?