Algorithm to define min-Max ranges with some defined bound












1












$begingroup$


Having to populate the following table of MIN-MAX cells, starting with only the knowledge of the IC value



enter image description here



I was thinking about a formula to get the values of A, B, C, D, E, F, G
which works also for the values of IC and 2xIC



I'm able to get the values from 0 to IC using the following formula:



$$K = 3$$
$$LEVEL.MIN = frac{IC}{K} times (LEVEL-1)$$
$$LEVEL.MAX = frac{IC}{K} times (LEVEL)$$



I need another similar formula for the values of E, F, G, 2xIC.
Maybe, since $E=IC$, the formula should have $+IC$ as a fxed part.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
    $endgroup$
    – Matti P.
    Jan 30 at 10:41












  • $begingroup$
    Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
    $endgroup$
    – 1Z10
    Jan 30 at 10:44












  • $begingroup$
    Are there some conditions for the values of A, B, C, D, E, F, G .... ?
    $endgroup$
    – Matti P.
    Jan 30 at 10:45










  • $begingroup$
    Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
    $endgroup$
    – 1Z10
    Jan 30 at 10:49


















1












$begingroup$


Having to populate the following table of MIN-MAX cells, starting with only the knowledge of the IC value



enter image description here



I was thinking about a formula to get the values of A, B, C, D, E, F, G
which works also for the values of IC and 2xIC



I'm able to get the values from 0 to IC using the following formula:



$$K = 3$$
$$LEVEL.MIN = frac{IC}{K} times (LEVEL-1)$$
$$LEVEL.MAX = frac{IC}{K} times (LEVEL)$$



I need another similar formula for the values of E, F, G, 2xIC.
Maybe, since $E=IC$, the formula should have $+IC$ as a fxed part.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
    $endgroup$
    – Matti P.
    Jan 30 at 10:41












  • $begingroup$
    Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
    $endgroup$
    – 1Z10
    Jan 30 at 10:44












  • $begingroup$
    Are there some conditions for the values of A, B, C, D, E, F, G .... ?
    $endgroup$
    – Matti P.
    Jan 30 at 10:45










  • $begingroup$
    Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
    $endgroup$
    – 1Z10
    Jan 30 at 10:49
















1












1








1





$begingroup$


Having to populate the following table of MIN-MAX cells, starting with only the knowledge of the IC value



enter image description here



I was thinking about a formula to get the values of A, B, C, D, E, F, G
which works also for the values of IC and 2xIC



I'm able to get the values from 0 to IC using the following formula:



$$K = 3$$
$$LEVEL.MIN = frac{IC}{K} times (LEVEL-1)$$
$$LEVEL.MAX = frac{IC}{K} times (LEVEL)$$



I need another similar formula for the values of E, F, G, 2xIC.
Maybe, since $E=IC$, the formula should have $+IC$ as a fxed part.










share|cite|improve this question











$endgroup$




Having to populate the following table of MIN-MAX cells, starting with only the knowledge of the IC value



enter image description here



I was thinking about a formula to get the values of A, B, C, D, E, F, G
which works also for the values of IC and 2xIC



I'm able to get the values from 0 to IC using the following formula:



$$K = 3$$
$$LEVEL.MIN = frac{IC}{K} times (LEVEL-1)$$
$$LEVEL.MAX = frac{IC}{K} times (LEVEL)$$



I need another similar formula for the values of E, F, G, 2xIC.
Maybe, since $E=IC$, the formula should have $+IC$ as a fxed part.







algorithms






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 30 at 11:30







1Z10

















asked Jan 30 at 10:38









1Z101Z10

1105




1105












  • $begingroup$
    What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
    $endgroup$
    – Matti P.
    Jan 30 at 10:41












  • $begingroup$
    Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
    $endgroup$
    – 1Z10
    Jan 30 at 10:44












  • $begingroup$
    Are there some conditions for the values of A, B, C, D, E, F, G .... ?
    $endgroup$
    – Matti P.
    Jan 30 at 10:45










  • $begingroup$
    Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
    $endgroup$
    – 1Z10
    Jan 30 at 10:49




















  • $begingroup$
    What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
    $endgroup$
    – Matti P.
    Jan 30 at 10:41












  • $begingroup$
    Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
    $endgroup$
    – 1Z10
    Jan 30 at 10:44












  • $begingroup$
    Are there some conditions for the values of A, B, C, D, E, F, G .... ?
    $endgroup$
    – Matti P.
    Jan 30 at 10:45










  • $begingroup$
    Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
    $endgroup$
    – 1Z10
    Jan 30 at 10:49


















