Users browsing this thread: 1 Guest(s)
[MATH] Method to reduce both sides of an equation?
#1
Let's say I have an equation of the type X=ab+cd and I want to make the value of X considerably smaller while changing ab and cd individually rather than as a whole. Is there any way to do this other than simple multiplication and subtraction?

X is large, but b and d are too small for me to reduce by subtraction and potentially too similar throughout the sets to reduce with simple multiplication. I tried square roots, which kind of worked for me, but there was a problem -- square rooting X required sqrt(ab+cd), but what I had was sqrt(ab)+sqrt(cd), which is a mathematical no-no. So are there any other methods I'm overlooking?

Oh, and to clarify, only b and d are unalterable sets, but a and c are multiplicative modifiers which, if you can maintain the same scalable results, you're more than welcome to modify. I was considering something like yX=wab-zcd where w+z=y or something, I don't know. (edit again) Oh, and ok so a=3/2 and c=1/3
Thanked by:
#2
umm
i think it's best if you just give us the problem and the question.

Is it
X=(3/2)b+(1/3)d

???
[Image: ZRdfkWQ.jpg]
Thanked by:
#3
I could possibly help, but after the first paragraph I was lost. Why do you want to decrease 'X'? Isn't that an unknown number? I don't think I understood...
Thanked by:
#4
I was tired when I posted that.
I think I came up with a workaround, which is fine and all. Even if I explained more clearly, you'd probably still be confused. But yes, it was X=3b/2 - d/3; and I wanted to modify the result of X so that modified 3b/2>1 and modified d/3>1. .... As you can see, it's hard to explain an dmake clearly. B and D are two sets, for example b={2,3,3,5,6,8,13,25,50}, so 3b/2=3 in the first item. If the first item in {d} was 3, then X=2; but I want, for example, X=1 in that case, which would be something like X/2=3b/4 - d/6. While 3b/4>1, d/6<1 in that case and wouldn't work for me. To make it more complicated, let's say b=80 and d=30, then X=110 (120-10); but I want X<50 in that situation, keeping in mind that the change to X, 3b/2, and d/3 in that situation must still be legal for all other sets of b and d as specified earlier. Sick

Yeah it's confusing and I went with an alternative that isn't exactly what I wanted but it's workable at least for the time being. But feel free to keep wrapping your brains around it, because I'd be happy to hear any alternatives. There IS a logic to it, I just can't explain it.
Thanked by:
#5
I'd be more than happy to help you out in this, but I can't seem to understand what you're asking, bro : (

From what I'm understanding, the variables b and d correspond to two different sets, while a and c are both changeable numbers. You have ab + cd = X, and you want to find ways to reduce b and d individually in order to reduce X. The main problem with working in sets is that sets tend to not correspond to equations, but I could easily be missing something here.

If you could post your math problem exactly onto here, I can try and work it out for you~
HAVE I BEEN MISLEAD?? [Image: TeamStory.gif] THE DREAM ISN'T DEAD???

Thanked by:
#6
My work around was to say "screw it to scaling!"

But I'll show you what I was hoping to find some way of doing.

So, basic equation
X=3b/2 - d/3 (just using the same variables without a and c this time)

