Talk:Same fringe: Difference between revisions

Content added Content deleted
Line 38: Line 38:
::Thanks. --[[User:Paddy3118|Paddy3118]] 22:00, 14 August 2012 (UTC)
::Thanks. --[[User:Paddy3118|Paddy3118]] 22:00, 14 August 2012 (UTC)


: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 node into a list where the left side is the first element, and if the right side is also a node, you include that as the rest of the "list"; until you find a right side that is a leaf, which you take as the last element in the list. 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)
: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)


== Concurrency required? ==
== Concurrency required? ==