$begingroup$
What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
$endgroup$
– Matti P.
Jan 30 at 10:41






$begingroup$
What do the different levels mean? What is IC? So I understand that "MIN" is the minimum value of some set, and "MAX" is the maximum value of some set, but what are these sets? Could you give more context to your problem? And how did you obtain the formulae that you wrote?
$endgroup$
– Matti P.
Jan 30 at 10:41














$begingroup$
Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
$endgroup$
– 1Z10
Jan 30 at 10:44






$begingroup$
Each level is a rang of economic values, and I have the IC value as input. They are needed to know in which level to put an item based on its value.
$endgroup$
– 1Z10
Jan 30 at 10:44














$begingroup$
Are there some conditions for the values of A, B, C, D, E, F, G .... ?
$endgroup$
– Matti P.
Jan 30 at 10:45




$begingroup$
Are there some conditions for the values of A, B, C, D, E, F, G .... ?
$endgroup$
– Matti P.
Jan 30 at 10:45












$begingroup$
Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
$endgroup$
– 1Z10
Jan 30 at 10:49






$begingroup$
Each level from 1 to 3 needs to have the same width = max - min Each level from 4 to 5 needs to have the same width = max - min and Level[N].min = Level[N-1].max
$endgroup$
– 1Z10
Jan 30 at 10:49












2 Answers
2






active

oldest

votes


















1












$begingroup$

Let's look at the conditions that you gave. You say that the MIN of level $n$ should be equal to the MAX of level $n-1$. Using this condition, we should rename the variables like so:




  • Level 1: MIN = 0, MAX = A

  • Level 2: MIN = A, MAX = D

  • Level 3: MIN = D, MAX = E= IC

  • Level 4: MIN = E, MAX = G

  • Level 5: MIN = G, MAX = 2IC = 2E


The next condition is that each level from 1 to 3 needs to have the same difference between MAX and MIN. In other words,
$$
A = D-A = IC-D
$$

From this condition we see that $D = 2A$ and of course $$A=IC-D qquad Rightarrow qquad D = 2IC - 2D qquad Rightarrow qquad 3D=2IC$$
The next condition is that levels 4 and 5 need to have the same difference between MAX and MIN. In other words,
$$
G-E = 2E - G
$$

Adding $E+G$ to boths sides, this is the same as $2G = 3E$. Now we can plug in these results to get the new level hierarchy:




  • Level 1: MIN = $0$, MAX = $A$

  • Level 2: MIN = $A$, MAX = $2A$

  • Level 3: MIN = $2A$, MAX = $IC$

  • Level 4: MIN = $IC$, MAX = $frac{3}{2} IC$

  • Level 5: MIN = $frac{3}{2} IC$, MAX = $2IC$


With these conditions, the hierarchy is left with two free variables, IC and A. But otherwise, the hierarchy now follows the conditions that you gave.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
    $endgroup$
    – 1Z10
    Jan 30 at 11:25





















0












$begingroup$

Ok, I finally got it.



enter image description here



The values from E to 2xIC can be calculated using the following formula:
$$W=2$$
$$LEVEL.MIN = frac{LEVEL-1-1}{W} times IC$$
$$LEVEL.MAX = frac{LEVEL-1}{W} times IC$$






share|cite|improve this answer









