Consider the election problem for anonymous trees of unknown size, where communication is by asynchronous message passing.
(1) Give a randomized algorithm that is partially correct, process-terminates with probability one, and has an expected message complexity of $\mathrm{O}(N)$ messages. (Actually, an expected message complexity of $N+1$ messages is achievable.)
(2) Does a deterministic algorithm exist for this case?