Talk:Same fringe: Difference between revisions

→‎Pythons binary tree representation: can already use general trees if you like
(→‎Pythons binary tree representation: can already use general trees if you like)
Line 39:
 
:So you've basically made the task into the same fringe problem for a general tree, not just binary tree. You've made a transformation of binary trees into general trees, kind of in a Lisp list way, i.e. Turn a binary node into a general node (with variable number of children) where the left side is the first child, and if the right side is also a node, you include that as the "rest" of the children; until you find a right side that is a leaf, which you take as the last child. Your fringe function is essentially a fringe function for general trees, which also works for this case because your transformation preserves the ordering of the fringe. Do you want to just change the problem to be for general trees? --[[User:Spoon!|Spoon!]] 09:59, 15 August 2012 (UTC)
::You can represent a binary tree using a general tree, so that is already allowed. But this problem, when posed in the literature, is normally about binary trees. I see no reason to force a generalization. --[[User:TimToady|TimToady]] 14:44, 15 August 2012 (UTC)
 
== Concurrency required? ==
Anonymous user