<|im_start|>user
Is there a bijective mapping between the set of natural numbers and the set of all binary tree shapes? I'm pretty sure there is, but I can't find the paper I read about it<|im_end|>
<|im_start|>assistant
Yes, there exists a bijective mapping between the set of natural numbers and the set of all binary tree shapes. This mapping is known as "Cayley's formula" and was first described by Arthur Cayley in the 19th century. According to Cayley's formula, there are n^(n-2) different labeled binary trees with n vertices, and hence there is a bijection between the set of natural numbers and the set of all binary tree shapes.<|im_end|>
<|im_start|>user
What is a bijective mapping?<|im_end|>
<|im_start|>assistant
A mapping that is both injective and subjective. Think of it as a mapping that has a one-to-one correspondence.

Every X corresponds to a different Y.<|im_end|>
