Need an equasion to figure out the following at any starting point...

nullified

New member
Joined
May 21, 2013
Messages
4
Two examples - let's say the starting number is 4. This would be 3+2+1,+1,+1. To total 8. For 5 it is 4+3+2+1,2+1,+1,+1 to total 16.

Why I need this in an equasion is to figure out, say, what 1,000 or 10,000 would come out to..

I knew of an equasion that solves things like this, it's (n(n+1))/2. But I don't know how to figure out this one (should have taken calculus in college but never did)...

Thanks if you can come up with a correct equasion. I can figure out more examples if you need them, like say what 10 would come out to.

Uh, Basically, it's a computer structure. In actuality, 4 looks like this: (1)3, (2)2,1,0 (3,1)1,0 (3,2) 0 (3,1,1) 0 - that gives 8 positions. 5 is similar to that... I just need to find out how much space this particular structure takes up when it gets very much larger, which is why I'm posting for the math help..

Thanks guys..:confused::confused:
 
What is "it"? What are you doing?

"It" is a data structure. It takes up a certain number of positions, which I listed. Basically, a total size of 4 is the starting point. So if it is completely full in the data structure, that would mean that there are 3 positions starting out with that i need to continue with. So 1+3 positions already. Then, if the first of those positions is full, it could only possibly take up 2 positions, and the second of that can only take up 1 more position. So that adds to it, until it is all expired.

I can't really post the exact structure because it would give away what I am using it for...

