Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I typed your answer into OEIS and it came up with a few results.</p> <p>A promising result is A000669 - the number of series-reduced planted trees with n leaves. The following example is provided: a(4)=5 with the following series-reduced planted trees: (oooo), (oo(oo)), (o(ooo)), (o(o(oo))), ((oo)(oo)). That said, our trees are not necessarily planted.</p> <p>However, after a bit of work, I must inform you that your value for B4 is incorrect - the correct answer is 14. Then the answer is clear: <a href="http://oeis.org/A000108" rel="nofollow">the Catalan numbers</a>. The Catalan numbers count a strange and varied number of things, including the problem you're presented here (via <a href="http://mathworld.wolfram.com/BinaryTree.html" rel="nofollow">Wolfram</a>). It is worth noting Catalan number identity (8) here - the recurrence that defines the Catalan numbers. This summation can be thought of as deciding the number of nodes that will be to the left of a node (and the rest will be to the right).</p> <p>An easier way to conceptualize this is using Dyck words. let X mean 'left parenthesis' and Y mean '0'. (I am using a list representation for trees - nodes to the left are lists on the left of an element and visa versa; if a node has no left or right lists it is considered a leaf.) We will put in right parentheses where appropriate. Then our trees for B3 are as follows:</p> <p>(((0)0)0) => X X X Y Y Y</p> <p>((0)0(0)) => X X Y Y X Y</p> <p>(0(0(0))) => X Y X Y X Y</p> <p>((0(0))0) => X X Y X Y Y</p> <p>(0((0)0)) => X Y X X Y Y</p> <p>From Wikipedia, the five 2n-length Dyck words of this form are XXXYYY, XYXXYY, XYXYXY, XXYYXY, and XXYXYY. And finally, the closed form</p> <pre><code> Bn = (1 / (n + 1)) * (2n choose n) = (2n!)/((n+1)!(n!)) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload