I need to solve for the average case complexity of ternary search. In the worst case you would do two comparisons so I assume worst case complexity looks like this:
C(n) = C(n/3) + 2
which can then be shown to be O(logn), however what would the average case look like? I'm thinking possibly this:
C(n) = C(n/3) + 1.5
since on average you might do 1 or 2 comparisons so (1+2)/3 = 1.5