Solving $abequiv d pmod c $ knowing $b, c text and d.$

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












Do you know if it's possible to solve the equation :



$$abequiv d pmod c $$



knowing $b, c text and d?$



It's been a while I'm looking for answer but I can't find nothing.



Could you help me?



Thanks a lot!







share|cite|improve this question





















  • Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
    – Bernard
    Jul 22 at 20:21










  • This has nothing whatsoever to do with differential equations.
    – saulspatz
    Jul 22 at 20:23










  • And of course the answer is only determined mod $c$.
    – Robert Israel
    Jul 22 at 20:23










  • A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
    – rwbogl
    Jul 22 at 20:35










  • $bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
    – Piquito
    Jul 22 at 21:01














up vote
-1
down vote

favorite












Do you know if it's possible to solve the equation :



$$abequiv d pmod c $$



knowing $b, c text and d?$



It's been a while I'm looking for answer but I can't find nothing.



Could you help me?



Thanks a lot!







share|cite|improve this question





















  • Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
    – Bernard
    Jul 22 at 20:21










  • This has nothing whatsoever to do with differential equations.
    – saulspatz
    Jul 22 at 20:23










  • And of course the answer is only determined mod $c$.
    – Robert Israel
    Jul 22 at 20:23










  • A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
    – rwbogl
    Jul 22 at 20:35










  • $bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
    – Piquito
    Jul 22 at 21:01












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











Do you know if it's possible to solve the equation :



$$abequiv d pmod c $$



knowing $b, c text and d?$



It's been a while I'm looking for answer but I can't find nothing.



Could you help me?



Thanks a lot!







share|cite|improve this question













Do you know if it's possible to solve the equation :



$$abequiv d pmod c $$



knowing $b, c text and d?$



It's been a while I'm looking for answer but I can't find nothing.



Could you help me?



Thanks a lot!









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 23 at 11:28









Shaun

7,33892972




7,33892972









asked Jul 22 at 20:17









nicoooogna

11




11











  • Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
    – Bernard
    Jul 22 at 20:21










  • This has nothing whatsoever to do with differential equations.
    – saulspatz
    Jul 22 at 20:23










  • And of course the answer is only determined mod $c$.
    – Robert Israel
    Jul 22 at 20:23










  • A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
    – rwbogl
    Jul 22 at 20:35










  • $bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
    – Piquito
    Jul 22 at 21:01
















  • Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
    – Bernard
    Jul 22 at 20:21










  • This has nothing whatsoever to do with differential equations.
    – saulspatz
    Jul 22 at 20:23










  • And of course the answer is only determined mod $c$.
    – Robert Israel
    Jul 22 at 20:23










  • A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
    – rwbogl
    Jul 22 at 20:35










  • $bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
    – Piquito
    Jul 22 at 21:01















Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
– Bernard
Jul 22 at 20:21




Welcome to Maths SX! It is possible if $b$ is a unit mod. $c$, i.e. if $b$ and $c$ are coprime. In other cases there are conditions to check on, $c$ and $d$.
– Bernard
Jul 22 at 20:21












This has nothing whatsoever to do with differential equations.
– saulspatz
Jul 22 at 20:23




This has nothing whatsoever to do with differential equations.
– saulspatz
Jul 22 at 20:23












And of course the answer is only determined mod $c$.
– Robert Israel
Jul 22 at 20:23




And of course the answer is only determined mod $c$.
– Robert Israel
Jul 22 at 20:23












A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
– rwbogl
Jul 22 at 20:35




A silly, but correct thing to do: If you know $b$, $c$, and $d$, then there are only $c$ values of $a$ to try. Plug these into a computer and see when $(ab - d) bmod c = 0$. This isn't an exact form, of course, but it works.
– rwbogl
Jul 22 at 20:35












$bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
– Piquito
Jul 22 at 21:01




$bxequiv d pmod ciff bx-d=yc$ linear equation of two unknowns which infinitely many solutions in general except when .......
– Piquito
Jul 22 at 21:01










3 Answers
3






active

oldest

votes

















up vote
0
down vote



accepted










