Linear equations with modulus












0












$begingroup$


For a given prime $P$ and given coefficients $a$, $b$, $c$, $d$, $V$, $W$, I need to determine $x$ and $y$ from this system:



$ax mod P + by mod P = V$



$cx mod P + dy mod P = W$



Note that the values $V$ and $W$ can be larger than $P$.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
    $endgroup$
    – mouthetics
    Dec 28 '18 at 2:40










  • $begingroup$
    there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
    $endgroup$
    – Will Jagy
    Dec 28 '18 at 2:40










  • $begingroup$
    @mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
    $endgroup$
    – John Doe
    Dec 28 '18 at 2:41






  • 1




    $begingroup$
    Does $ Pnmid ad-bc? $
    $endgroup$
    – Bill Dubuque
    Dec 28 '18 at 2:47
















0












$begingroup$


For a given prime $P$ and given coefficients $a$, $b$, $c$, $d$, $V$, $W$, I need to determine $x$ and $y$ from this system:



$ax mod P + by mod P = V$



$cx mod P + dy mod P = W$



Note that the values $V$ and $W$ can be larger than $P$.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
    $endgroup$
    – mouthetics
    Dec 28 '18 at 2:40










  • $begingroup$
    there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
    $endgroup$
    – Will Jagy
    Dec 28 '18 at 2:40










  • $begingroup$
    @mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
    $endgroup$
    – John Doe
    Dec 28 '18 at 2:41






  • 1




    $begingroup$
    Does $ Pnmid ad-bc? $
    $endgroup$
    – Bill Dubuque
    Dec 28 '18 at 2:47














0












0








0





$begingroup$


For a given prime $P$ and given coefficients $a$, $b$, $c$, $d$, $V$, $W$, I need to determine $x$ and $y$ from this system:



$ax mod P + by mod P = V$



$cx mod P + dy mod P = W$



Note that the values $V$ and $W$ can be larger than $P$.










share|cite|improve this question











$endgroup$




For a given prime $P$ and given coefficients $a$, $b$, $c$, $d$, $V$, $W$, I need to determine $x$ and $y$ from this system:



$ax mod P + by mod P = V$



$cx mod P + dy mod P = W$



Note that the values $V$ and $W$ can be larger than $P$.







linear-algebra






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 28 '18 at 10:19







Lucian Boca

















asked Dec 28 '18 at 2:32









Lucian BocaLucian Boca

1085




1085








  • 1




    $begingroup$
    Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
    $endgroup$
    – mouthetics
    Dec 28 '18 at 2:40










  • $begingroup$
    there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
    $endgroup$
    – Will Jagy
    Dec 28 '18 at 2:40










  • $begingroup$
    @mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
    $endgroup$
    – John Doe
    Dec 28 '18 at 2:41






  • 1




    $begingroup$
    Does $ Pnmid ad-bc? $
    $endgroup$
    – Bill Dubuque
    Dec 28 '18 at 2:47














  • 1




    $begingroup$
    Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
    $endgroup$
    – mouthetics
    Dec 28 '18 at 2:40










  • $begingroup$
    there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
    $endgroup$
    – Will Jagy
    Dec 28 '18 at 2:40










  • $begingroup$
    @mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
    $endgroup$
    – John Doe
    Dec 28 '18 at 2:41






  • 1




    $begingroup$
    Does $ Pnmid ad-bc? $
    $endgroup$
    – Bill Dubuque
    Dec 28 '18 at 2:47








1




1




$begingroup$
Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
$endgroup$
– mouthetics
Dec 28 '18 at 2:40




$begingroup$
Do you mean $ax+ by equiv V (mathrm{mod} P)$ ?
$endgroup$
– mouthetics
Dec 28 '18 at 2:40












$begingroup$
there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
$endgroup$
– Will Jagy
Dec 28 '18 at 2:40




$begingroup$
there is an underlying skill: if I give you a number $n$ that is not divisible by $p,$ do you know how to find a number $t$ so that $tn equiv 1 pmod p ; ? ; ; $
$endgroup$
– Will Jagy
Dec 28 '18 at 2:40












$begingroup$
@mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
$endgroup$
– John Doe
Dec 28 '18 at 2:41




