The fake coin problem attempts to find one counterfit coin (weighing 1 gram less), among a pile of real coins.

We use a scale and a Decrease-and-Conquer strategy to find the fake. One method is to recursivley divide the unknown pile into three equal piles until you find the fake coin. This results in a time efficency of log 3(n). It is worth noting that similar logic can be applied to find any fake coin assuming it has a weight difference. This example uses a lighter coin for the sake of learning.

How many coins in the total pile?