could you provide some code to exemplify this?

On 10/22/07, Dido Sevilla <dido.sevilla / gmail.com> wrote:
> On 10/23/07, Simon Schuster <significants / gmail.com> wrote:
> > also, I'm interested in what is going on "behind the scenes" here. is
> > a[4][4][4][4][0] actually reaching in 4 levels deep?
>
> Well, what seems to have happened here is you created what amounts to
> a cyclic graph using the array.  Every time you get the 4th index of
> a, you get back a itself.  It's not exactly reaching in four levels
> deep but more accurately referencing itself four times. It's as if you
> created an array of pointers in C, and had some element in the array
> be a pointer back to the array itself.
>
> There are many uses for data structures of this type, as formal
> computer science is rife with graphs and the algorithms to deal with
> them. For instance, you could use such a structure as the internal
> representation of a state machine of some kind (finite automaton,
> pushdown automaton, linear bounded automaton, or even a Turing
> machine) , with each state being represented by an array, the inputs
> being indexes into the array, and the values of the array the new
> states the machine enters when a particular input is received. This is
> the simplest example I could think up off the top of my head, but read
> any decent book on algorithms and data structures and you'll find
> hundreds more.
>
> --
> 祟竇終膈鐚> 普通でも普通じゃなくて感じるまま感じることだけをするよ!
> http://stormwyrm.blogspot.com
>