How to calculate the sum of the multiples of two fractions in order?












0












$begingroup$


$frac{a}{b_1}, frac{a}{b_2} = frac{1}{3}, frac{1}{5}$



$x_1 in {0, ..., b_1-1} = {0, 1, 2}$



$x_2 in {0, ..., b_2-1} = {0, 1, 2, 3, 4}$



$$frac{a_1}{b}, frac{a_2}{b} = frac{a_1b_2}{b_1b_2}, frac{a_2b_1}{b_1b_2} = frac{5}{15}, frac{3}{15}$$



$$frac{p}{q} = frac{a_1x_1}{b} + frac{a_2x_2}{b}$$



I've been struggling for a couple of days to find an equation that can calculate $frac{p}{q}$ in order from smallest to largest. Any help will be appreciated thank you.



The sums in order:



$$frac{5cdot0 + 3cdot0}{15} = frac{0}{15}, frac{5cdot0 + 3cdot1}{15} = frac{3}{15}, frac{5cdot1 + 3cdot0}{15} = frac{5}{15}, frac{5cdot0 + 3cdot2}{15} = frac{6}{15}$$



$$frac{5cdot1 + 3cdot1}{15} = frac{8}{15}, frac{5cdot0 + 3cdot3}{15} = frac{9}{15}, frac{5cdot2 + 3cdot0}{15} = frac{10}{15}, frac{5cdot1 + 3cdot2}{15} = frac{11}{15}$$



$$frac{5cdot0 + 3cdot4}{15} = frac{12}{15}, frac{5cdot2 + 3cdot1}{15} = frac{13}{15}, frac{5cdot1 + 3cdot3}{15} = frac{14}{15}, frac{5cdot2 + 3cdot2}{15} = frac{16}{15}$$



$$frac{5cdot1 + 3cdot4}{15} = frac{17}{15}, frac{5cdot2 + 3cdot3}{15} = frac{19}{15}, frac{5cdot2 + 3cdot4}{15} = frac{22}{15}$$










share|cite|improve this question











$endgroup$












  • $begingroup$
    Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:08










  • $begingroup$
    @RossMillikan Because I'm not writing s computer program
    $endgroup$
    – user553185
    Dec 1 '18 at 15:09










  • $begingroup$
    Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:38












  • $begingroup$
    @RossMillikan The goal is primarily to find an equation that can do it.
    $endgroup$
    – user553185
    Dec 1 '18 at 15:40






  • 1




    $begingroup$
    Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
    $endgroup$
    – Fareed AF
    Dec 3 '18 at 11:23


















0












$begingroup$


$frac{a}{b_1}, frac{a}{b_2} = frac{1}{3}, frac{1}{5}$



$x_1 in {0, ..., b_1-1} = {0, 1, 2}$



$x_2 in {0, ..., b_2-1} = {0, 1, 2, 3, 4}$



$$frac{a_1}{b}, frac{a_2}{b} = frac{a_1b_2}{b_1b_2}, frac{a_2b_1}{b_1b_2} = frac{5}{15}, frac{3}{15}$$



$$frac{p}{q} = frac{a_1x_1}{b} + frac{a_2x_2}{b}$$



I've been struggling for a couple of days to find an equation that can calculate $frac{p}{q}$ in order from smallest to largest. Any help will be appreciated thank you.



The sums in order:



$$frac{5cdot0 + 3cdot0}{15} = frac{0}{15}, frac{5cdot0 + 3cdot1}{15} = frac{3}{15}, frac{5cdot1 + 3cdot0}{15} = frac{5}{15}, frac{5cdot0 + 3cdot2}{15} = frac{6}{15}$$



$$frac{5cdot1 + 3cdot1}{15} = frac{8}{15}, frac{5cdot0 + 3cdot3}{15} = frac{9}{15}, frac{5cdot2 + 3cdot0}{15} = frac{10}{15}, frac{5cdot1 + 3cdot2}{15} = frac{11}{15}$$



