Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I'm glad you already got it, because now I'm thoroughly confused.
Thank you @RileyHunter
I meant what mathematical dissertation/application that would represent:
L = [a₀, a₁, a₂, ..., aₙ₋₁]
Now I got it and solved it.
@Spaceman perhaps a different analogy would help - think of the boundaries of the window as existing "between" the indices of the array elements. So for the array
we have valid boundaries like so:
Then, to construct a window of a given length we place our left boundary, move forward
length
steps and place the right boundary. To construct the next window we move the left boundary forward byoffset
.So for
length = 2, offset = 1
we do:and for
length = 1
we do:and it then follows that for the empty window, we do:
Even when the set of remaining indices is empty, the empty set is still a valid subset because the empty set is a subset of all sets (including itself).
I don't understand what you're asking.
That's a weird set of thought. Mathematically, what is this equivalent to?
You are putting the window on
[2,3]
, then on[3]
, then on[]
( because offset1
).So no. Because you can take
0
elements from an empty list.Encoding the list as a cons-list maybe makes this easier to visualise: in a list of length
2
, there are3
constructors (Cons 2 (Cons 3 Nil)
). An array doesn't have constructors, it's just mapped memory, but even then there's one more value: maybe its length, maybe a trailingNUL
, or something.