Not logged in. · Lost password · Register

Member since Dec 2016
5 posts
Subject: Problem 2.1 symmetry definition
Hi, I have a question regarding Problem 2.1, Task 4:

For determining if a tree is symmetrical, should we only look at the structure, or also at the contents?
If we assume that the tree is sorted, it would not really make sense to compare the contents.
Member since Oct 2019
86 posts
Yes, you should only look at the structure.
Member since Jul 2016
64 posts
I'm still not quite shure how symmtery is defined. Is the following example symmetric, or do the subtrees have to be symmetric as well?

       /   \
     o      o
    /         \
  o            o
Member since Oct 2019
86 posts
+1 Rowy
Yes, the example you give is symmetric. The idea is that the right subtree is a mirror image of the right subtree.

I was reusing an old problem and did not realise just how problematic the symmetry definition was. We'll grade generously :).
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Datenschutz | Kontakt
Powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2011 by Yves Goergen