Re: Dimension of sequences
- Posted by Fernando Bauer <fmbauer at hot?ail.c?m> Sep 25, 2007
- 625 views
Hello Igor! Igor Kachan wrote: > > Hello Fernando! > > Fernando Bauer wrote: > > > > Hello Igor! > > > > Igor Kachan wrote: > > > > > [snip] > > > > > > > See please: > > > }}} <eucode> > > > global function MaxDepth(object o) > > > integer n, x > > > if atom(o) then > > > return 0 > > > else > > > n = 0 > > > for i = 1 to length(o) do > > > x = MaxDepth(o[i]) > > > if x > n then > > > n = x > > > end if > > > end for > > > return n + 1 > > > end if > > > end function -- it is function by Ricardo Forno, genfunc.e lib > > > > > > ? MaxDepth({{{{}}},{},{{},{{{{{{{{{{{{}}}}}}}}}}}}},{{{{{{{{}}}}}}}}}) > > > ? > > > MaxDepth({{{{1}}},{1},{{1},{{{{{{{{{{{{1}}}}}}}}}}}}},{{{{{{{{1}}}}}}}}}) > > > </eucode> {{{ > > > The maximum depth is 14, all right. > > > Count please the '{' signs, opening the deepest sequence, > > > to be sure. > > > It seems to be a good parameter for description of a sequence. > > > Now a sequence has its own second dimension, and may be > > > considered as some 2-dimensional object, which can contain > > > description of any-dimentional real and unreal objects - > > > vectors, matrixes, tensors, lists, arrays, trees, books, > > > images ... etc, etc. > > > Sequence itself really has two own dimensions - length and depth, > > > I think now. So attempts to give it some *single* dimension > > > may be not very productive. Ok. Thanks to your fantastic picture below, now I understand your concept! > > > > Just to make clear, this concept of 2-dimensional object, or dimensionality > > 2 as you define, is a higher abstract concept, and is not my original > > definition > > of "dimension" which is your Depth. > > I do not think that it is more abstract, it is very clear, if > you'll just draw a sequence as the pretti_print() draws or as > it is drawn below? for example: > }}} <eucode> > ? > MaxDepth({{{{1}}},{1},{{1},{{{{{{{{{{{1,{1},1}}}}}}}}}}}},1,{{{{{{{{1}}}}}}}}}) > -- --{ } > -- { },{1},{ },1,{ } > -- { } {1},{ } { } > -- {1} { } { } > -- { } { } > -- { } { } > -- { } { } > -- { } { } > -- { } {1} > -- { } > -- { } > -- { } > -- {1, ,1} > -- {1} > > or: > > -- --{ } > -- { },{1},{ },1,{ } > -- { } {1},{ } { } > -- {1} { } { } > -- { } { } > -- { } { } > -- { } { } > -- { } { } > -- { } {1} > -- { } > -- { } > -- { } > -- {1, ,1} > -- {1} > </eucode> {{{ > Very elucidative pictures! Now, I understand your concept of dimensionality 2. Maybe we could call it Igor's plane? Kachan's plane? And, as you said, it can represent all the sequences! Now, following your reasoning: 1) a sequence can contain description of any-dimensional real and unreal objects - vectors, matrixes, tensors, lists, arrays, trees, books,images ... etc, etc. 2) all sequences can be represented in the Kachan's plane. 3) Kachan's plane can be represented in a sheet of paper. Then: - Any-dimensional real and unreal objects can be represented in a sheet of paper! or maybe: - Universe can be represented in a sheet of paper!! Now, I can't even imagine something as abstract as this!! (abstract= "the concentrated essence of a larger whole") This concept is so wide-ranging that I don't know if it has some use, since all the sequences have the same dimension 2. > It is something like to just icicles or stalactites. > Did you see the icicles in Brasilia? So far, I didn't. :) > > And these dimensions are very demonstative, not abstract at all. > They are just dimensions of some sheet of paper, needed to draw > this graphical representation of some sequence. Ok. Your picture shows this very well! [snipped] > > Regards, > Igor Kachan > kinz at peterlink.ru I appreciated very much your view about this. I still have another approach about the "dimension of sequences", but before I post it, I want to implement it in Euphoria. The line of reasoning is: a NRS is a set of RS where each one has a known integer dimension. Then, the dimension of a NRS is a sequence formed by that dimensions. Thanks, Fernando