Consider
t = Permutation([1, 3, 2]).increasing_tree()
print t
print t.parent()
This gives
1[., 2[3[., .], .]]
Labelled binary trees
Conversely, I would like to generate a labelled binary tree from its string representation.
s = "1[., 2[3[., .], .]]"
LabelledBinaryTree(s)
This gives
ValueError: malformed string
How do I have to proceed?