$endgroup$














    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3093362%2falgorithm-to-define-min-max-ranges-with-some-defined-bound%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    Let's look at the conditions that you gave. You say that the MIN of level $n$ should be equal to the MAX of level $n-1$. Using this condition, we should rename the variables like so:




    • Level 1: MIN = 0, MAX = A

    • Level 2: MIN = A, MAX = D

    • Level 3: MIN = D, MAX = E= IC

    • Level 4: MIN = E, MAX = G

    • Level 5: MIN = G, MAX = 2IC = 2E


    The next condition is that each level from 1 to 3 needs to have the same difference between MAX and MIN. In other words,
    $$
    A = D-A = IC-D
    $$

    From this condition we see that $D = 2A$ and of course $$A=IC-D qquad Rightarrow qquad D = 2IC - 2D qquad Rightarrow qquad 3D=2IC$$
    The next condition is that levels 4 and 5 need to have the same difference between MAX and MIN. In other words,
    $$
    G-E = 2E - G
    $$

    Adding $E+G$ to boths sides, this is the same as $2G = 3E$. Now we can plug in these results to get the new level hierarchy:




    • Level 1: MIN = $0$, MAX = $A$

    • Level 2: MIN = $A$, MAX = $2A$

    • Level 3: MIN = $2A$, MAX = $IC$

    • Level 4: MIN = $IC$, MAX = $frac{3}{2} IC$

    • Level 5: MIN = $frac{3}{2} IC$, MAX = $2IC$


    With these conditions, the hierarchy is left with two free variables, IC and A. But otherwise, the hierarchy now follows the conditions that you gave.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
      $endgroup$
      – 1Z10
      Jan 30 at 11:25


















    1












    $begingroup$

    Let's look at the conditions that you gave. You say that the MIN of level $n$ should be equal to the MAX of level $n-1$. Using this condition, we should rename the variables like so:




    • Level 1: MIN = 0, MAX = A

    • Level 2: MIN = A, MAX = D

    • Level 3: MIN = D, MAX = E= IC

    • Level 4: MIN = E, MAX = G

    • Level 5: MIN = G, MAX = 2IC = 2E


    The next condition is that each level from 1 to 3 needs to have the same difference between MAX and MIN. In other words,
    $$
    A = D-A = IC-D
    $$

    From this condition we see that $D = 2A$ and of course $$A=IC-D qquad Rightarrow qquad D = 2IC - 2D qquad Rightarrow qquad 3D=2IC$$
    The next condition is that levels 4 and 5 need to have the same difference between MAX and MIN. In other words,
    $$
    G-E = 2E - G
    $$

    Adding $E+G$ to boths sides, this is the same as $2G = 3E$. Now we can plug in these results to get the new level hierarchy:




    • Level 1: MIN = $0$, MAX = $A$

    • Level 2: MIN = $A$, MAX = $2A$

    • Level 3: MIN = $2A$, MAX = $IC$

    • Level 4: MIN = $IC$, MAX = $frac{3}{2} IC$

    • Level 5: MIN = $frac{3}{2} IC$, MAX = $2IC$


    With these conditions, the hierarchy is left with two free variables, IC and A. But otherwise, the hierarchy now follows the conditions that you gave.






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
      $endgroup$
      – 1Z10
      Jan 30 at 11:25
















    1












    1








    1





    $begingroup$

    Let's look at the conditions that you gave. You say that the MIN of level $n$ should be equal to the MAX of level $n-1$. Using this condition, we should rename the variables like so:




    • Level 1: MIN = 0, MAX = A

    • Level 2: MIN = A, MAX = D

    • Level 3: MIN = D, MAX = E= IC

    • Level 4: MIN = E, MAX = G

    • Level 5: MIN = G, MAX = 2IC = 2E


    The next condition is that each level from 1 to 3 needs to have the same difference between MAX and MIN. In other words,
    $$
    A = D-A = IC-D
    $$

    From this condition we see that $D = 2A$ and of course $$A=IC-D qquad Rightarrow qquad D = 2IC - 2D qquad Rightarrow qquad 3D=2IC$$
    The next condition is that levels 4 and 5 need to have the same difference between MAX and MIN. In other words,
    $$
    G-E = 2E - G
    $$

    Adding $E+G$ to boths sides, this is the same as $2G = 3E$. Now we can plug in these results to get the new level hierarchy:




    • Level 1: MIN = $0$, MAX = $A$

    • Level 2: MIN = $A$, MAX = $2A$

    • Level 3: MIN = $2A$, MAX = $IC$

    • Level 4: MIN = $IC$, MAX = $frac{3}{2} IC$

    • Level 5: MIN = $frac{3}{2} IC$, MAX = $2IC$


    With these conditions, the hierarchy is left with two free variables, IC and A. But otherwise, the hierarchy now follows the conditions that you gave.






    share|cite|improve this answer









    $endgroup$



    Let's look at the conditions that you gave. You say that the MIN of level $n$ should be equal to the MAX of level $n-1$. Using this condition, we should rename the variables like so:




    • Level 1: MIN = 0, MAX = A

    • Level 2: MIN = A, MAX = D

    • Level 3: MIN = D, MAX = E= IC

    • Level 4: MIN = E, MAX = G

    • Level 5: MIN = G, MAX = 2IC = 2E


    The next condition is that each level from 1 to 3 needs to have the same difference between MAX and MIN. In other words,
    $$
    A = D-A = IC-D
    $$

    From this condition we see that $D = 2A$ and of course $$A=IC-D qquad Rightarrow qquad D = 2IC - 2D qquad Rightarrow qquad 3D=2IC$$
    The next condition is that levels 4 and 5 need to have the same difference between MAX and MIN. In other words,
    $$
    G-E = 2E - G
    $$

    Adding $E+G$ to boths sides, this is the same as $2G = 3E$. Now we can plug in these results to get the new level hierarchy:




    • Level 1: MIN = $0$, MAX = $A$

    • Level 2: MIN = $A$, MAX = $2A$

    • Level 3: MIN = $2A$, MAX = $IC$

    • Level 4: MIN = $IC$, MAX = $frac{3}{2} IC$

    • Level 5: MIN = $frac{3}{2} IC$, MAX = $2IC$


    With these conditions, the hierarchy is left with two free variables, IC and A. But otherwise, the hierarchy now follows the conditions that you gave.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Jan 30 at 11:09









    Matti P.Matti P.

    2,2811514




    2,2811514












    • $begingroup$
      $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
      $endgroup$
      – 1Z10
      Jan 30 at 11:25




















    • $begingroup$
      $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
      $endgroup$
      – 1Z10
      Jan 30 at 11:25


















    $begingroup$
    $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
    $endgroup$
    – 1Z10
    Jan 30 at 11:25






    $begingroup$
    $$A=frac{IC}{K}=frac{IC}{3}$$ I think I found the equivalent formula for the other values.
    $endgroup$
    – 1Z10
    Jan 30 at 11:25













    0












    $begingroup$

    Ok, I finally got it.



    enter image description here



    The values from E to 2xIC can be calculated using the following formula:
    $$W=2$$
    $$LEVEL.MIN = frac{LEVEL-1-1}{W} times IC$$
    $$LEVEL.MAX = frac{LEVEL-1}{W} times IC$$






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Ok, I finally got it.



      enter image description here



      The values from E to 2xIC can be calculated using the following formula:
      $$W=2$$
      $$LEVEL.MIN = frac{LEVEL-1-1}{W} times IC$$
      $$LEVEL.MAX = frac{LEVEL-1}{W} times IC$$






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Ok, I finally got it.



        enter image description here



        The values from E to 2xIC can be calculated using the following formula:
        $$W=2$$
        $$LEVEL.MIN = frac{LEVEL-1-1}{W} times IC$$
        $$LEVEL.MAX = frac{LEVEL-1}{W} times IC$$






        share|cite|improve this answer









        $endgroup$



        Ok, I finally got it.



        enter image description here



        The values from E to 2xIC can be calculated using the following formula:
        $$W=2$$
        $$LEVEL.MIN = frac{LEVEL-1-1}{W} times IC$$
        $$LEVEL.MAX = frac{LEVEL-1}{W} times IC$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 30 at 11:22









        1Z101Z10

        1105




        1105






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3093362%2falgorithm-to-define-min-max-ranges-with-some-defined-bound%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            SQL update select statement

            WPF add header to Image with URL pettitions [duplicate]