$$frac{5cdot0 + 3cdot4}{15} = frac{12}{15}, frac{5cdot2 + 3cdot1}{15} = frac{13}{15}, frac{5cdot1 + 3cdot3}{15} = frac{14}{15}, frac{5cdot2 + 3cdot2}{15} = frac{16}{15}$$



$$frac{5cdot1 + 3cdot4}{15} = frac{17}{15}, frac{5cdot2 + 3cdot3}{15} = frac{19}{15}, frac{5cdot2 + 3cdot4}{15} = frac{22}{15}$$










share|cite|improve this question











$endgroup$












  • $begingroup$
    Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:08










  • $begingroup$
    @RossMillikan Because I'm not writing s computer program
    $endgroup$
    – user553185
    Dec 1 '18 at 15:09










  • $begingroup$
    Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:38












  • $begingroup$
    @RossMillikan The goal is primarily to find an equation that can do it.
    $endgroup$
    – user553185
    Dec 1 '18 at 15:40






  • 1




    $begingroup$
    Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
    $endgroup$
    – Fareed AF
    Dec 3 '18 at 11:23
















0












0








0


1



$begingroup$


$frac{a}{b_1}, frac{a}{b_2} = frac{1}{3}, frac{1}{5}$



$x_1 in {0, ..., b_1-1} = {0, 1, 2}$



$x_2 in {0, ..., b_2-1} = {0, 1, 2, 3, 4}$



$$frac{a_1}{b}, frac{a_2}{b} = frac{a_1b_2}{b_1b_2}, frac{a_2b_1}{b_1b_2} = frac{5}{15}, frac{3}{15}$$



$$frac{p}{q} = frac{a_1x_1}{b} + frac{a_2x_2}{b}$$



I've been struggling for a couple of days to find an equation that can calculate $frac{p}{q}$ in order from smallest to largest. Any help will be appreciated thank you.



The sums in order:



$$frac{5cdot0 + 3cdot0}{15} = frac{0}{15}, frac{5cdot0 + 3cdot1}{15} = frac{3}{15}, frac{5cdot1 + 3cdot0}{15} = frac{5}{15}, frac{5cdot0 + 3cdot2}{15} = frac{6}{15}$$



$$frac{5cdot1 + 3cdot1}{15} = frac{8}{15}, frac{5cdot0 + 3cdot3}{15} = frac{9}{15}, frac{5cdot2 + 3cdot0}{15} = frac{10}{15}, frac{5cdot1 + 3cdot2}{15} = frac{11}{15}$$



$$frac{5cdot0 + 3cdot4}{15} = frac{12}{15}, frac{5cdot2 + 3cdot1}{15} = frac{13}{15}, frac{5cdot1 + 3cdot3}{15} = frac{14}{15}, frac{5cdot2 + 3cdot2}{15} = frac{16}{15}$$



$$frac{5cdot1 + 3cdot4}{15} = frac{17}{15}, frac{5cdot2 + 3cdot3}{15} = frac{19}{15}, frac{5cdot2 + 3cdot4}{15} = frac{22}{15}$$










share|cite|improve this question











$endgroup$




$frac{a}{b_1}, frac{a}{b_2} = frac{1}{3}, frac{1}{5}$



$x_1 in {0, ..., b_1-1} = {0, 1, 2}$



$x_2 in {0, ..., b_2-1} = {0, 1, 2, 3, 4}$



$$frac{a_1}{b}, frac{a_2}{b} = frac{a_1b_2}{b_1b_2}, frac{a_2b_1}{b_1b_2} = frac{5}{15}, frac{3}{15}$$



$$frac{p}{q} = frac{a_1x_1}{b} + frac{a_2x_2}{b}$$



I've been struggling for a couple of days to find an equation that can calculate $frac{p}{q}$ in order from smallest to largest. Any help will be appreciated thank you.



The sums in order:



$$frac{5cdot0 + 3cdot0}{15} = frac{0}{15}, frac{5cdot0 + 3cdot1}{15} = frac{3}{15}, frac{5cdot1 + 3cdot0}{15} = frac{5}{15}, frac{5cdot0 + 3cdot2}{15} = frac{6}{15}$$



