How do you guys print out a binary tree?

Anthony Liu antonyliu2002 at yahoo.com
Thu Apr 20 02:18:32 EDT 2006


Hi, Bayer Munich,

I implemented a syntax parser from bottom up using a
CNF grammar.

I actually know what part of the triangle of the
matrix I need to turn into a tree, but it is kinda
hard to describe in text.

So, I just made it easy by giving a triangle of the
matrix.

Anyway, thanks for your hint.

I'll try out Dave's script.  If I cannot produce a
nice tree, I'll just forget it.  It is not important
anyway.

--- bayerj <bayerj at in.tum.de> wrote:

> The problem is that you cannot represent a matrix as
> a tree, due to the
> fact that there are more than one tree for a matrix.
> 
> First you have to decide, how you will turn the
> matrix into a tree.
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Python-list mailing list