It is possible if and only if $gcd(b,c)$ divides $d$ (we have to use Bézout's identity to prove this). In particular it's always possible if $gcd(b,c)=1$.



Indeed, let $delta=gcd(b,c)$. We have a Bézout's relation $; ub+vc=delta$ for some $u,vinbf Z$.



Now we want a relation $; ab+kc=d$ for some $kinbf Z$. Setting $;b_1=dfrac bδ$, $;c_1=dfrac cδ$, $b_1$ and $c_1$ are coprime since $ub_1+vc_1=1$, and the equation can be rewritten as
$$ab+kc=(ab_1+kc_1)δ=d,$$
so $δ$ divides d. Conversely, if $δ$ divides $d$: $d_1= dfrac dδ̓$, and we solve
$;ab_1+kc_1=d_1$, we also have, multiplying both sides by $δ$, $;ab+kc=d$.



The the only problem is how to solve the congruence when $b$ and $c$ are coprime. But that is easy thanks to Bézout; the extended Euclidean algorithm produces the coefficients of a Bézout's relation between $b$ and $c$: $;ub+vc=1$, so $u$ is the inverse of $bbmod c$, and
$$baequiv dmod ciff ubaequiv udmod ciff aequiv udmod c.$$



̓̓̓̓






share|cite|improve this answer




























    up vote
    0
    down vote













    Citing Modular multiplicative inverse:




    As with the analogous operation on the real numbers, a fundamental use
    of this operation is in solving, when possible, linear congruences of
    the form,



    $a x equiv b pmod m $ .







    share|cite|improve this answer




























      up vote
      0
      down vote













      We need $gcd (b,c)mid d$. See the following .






      share|cite|improve this answer





















        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',
        convertImagesToLinks: true,
        noModals: false,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        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%2f2859737%2fsolving-ab-equiv-d-pmod-c-knowing-b-c-text-and-d%23new-answer', 'question_page');

        );

        Post as a guest






























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        0
        down vote



        accepted










        It is possible if and only if $gcd(b,c)$ divides $d$ (we have to use Bézout's identity to prove this). In particular it's always possible if $gcd(b,c)=1$.



        Indeed, let $delta=gcd(b,c)$. We have a Bézout's relation $; ub+vc=delta$ for some $u,vinbf Z$.



        Now we want a relation $; ab+kc=d$ for some $kinbf Z$. Setting $;b_1=dfrac bδ$, $;c_1=dfrac cδ$, $b_1$ and $c_1$ are coprime since $ub_1+vc_1=1$, and the equation can be rewritten as
        $$ab+kc=(ab_1+kc_1)δ=d,$$
        so $δ$ divides d. Conversely, if $δ$ divides $d$: $d_1= dfrac dδ̓$, and we solve
        $;ab_1+kc_1=d_1$, we also have, multiplying both sides by $δ$, $;ab+kc=d$.



        The the only problem is how to solve the congruence when $b$ and $c$ are coprime. But that is easy thanks to Bézout; the extended Euclidean algorithm produces the coefficients of a Bézout's relation between $b$ and $c$: $;ub+vc=1$, so $u$ is the inverse of $bbmod c$, and
        $$baequiv dmod ciff ubaequiv udmod ciff aequiv udmod c.$$



        ̓̓̓̓






        share|cite|improve this answer

























          up vote
          0
          down vote



          accepted










          It is possible if and only if $gcd(b,c)$ divides $d$ (we have to use Bézout's identity to prove this). In particular it's always possible if $gcd(b,c)=1$.



          Indeed, let $delta=gcd(b,c)$. We have a Bézout's relation $; ub+vc=delta$ for some $u,vinbf Z$.



          Now we want a relation $; ab+kc=d$ for some $kinbf Z$. Setting $;b_1=dfrac bδ$, $;c_1=dfrac cδ$, $b_1$ and $c_1$ are coprime since $ub_1+vc_1=1$, and the equation can be rewritten as
          $$ab+kc=(ab_1+kc_1)δ=d,$$
          so $δ$ divides d. Conversely, if $δ$ divides $d$: $d_1= dfrac dδ̓$, and we solve
          $;ab_1+kc_1=d_1$, we also have, multiplying both sides by $δ$, $;ab+kc=d$.



          The the only problem is how to solve the congruence when $b$ and $c$ are coprime. But that is easy thanks to Bézout; the extended Euclidean algorithm produces the coefficients of a Bézout's relation between $b$ and $c$: $;ub+vc=1$, so $u$ is the inverse of $bbmod c$, and
          $$baequiv dmod ciff ubaequiv udmod ciff aequiv udmod c.$$



          ̓̓̓̓






          share|cite|improve this answer























            up vote
            0
            down vote



            accepted







            up vote
            0
            down vote



            accepted






            It is possible if and only if $gcd(b,c)$ divides $d$ (we have to use Bézout's identity to prove this). In particular it's always possible if $gcd(b,c)=1$.



            Indeed, let $delta=gcd(b,c)$. We have a Bézout's relation $; ub+vc=delta$ for some $u,vinbf Z$.



            Now we want a relation $; ab+kc=d$ for some $kinbf Z$. Setting $;b_1=dfrac bδ$, $;c_1=dfrac cδ$, $b_1$ and $c_1$ are coprime since $ub_1+vc_1=1$, and the equation can be rewritten as
            $$ab+kc=(ab_1+kc_1)δ=d,$$
            so $δ$ divides d. Conversely, if $δ$ divides $d$: $d_1= dfrac dδ̓$, and we solve
            $;ab_1+kc_1=d_1$, we also have, multiplying both sides by $δ$, $;ab+kc=d$.



            The the only problem is how to solve the congruence when $b$ and $c$ are coprime. But that is easy thanks to Bézout; the extended Euclidean algorithm produces the coefficients of a Bézout's relation between $b$ and $c$: $;ub+vc=1$, so $u$ is the inverse of $bbmod c$, and
            $$baequiv dmod ciff ubaequiv udmod ciff aequiv udmod c.$$



            ̓̓̓̓






            share|cite|improve this answer













            It is possible if and only if $gcd(b,c)$ divides $d$ (we have to use Bézout's identity to prove this). In particular it's always possible if $gcd(b,c)=1$.



            Indeed, let $delta=gcd(b,c)$. We have a Bézout's relation $; ub+vc=delta$ for some $u,vinbf Z$.



            Now we want a relation $; ab+kc=d$ for some $kinbf Z$. Setting $;b_1=dfrac bδ$, $;c_1=dfrac cδ$, $b_1$ and $c_1$ are coprime since $ub_1+vc_1=1$, and the equation can be rewritten as
            $$ab+kc=(ab_1+kc_1)δ=d,$$
            so $δ$ divides d. Conversely, if $δ$ divides $d$: $d_1= dfrac dδ̓$, and we solve
            $;ab_1+kc_1=d_1$, we also have, multiplying both sides by $δ$, $;ab+kc=d$.



            The the only problem is how to solve the congruence when $b$ and $c$ are coprime. But that is easy thanks to Bézout; the extended Euclidean algorithm produces the coefficients of a Bézout's relation between $b$ and $c$: $;ub+vc=1$, so $u$ is the inverse of $bbmod c$, and
            $$baequiv dmod ciff ubaequiv udmod ciff aequiv udmod c.$$



            ̓̓̓̓







            share|cite|improve this answer













            share|cite|improve this answer



            share|cite|improve this answer











            answered Jul 22 at 20:46









            Bernard

            110k635103




            110k635103




















                up vote
                0
                down vote













                Citing Modular multiplicative inverse:




                As with the analogous operation on the real numbers, a fundamental use
                of this operation is in solving, when possible, linear congruences of
                the form,



                $a x equiv b pmod m $ .







                share|cite|improve this answer

























                  up vote
                  0
                  down vote













                  Citing Modular multiplicative inverse:




                  As with the analogous operation on the real numbers, a fundamental use
                  of this operation is in solving, when possible, linear congruences of
                  the form,



                  $a x equiv b pmod m $ .







                  share|cite|improve this answer























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    Citing Modular multiplicative inverse:




                    As with the analogous operation on the real numbers, a fundamental use
                    of this operation is in solving, when possible, linear congruences of
                    the form,



                    $a x equiv b pmod m $ .







                    share|cite|improve this answer













                    Citing Modular multiplicative inverse:




                    As with the analogous operation on the real numbers, a fundamental use
                    of this operation is in solving, when possible, linear congruences of
                    the form,



                    $a x equiv b pmod m $ .








                    share|cite|improve this answer













                    share|cite|improve this answer



                    share|cite|improve this answer











                    answered Jul 22 at 20:26









                    mvw

                    30.3k22250




                    30.3k22250




















                        up vote
                        0
                        down vote













                        We need $gcd (b,c)mid d$. See the following .






                        share|cite|improve this answer

























                          up vote
                          0
                          down vote













                          We need $gcd (b,c)mid d$. See the following .






                          share|cite|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            We need $gcd (b,c)mid d$. See the following .






                            share|cite|improve this answer













                            We need $gcd (b,c)mid d$. See the following .







                            share|cite|improve this answer













                            share|cite|improve this answer



                            share|cite|improve this answer











                            answered Jul 22 at 20:46









                            Chris Custer

                            5,4082622




                            5,4082622






















                                 

                                draft saved


                                draft discarded


























                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2859737%2fsolving-ab-equiv-d-pmod-c-knowing-b-c-text-and-d%23new-answer', 'question_page');

                                );

                                Post as a guest













































































                                Comments

                                Popular posts from this blog

                                What is the equation of a 3D cone with generalised tilt?

                                Color the edges and diagonals of a regular polygon

                                Relationship between determinant of matrix and determinant of adjoint?