recategorized by
6,841 views
34 34 votes
What is the number of binary trees with $3$ nodes which when traversed in post-order give the sequence $A, B, C ?$ Draw all these binary trees.

4 Answers

Best answer
42 42 votes

There are only five such binary trees. This is given by $3^{\text{rd}}$ Catalan number as here we are finding the number of structurally similar binary trees with $3$ nodes. 

  1. One with $C$ as root and left child as $A$ and right child $B$.
  2. Second with $C$ as root, $B$ as left child and $A$ as again left child of $B$.
  3. Third with $C$ as root, $B$ as left child and $A$ as right child of $B$.
  4. Fourth with $C$ as root, $B$ as right child and $A$ as right child of $B$.
  5. Fifth with $C$ as root, $B$ as right child and $A$ as left child of $B$.
edited by
42 42 votes

T

Whenever only one order is asked for a tree, total no. of trees = total no. of structures possible.

Position:
Show:

Related questions

56 56 votes
8 answers 8 answers
45.9k
45.9k views
Kathleen asked Oct 8, 2014
45,862 views
A binary tree $T$ has $n$ leaf nodes. The number of nodes of degree $2$ in $T$ is$\log_2 n$$n-1$$n$$2^n$
14 14 votes
2 answers 2 answers
5.1k
5.1k views
go_editor asked Feb 12, 2018
5,072 views
What is the equivalent minimal Boolean expression (in sum of products form) for the Karnaugh map given below?
35 35 votes
3 answers 3 answers
8.6k
8.6k views
Kathleen asked Oct 8, 2014
8,635 views
Consider the relation scheme.$$\begin{array}{|ll|ll|} \hline & \text{AUTHOR} & \text{(ANAME, INSTITUTION, ACITY, AGE)} \\\hline & \text{PUBLISHER} & \text{(PNAME, PCITY)}...
42 42 votes
11 answers 11 answers
19.3k
19.3k views
Kathleen asked Oct 8, 2014
19,310 views
Consider the relation scheme $R(A, B, C)$ with the following functional dependencies:$A, B \rightarrow C,$$C \rightarrow A$Show that the scheme $R$ is in $3\text{NF}$ but...