0440949 Andreas van Cranenburgh Opdracht 4 Datastructuren R 6.9. No. This is not possible, cause otherwise the very terms "preorder" and "postorder" would be quite silly. Imagine this tree: A B C preorder traversal gives the sequence: [A, B, C] postorder traversal gives the sequence: [B, C, A] - a tree with one root and one leaf will give similar results (different order). - a tree with even more nodes than this example will show even more different order. So I consider the point proven. R 6.10. I believ my answer was generalized enough to apply to proper binary trees as well. C 6.5: Such a tree could look like this: a / \ b c / \ d e C 6.10. General Euler Tour, an informal description: - From rootnode, start with the first child and visit all its left-most children, until we reach the bottom. - Now re-visit visited nodes, while also visiting all their children, starting from left going to right, until we reach the root node again. - Upon reaching the rood node, go to the next child of the root node and go down and up again as already described. Attempt at code (but unfinished): def GenericEulerTour(tree): """Implements an Euler Tour for Ordered Trees""" result = [tree.root] #We return a sequence, add root first. for a in root.children: b = a.getLeftMostChild() result.add(b) while b.hasChild(): b = b.getLeftMostChild() result.add(b) while b.hasParent(): b = b.parent() result.add.. # !!! .... incomplete .... !!! return result def getLeftMostChild(Node): # the children accesor method returns an ordered sequence of all # children, so return first return Node.children[0] P 6.4. Draw binary tree: see attached file.