$$frac{5cdot1 + 3cdot1}{15} = frac{8}{15}, frac{5cdot0 + 3cdot3}{15} = frac{9}{15}, frac{5cdot2 + 3cdot0}{15} = frac{10}{15}, frac{5cdot1 + 3cdot2}{15} = frac{11}{15}$$



$$frac{5cdot0 + 3cdot4}{15} = frac{12}{15}, frac{5cdot2 + 3cdot1}{15} = frac{13}{15}, frac{5cdot1 + 3cdot3}{15} = frac{14}{15}, frac{5cdot2 + 3cdot2}{15} = frac{16}{15}$$



$$frac{5cdot1 + 3cdot4}{15} = frac{17}{15}, frac{5cdot2 + 3cdot3}{15} = frac{19}{15}, frac{5cdot2 + 3cdot4}{15} = frac{22}{15}$$







combinatorics fractions






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 8 '18 at 22:57









Byte Commander

196211




196211










asked Dec 1 '18 at 14:34









user553185user553185

155




155












  • $begingroup$
    Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:08










  • $begingroup$
    @RossMillikan Because I'm not writing s computer program
    $endgroup$
    – user553185
    Dec 1 '18 at 15:09










  • $begingroup$
    Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:38












  • $begingroup$
    @RossMillikan The goal is primarily to find an equation that can do it.
    $endgroup$
    – user553185
    Dec 1 '18 at 15:40






  • 1




    $begingroup$
    Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
    $endgroup$
    – Fareed AF
    Dec 3 '18 at 11:23




















  • $begingroup$
    Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:08










  • $begingroup$
    @RossMillikan Because I'm not writing s computer program
    $endgroup$
    – user553185
    Dec 1 '18 at 15:09










  • $begingroup$
    Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
    $endgroup$
    – Ross Millikan
    Dec 1 '18 at 15:38












  • $begingroup$
    @RossMillikan The goal is primarily to find an equation that can do it.
    $endgroup$
    – user553185
    Dec 1 '18 at 15:40






  • 1




    $begingroup$
    Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
    $endgroup$
    – Fareed AF
    Dec 3 '18 at 11:23


















$begingroup$
Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
$endgroup$
– Ross Millikan
Dec 1 '18 at 15:08




$begingroup$
Why don't you want to compute them all and then sort them? You can organize the computation us use the fact that subgroups are presorted.
$endgroup$
– Ross Millikan
Dec 1 '18 at 15:08












$begingroup$
@RossMillikan Because I'm not writing s computer program
$endgroup$
– user553185
Dec 1 '18 at 15:09




$begingroup$
@RossMillikan Because I'm not writing s computer program
$endgroup$
– user553185
Dec 1 '18 at 15:09












$begingroup$
Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
$endgroup$
– Ross Millikan
Dec 1 '18 at 15:38






$begingroup$
Then you can just make a list for each $x_1$ going over the values of $x_2$, so you get $(0,3,6,9,12), (5,8,11,14,17), (10,13,16,19,22)$ and pick the smallest value off the front of one, getting $(0,3,5,6,8,9,10,11,12,13,14,16,17,19,22)$ Your denominators are constant, so you just need to compute the numerators.
$endgroup$
– Ross Millikan
Dec 1 '18 at 15:38














$begingroup$
@RossMillikan The goal is primarily to find an equation that can do it.
$endgroup$
– user553185
Dec 1 '18 at 15:40




$begingroup$
@RossMillikan The goal is primarily to find an equation that can do it.
$endgroup$
– user553185
Dec 1 '18 at 15:40




1




1




$begingroup$
Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
$endgroup$
– Fareed AF
Dec 3 '18 at 11:23






$begingroup$
Do you want the denominator to be the least common multiple of 3 and 5? Or is it just there product?
$endgroup$
– Fareed AF
Dec 3 '18 at 11:23












1 Answer
1






active

oldest

votes


















1












$begingroup$

Hint:
This isn't an answer it is just a way you can think about it, and I am not sure that it will take you somewhere or not, but name the set $A={0, ..., b_1-1}$
and $B= {0, ..., b_2-1}$