B Set={24,26,29,32,33,38,42,56,78} (making numbers up but they're close to that)
D Set={13,24,27,39,52,68,70,88,96}

So, let's pick a value from each set. I know my max value will have an ideal limit, so let's take the max of B Set and compare it to the lowest value of the D Set.
B=78
D=13


So in this case...
Xmax=112

However, I want Xmax to be no greater than 50, trying to keep my values as small as reasonably possible (50 seems workable considering the sizes of the actual sets, not the ones listed here).

So X=112 --> Aop --> 50, where Aop is some operation A that X undergoes to yield a result of 50.
Aop(112)=50

[i]EDIT: I deleted everything i wrote after this point. I need sleep. I confused even myself. Let me collect and sort my thoughts and then maybe my samples won't mae it even more confusing. But before then, one little thing to add that might clear some things up:

There is also a 3rd set, we'll call it K. I won't type it out, but K would include all pairings of B Set and D Set (in other words, K Set is huuuuge). What I want is to reduce each value in K Set so that Aop(Kmax)=50 and Aop(Kmin)=1 and Aop(Kmid)/Aop(Kmax)=Kmid/Kmax

I'll leave it there for now.
Thanked by:
#7
Well I can give you an operation that would restrict a set of numbers to your range of 1 to 50, but it's probably not what you're looking for:

X mod 50 + 1

But that doesn't produce any sort of scale. It just gives you a number that's between 1 and 50 based on the remainder of X / 50.
Thanked by:
#8
I'll toy with that tonight (haven't slept yet, shit i'm screwed tonight).
The thing I'm looking for, the whole point of this post really, is how to get Aop(K)=Bop(3b/2)-Cop(d/3) where Bop() and Cop() may be the same operation or different as long as they're the same for every set and still yield Aop(K) so that Aop(Kmid)/Aop(Kmax)=Kmid/Kmax; in other words, what I want isn't the operation to reduce K to the set {1,...,50} but rather to find the operation(s) that I can make to 3b/2 and d/3 individually to yield that result.

Bedtime. 4 hours ain't enough.

Edit: Modulo wouldn't work anyway, I just remembered. 20 mod 50 = 70 mod 50 and if 70 was the largest value, then 20/70 != 70/70 and wouldn't work, I didn't really need to add that last bit of explanation because once I pointed out 20-70 it was all over. I will add though that in my operation I'm striving for, 20 could equal 30, for example, but ideally no more than a differential of 10, ideally 8 or less.
Thanked by:
#9
I tried to write a coherent response, but I have to admit I am completely mystified as to what your goal is. :X Despite your previous warnings could you post as much information about your problem as you can? (I swear, I can handle it!)
Thanked by:
#10
OK fine, no more beating around the bush. So, here's the real deal:

I'll simplify the variables.

a: The set of all weapon ATK power. {2,...,99}
b: The set of all DF defensive values. {4,...,120}
X: The damage dealt calculated by A - B
K: The max HP of the item

After various tests, I came up with the relationship between A, B and X being something along the lines of

X= 3a/2 - b/3

If X=K, in other words if the damage dealt is equal to the max HP, the target is dead in one hit. I want to limit K to 50 (or lower, but for sure no higher than 50), which means I want X to never be greater than 50.

50=3a/2-b/3

Using the set values I listed above, which I made up off the top of my head but are indicative of what I'm working with, the above equation can thus be rendered as

50= 1.5*99 - 120/3

Obviously 50 != 108.5, so some sort of modifying operation Z is required.

Z(X)=Z(3a/2 - b/3)

Easy enough. But here's the other issue: I want the following change as well:

X=A-B; where A=3a/2 and B=b/3 and A>0 and B>0

In other words,
A={1,...,m}
B={1,...,n}
X={1,...,50}
Note that in all 3 sets the minimum does not have to be 1, but must be at least 1.

Furthermore, the function of Z in Z(X)=Z(3a/2 - b/3) needs to further match the following criteria:

Z(X)=Z(3a/2) - Z(b/3)
or
Z(X)=P(3a/2) - Q(b/3); where P and Q are operations distinct from Z that will still yield Z(3a/2 - b/3) = P(3a/2) - Q(b/3)

In other words, A will be the set of all values of a multiplied by 1.5 and ran through the modifying function; while B will be the set of b divided by 3 and ran through the modifying function, so that in the end only two numbers will exist yielding a simple subtraction problem. In other words, I want to take the multiplication out of the original equation x=3a/2-b/3. Values will be rounded, so don't fret over decimal places.
Thanked by:
#11
Wait a second

is this a programming thing?

If it is, you could easily set an "If X > 50, then set X = 50" thing.

If not, then you're looking for a function which has a maximum limit of 50.
THIS LOOKS LIKE A JOB FOR -=-CALCULUS-=-

too bad I forget what functions round off near the end : (
I thought ln would be the right function, but it turns out it keeps expanding as it gets to insanely high values.

I'll continue to look into this, but idk if I'll be able to find something practical :<
HAVE I BEEN MISLEAD?? [Image: TeamStory.gif] THE DREAM ISN'T DEAD???

Thanked by:
#12
If you're thinking of an asymptotic function, it's C-1/x, or C(1-1/x), where C is the upper limit you want.
Thanked by:
#13
i know this will sound p ignorant, but why can't you just do a simple:
atk-defense = hp lost?

idk why you would want atk to be 150% and defence to be 33%. is this for a special situation?
[Image: ZRdfkWQ.jpg]
Thanked by:
#14
(01-23-2011, 06:10 AM)Murderbeard Wrote: i know this will sound p ignorant, but why can't you just do a simple:
atk-defense = hp lost?

idk why you would want atk to be 150% and defence to be 33%. is this for a special situation?

That is what I want, ATK-DF=HP_Lost. The problem is the values I'm working with were not originally set up that way, so I'm trying to convert the formula to that simpler one. However, I would also like it to be a symmetrically scaled adjustment, even if it is bell-shaped. But I can mess with the shape if I ever find a way to simplify the formula. But that's why I don't want to use "If x>50, x=50" because that would yield an "r"-shaped curve. I want an omega-shaped, J-shaped or L-shaped curve, depending on whatever's closest to the original shape. Since the orignal was fairly linear, I think an "S"-shaped curve will be what I end up getting. with the bottom of the S being 1 and the top being 50.
Thanked by:
#15
Just FYI, in computing 20 mod 50 = 20, not 70. Not sure if it's different in mathematics.

PHP Code:
<?php
for($i=0;$i<10;$i++)
{
    
$out = ($i 5) + 1;
    echo 
$i " | " $out "\n";


Yields:
Code:
0 | 1
1 | 2
2 | 3
3 | 4
4 | 5
5 | 1
6 | 2
7 | 3
8 | 4
9 | 5

Still not your solution, but it will produce non-scaled range of numbers.
Thanked by:


Forum Jump: