Looking for a function that will divide profit / loss equally between two business partners

This is not homework because I am not a student. This is for my general curiosity. I apologize if I invent the wheel here. The function I'm looking for can be defined as follows (language agnostic):

int getPercentageOfA(double moneyA, double workA, double moneyB, double workB)
{
    // Perhaps you may assume that workA == 0
    // Compute result
    return result;
}

Suppose Alice and Bob want to work together ... for example ... sell used books. Alice is only interested in investing money in her and nothing more. Bob could invest some money, but he would not have the funds available for investment. However, he will make every effort to find a seller, buyer and service.

There are no tools, education, health insurance costs or other expenses. Both Alice and Bob want to share the profit “equally” (different weight, for example, 40/60 for advanced users). Both are entrepreneurs, so they deal with low profitability / wages and high incomes. There is no fixed wage, minimum wage, fixed ROI or minimum ROI. They are trying to find the best deal possible, take the risks and take it.

Now let's stick to the 50/50 model. If Alice invests $ 100, Bob invests in work, and they make a profit (or loss) of $ 60, they will share it equally - both will receive $ 30 for their efforts / investments, or Bob will end up for $ 30 with Alice.

: , 100, , 60 . , 15 , 30 , , 30 50/50.

, A B 35/65 . : , $70, $30 + . : (70,30) = (30,30) + (40,0)... , . ( ) : , 70 30 , ?

:

  • A B $50/50.
  • A 100% , B 100% - 50/50.
  • A - 100 A/0 B ( ).
  • A 50% , B 50% , - 25 A 75 B ( ).

, workA = 0%, workB = 100% , getPercentageOfA : height z x y. , ? ?

, workA 0% , 85/15 - , ?

+5
3

, , . , , 100% 100% .

int getPercentageOfA(double moneyA, double workA, double moneyB, double workB)
{
    // Perhaps you may assume that workA == 0

    aWorkPercentage = getPercentageOfAForWork(double workA, double workB);
    aMoneyPercentage = getPercentageOfMoney(double moneyA, double moneyB);

    weightMoney = 1;
    weightWork = 1;

    result = ( weightWork*aWorkPercentage + weightMoney*aMoneyPercentage) / 2

    return result;
}

, . , A B , , "" .

+2

, . . , , - . - . .

+2

- . , 50 .

So to say that Alice invests $ 300, and Bob invests $ 100. But Alice is not working. Bob spends 8 hours of his time, valued at $ 50 per hour.

Bob effectively invested $ 100 + 8 * 50 = $ 500, and Alice invested $ 300. The total investment is $ 800. Thus, Bob’s income is 5/8 profits, and Alice earns 3/8 profits.

0
source

All Articles