Assume that a one-way hash function is secure and the best way to attack it is by using brute force. It produces an m-bit output. Finding a message that hashes to a given hash value would require hashing 2^m random messages. Finding two messages that hash to the same value would only require hashing 2^(m/2) random messages.
I know only about birthday paradox involving 23 people. How do I relate birthday paradox with this one?