HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A proof of bonus mod's claim using linear algebra

02-17-2005, 02:10 AM#1
weaaddar
Bonus Mod claims that its ability set is the bare minimal required to achieve the range requested it be [0,2^n) or [-2^(n-1),2^(n-1))

Since Abilities can not be stacked you are limited to a boolean (0 or 1) multiple. The abilities themselves are themselves viewed as booleans on the order of 2^i where i is the index of the ability (1..N) Therefore, the linear combination of these booleans you can achieve any number in the range of 2^N. If the abilities were able to stack then it would not be required at all and you could just avoid using bonusmod completely and just keep adding one ability a bajillion times or what not.
While it's obvious to anyone who knows how integers are done in C languages lets just go through an empirical proof.

Suppose we want to create a range of 32 numbers.
Using the identity matrix I [sub]5[/sub] we can view it as a set of 5 base vectors b[sub]0[/sub] through b[sub]4[/sub]
Code:
| 1 0 0 0 0 | 
| 0 1 0 0 0 | 
| 0 0 1 0 0 | 
| 0 0 0 1 0 |  
| 0 0 0 0 1 |
=
[ 1 0 0 0 0 ]
[ 0 1 0 0 0 ]
[ 0 0 1 0 0 ]
[ 0 0 0 1 0 ]
[ 0 0 0 0 1 ] 
Since these values can not be modified and are fixed as 0 or 1 we view each one of these base vectors as 2^i thus we actually have the set 2^0 through 2^4. We are limited to only putting a true or a false by each one of these vectors, (0 or 1). Span theory says that if the vectors are non-parrallel then the range is that of Range of values to the N. (generally R^n where R is all real numbers), however, our range for each value in the vector is only 2 0 and 1. Therefore it is 2^N. Also you can do the brute math and it becomes aparent that we have the ability to have up to 5 vectors or none at all. Through calculating all possible permutations subtracting all equivalant sets (i.e. v1 and v2 and v2-v1) we come to 32. This is exactly the span we were looking for.

In pure abstraction we can extrapolate that we have up to 2^N possible with N abilities. Now we are limited though because War3 integer support probably will not handle values that are equal to or larger than 2^31 well. And you probably shouldn't really need such a dumbly large range of values.

DBmod functions on a simmilar principle but combines it all into one ability.