And try taking the sequence $$x_{n,k}=frac{b_1.n+b_2.k}{lcm(b_1,b_2)}$$
Where $n in A$ and $k in B$



Then after that take the $displaystyle min_{n in A,kin B}(x_{n,k})=x_{n_0,k_0}$ and you'll get the first elemnt you want call it $c_1$ (which is $frac{0}{15}$ in your case)



Then exclude this element from the sequence (by excluding $n_0$ from $A$ and $k_0$ from $B$) and take the minimum again and so on...






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%2f3021417%2fhow-to-calculate-the-sum-of-the-multiples-of-two-fractions-in-order%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    Hint:
    This isn't an answer it is just a way you can think about it, and I am not sure that it will take you somewhere or not, but name the set $A={0, ..., b_1-1}$
    and $B= {0, ..., b_2-1}$



    And try taking the sequence $$x_{n,k}=frac{b_1.n+b_2.k}{lcm(b_1,b_2)}$$
    Where $n in A$ and $k in B$



    Then after that take the $displaystyle min_{n in A,kin B}(x_{n,k})=x_{n_0,k_0}$ and you'll get the first elemnt you want call it $c_1$ (which is $frac{0}{15}$ in your case)



    Then exclude this element from the sequence (by excluding $n_0$ from $A$ and $k_0$ from $B$) and take the minimum again and so on...






    share|cite|improve this answer











    $endgroup$


















      1












      $begingroup$

      Hint:
      This isn't an answer it is just a way you can think about it, and I am not sure that it will take you somewhere or not, but name the set $A={0, ..., b_1-1}$
      and $B= {0, ..., b_2-1}$



      And try taking the sequence $$x_{n,k}=frac{b_1.n+b_2.k}{lcm(b_1,b_2)}$$
      Where $n in A$ and $k in B$



      Then after that take the $displaystyle min_{n in A,kin B}(x_{n,k})=x_{n_0,k_0}$ and you'll get the first elemnt you want call it $c_1$ (which is $frac{0}{15}$ in your case)



      Then exclude this element from the sequence (by excluding $n_0$ from $A$ and $k_0$ from $B$) and take the minimum again and so on...






      share|cite|improve this answer











      $endgroup$
















        1












        1








        1





        $begingroup$

        Hint:
        This isn't an answer it is just a way you can think about it, and I am not sure that it will take you somewhere or not, but name the set $A={0, ..., b_1-1}$
        and $B= {0, ..., b_2-1}$



        And try taking the sequence $$x_{n,k}=frac{b_1.n+b_2.k}{lcm(b_1,b_2)}$$
        Where $n in A$ and $k in B$



        Then after that take the $displaystyle min_{n in A,kin B}(x_{n,k})=x_{n_0,k_0}$ and you'll get the first elemnt you want call it $c_1$ (which is $frac{0}{15}$ in your case)



        Then exclude this element from the sequence (by excluding $n_0$ from $A$ and $k_0$ from $B$) and take the minimum again and so on...






        share|cite|improve this answer











        $endgroup$



        Hint:
        This isn't an answer it is just a way you can think about it, and I am not sure that it will take you somewhere or not, but name the set $A={0, ..., b_1-1}$
        and $B= {0, ..., b_2-1}$



        And try taking the sequence $$x_{n,k}=frac{b_1.n+b_2.k}{lcm(b_1,b_2)}$$
        Where $n in A$ and $k in B$



        Then after that take the $displaystyle min_{n in A,kin B}(x_{n,k})=x_{n_0,k_0}$ and you'll get the first elemnt you want call it $c_1$ (which is $frac{0}{15}$ in your case)



        Then exclude this element from the sequence (by excluding $n_0$ from $A$ and $k_0$ from $B$) and take the minimum again and so on...







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 3 '18 at 12:31

























        answered Dec 3 '18 at 11:45









        Fareed AFFareed AF

        52612




        52612






























            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%2f3021417%2fhow-to-calculate-the-sum-of-the-multiples-of-two-fractions-in-order%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

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?