But basically, it goes like this: start out with 4 - that means 4 possible positions.
1(for all 4-let's say everything possible is full) so 3 positions remaining -
3 is stored at the bottom, so you know where to go next...
This leads us to 2, 1, 0 - which takes up the 3 positions.
This leads to 1,0 for the 2 positions, 0, for the 1 position, and then finally 0 for the (1,0 <-1 position we had before)..

So it gives a total of 8 positions, assuming a completely full structure.

It goes like this: (a)3, (a,1)(b)2, (a.2)(c)1, (a.3)(d)0, (b,1)(e)1, (b.2)0, (c)0, (e)0 Those are all positions exhausted assuming the full range of 4 is accounted for. So it takes up 8 positions. In this case, it looks like you can add up all the numbers, but that is slightly misleading..

So it becomes a summation problem, that looks like 3+2+1, +1, +1. And 5 positions looks like the following:

(a)4, (a.1)(b)3, (a.2)(c)2, (a.3)(d)1, (a.4)0; (b.1)(e)2, (b.2)(f)1, (b.3)0; (c.1)(g)1, (c.2)0; (d)0, (e.1)(h)1, (e.2)0, (f)0, (g)0, (h)0 - yielding 16 positions.

The question is, how many positions does it take up given 128, or 256, or 512? That's what I need to know. I can only do so much on paper...

I hope I made it clearer for you, I know it seems ambiguous.. The fact is it's a running count, so adding up all the numbers when you start out with 5 possible positions, gives you 4+3+2+1+2+1+1+1 - 16. Where in starting from 4, is was 1 more than the count of those same numbers. (the numbers of positions added up when you have a total of 4 possible positions was 7, but it takes up 8 positions total. The count of all the numbers in 5 possible positions gives exactly the correct number)

Does that make it clearer? The reason I said (n(n+1))/2 is because this is similar to that, only it's also like a factorial in a sense.. I was hoping someone could figure it out with math so I could know what something like 512 possible starting positions would come out to. However, I'm hoping that what it comes out to isn't something along the lines of 2^512/something, which would obviously make it astronomically large..

I'm just seeing what the full spectrum of values would take. Looking over it, it looks like it takes up space equivalant to about 2^4/2 and 2^5/2, but I don't know if that's accurate, really. So I need the math to know for sure, so I'm not spending the next couple of months punching an unusual algorithm into the computer. I have two other similar solutions to the same problem. They both take up n(1) space, this takes up either its maximum bound that I'm trying to figure out if full, or n(2), whichever is smaller. So far, we have not found any structure that doesn't at least take up 1(n) positions... That's the kind of problem I'm trying to logically solve...

Ok.. Sorry -
I answered my own question..

6 possible positions all full lead to this bottom edge of counting..
54321032102101002101001000100000 - 32 positions..

it's 2^n/2 if all full. So at 5, it was 2^5=32/2 = 16. At 6 it's 2^6/2 = 32. At 4 it's 2^4=16/2 = 8..

Sorry for bothering you all. I have some leading stuff here, and it isn't all that bad that when not full, it takes up much less space than the full spectrum. Figures... Sometimes I hate computers - we just can't get a better trie than 1(n) relative space...
 
Last edited:
"It" is a data structure.

It takes up a certain number of positions

So if it is completely full in the data structure...

I know it seems ambiguous...

It seems to me that the ambiguity arises not so much from the subject matter per se, but rather from your continued use of unreferenced pronouns (as well as apparently using the same pronoun to refererence multiple nouns). Math discussion requires precise communication.

For example, you state that "it" = "data structure".

This makes your phrase in blue above equivalent to:

"So if data structure is completely full in the data structure..."

Perhaps, that third instance of "it" represents "a total size" or "4" or "the starting point"?

None of those make sense to me, either, so I quit reading at that point. :(
 
What is "it"? What are you doing?

"It" is a data structure. It takes up a certain number of positions, which I listed. Basically, a total size of 4 is the starting point. So if it is completely full in the data structure, that would mean that there are 3 positions starting out with that i need to continue with. So 1+3 positions already. Then, if the first of those positions is full, it could only possibly take up 2 positions, and the second of that can only take up 1 more position. So that adds to it, until it is all expired.

I can't really post the exact structure because it would give away what I am using it for...

But basically, it goes like this: start out with 4 - that means 4 possible positions.
1(for all 4-let's say everything possible is full) so 3 positions remaining -
3 is stored at the bottom, so you know where to go next...
This leads us to 2, 1, 0 - which takes up the 3 positions.
This leads to 1,0 for the 2 positions, 0, for the 1 position, and then finally 0 for the (1,0 <-1 position we had before)..

So it gives a total of 8 positions, assuming a completely full structure.

It goes like this: (a)3, (a,1)(b)2, (a.2)(c)1, (a.3)(d)0, (b,1)(e)1, (b.2)0, (c)0, (e)0 Those are all positions exhausted assuming the full range of 4 is accounted for. So it takes up 8 positions. In this case, it looks like you can add up all the numbers, but that is slightly misleading..

So it becomes a summation problem, that looks like 3+2+1, +1, +1. And 5 positions looks like the following:

(a)4, (a.1)(b)3, (a.2)(c)2, (a.3)(d)1, (a.4)0; (b.1)(e)2, (b.2)(f)1, (b.3)0; (c.1)(g)1, (c.2)0; (d)0, (e.1)(h)1, (e.2)0, (f)0, (g)0, (h)0 - yielding 16 positions.

The question is, how many positions does it take up given 128, or 256, or 512? That's what I need to know. I can only do so much on paper...

I hope I made it clearer for you, I know it seems ambiguous.. The fact is it's a running count, so adding up all the numbers when you start out with 5 possible positions, gives you 4+3+2+1+2+1+1+1 - 16. Where in starting from 4, is was 1 more than the count of those same numbers. (the numbers of positions added up when you have a total of 4 possible positions was 7, but it takes up 8 positions total. The count of all the numbers in 5 possible positions gives exactly the correct number)

Does that make it clearer? The reason I said (n(n+1))/2 is because this is similar to that, only it's also like a factorial in a sense.. I was hoping someone could figure it out with math so I could know what something like 512 possible starting positions would come out to. However, I'm hoping that what it comes out to isn't something along the lines of 2^512/something, which would obviously make it astronomically large..

I'm just seeing what the full spectrum of values would take. Looking over it, it looks like it takes up space equivalant to about 2^4/2 and 2^5/2, but I don't know if that's accurate, really. So I need the math to know for sure, so I'm not spending the next couple of months punching an unusual algorithm into the computer. I have two other similar solutions to the same problem. They both take up n(1) space, this takes up either its maximum bound that I'm trying to figure out if full, or n(2), whichever is smaller. So far, we have not found any structure that doesn't at least take up 1(n) positions... That's the kind of problem I'm trying to logically solve...

Ok.. Sorry -
I answered my own question..

6 possible positions all full lead to this bottom edge of counting..
54321032102101002101001000100000 - 32 positions..

it's 2^n/2 if all full. So at 5, it was 2^5=32/2 = 16. At 6 it's 2^6/2 = 32. At 4 it's 2^4=16/2 = 8..

Sorry for bothering you all. I have some leading stuff here, and it isn't all that bad that when not full, it takes up much less space than the full spectrum. Figures... Sometimes I hate computers - we just can't get a better trie than 1(n) relative space...

That's what happens when you start to explain the problem to somebody else - the answer jumps out at you.
 
Top