$begingroup$
@mouthetics i believe that is what is meant, but also with the constraint that $V,W$ can be greater than $P$ (although this wouldn't change the answer).
$endgroup$
– John Doe
Dec 28 '18 at 2:41




1




1




$begingroup$
Does $ Pnmid ad-bc? $
$endgroup$
– Bill Dubuque
Dec 28 '18 at 2:47




$begingroup$
Does $ Pnmid ad-bc? $
$endgroup$
– Bill Dubuque
Dec 28 '18 at 2:47










1 Answer
1






active

oldest

votes


















0












$begingroup$

To avoid the trivial cases we assume that $pnmid abcd$.



The determinant of the system is $Delta= ad - bc$.



$$Delta_x = vd-wb text{ and }Delta_y = aw - cv.$$



If $pnmid Delta$ then $$xequiv Delta^{-1}Delta_x , (mathrm{mod } p) text{ and } yequiv Delta^{-1} Delta_y, (mathrm{mod } p)$$



If $pmid Delta$ then for the system to be compatible you must have $$begin{cases}bw-dvequiv 0; (mathrm{mod } p) \ aw -cv equiv 0; (mathrm{mod } p)end{cases}$$
But by assumption this is same as $$ wequiv db^{-1} v ; (mathrm{mod } p)$$
And the system becomes equivalent to one equation $$ ax+byequiv v ;(mathrm{mod } p),$$
Which has as solution the couples $(x,-ab^{-1}x+vb^{-1})$.






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%2f3054526%2flinear-equations-with-modulus%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









    0












    $begingroup$

    To avoid the trivial cases we assume that $pnmid abcd$.



    The determinant of the system is $Delta= ad - bc$.



    $$Delta_x = vd-wb text{ and }Delta_y = aw - cv.$$



    If $pnmid Delta$ then $$xequiv Delta^{-1}Delta_x , (mathrm{mod } p) text{ and } yequiv Delta^{-1} Delta_y, (mathrm{mod } p)$$



    If $pmid Delta$ then for the system to be compatible you must have $$begin{cases}bw-dvequiv 0; (mathrm{mod } p) \ aw -cv equiv 0; (mathrm{mod } p)end{cases}$$
    But by assumption this is same as $$ wequiv db^{-1} v ; (mathrm{mod } p)$$
    And the system becomes equivalent to one equation $$ ax+byequiv v ;(mathrm{mod } p),$$
    Which has as solution the couples $(x,-ab^{-1}x+vb^{-1})$.






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      To avoid the trivial cases we assume that $pnmid abcd$.



      The determinant of the system is $Delta= ad - bc$.



      $$Delta_x = vd-wb text{ and }Delta_y = aw - cv.$$



      If $pnmid Delta$ then $$xequiv Delta^{-1}Delta_x , (mathrm{mod } p) text{ and } yequiv Delta^{-1} Delta_y, (mathrm{mod } p)$$



      If $pmid Delta$ then for the system to be compatible you must have $$begin{cases}bw-dvequiv 0; (mathrm{mod } p) \ aw -cv equiv 0; (mathrm{mod } p)end{cases}$$
      But by assumption this is same as $$ wequiv db^{-1} v ; (mathrm{mod } p)$$
      And the system becomes equivalent to one equation $$ ax+byequiv v ;(mathrm{mod } p),$$
      Which has as solution the couples $(x,-ab^{-1}x+vb^{-1})$.






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        To avoid the trivial cases we assume that $pnmid abcd$.



        The determinant of the system is $Delta= ad - bc$.



        $$Delta_x = vd-wb text{ and }Delta_y = aw - cv.$$



        If $pnmid Delta$ then $$xequiv Delta^{-1}Delta_x , (mathrm{mod } p) text{ and } yequiv Delta^{-1} Delta_y, (mathrm{mod } p)$$



        If $pmid Delta$ then for the system to be compatible you must have $$begin{cases}bw-dvequiv 0; (mathrm{mod } p) \ aw -cv equiv 0; (mathrm{mod } p)end{cases}$$
        But by assumption this is same as $$ wequiv db^{-1} v ; (mathrm{mod } p)$$
        And the system becomes equivalent to one equation $$ ax+byequiv v ;(mathrm{mod } p),$$
        Which has as solution the couples $(x,-ab^{-1}x+vb^{-1})$.






        share|cite|improve this answer









        $endgroup$



        To avoid the trivial cases we assume that $pnmid abcd$.



        The determinant of the system is $Delta= ad - bc$.



        $$Delta_x = vd-wb text{ and }Delta_y = aw - cv.$$



        If $pnmid Delta$ then $$xequiv Delta^{-1}Delta_x , (mathrm{mod } p) text{ and } yequiv Delta^{-1} Delta_y, (mathrm{mod } p)$$



        If $pmid Delta$ then for the system to be compatible you must have $$begin{cases}bw-dvequiv 0; (mathrm{mod } p) \ aw -cv equiv 0; (mathrm{mod } p)end{cases}$$
        But by assumption this is same as $$ wequiv db^{-1} v ; (mathrm{mod } p)$$
        And the system becomes equivalent to one equation $$ ax+byequiv v ;(mathrm{mod } p),$$
        Which has as solution the couples $(x,-ab^{-1}x+vb^{-1})$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 28 '18 at 3:27









        moutheticsmouthetics

        50937




        50937






























            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%2f3054526%2flinear-equations-with-modulus%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

            Index of /

            Tribalistas

            Listed building