Linear equations with modulus
$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$.
linear-algebra
$endgroup$
add a comment |
$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$.
linear-algebra
$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
add a comment |
$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$.
linear-algebra
$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
linear-algebra
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
$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})$.
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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})$.
$endgroup$
add a comment |
$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})$.
$endgroup$
add a comment |
$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})$.
$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})$.
answered Dec 28 '18 at 3:27
moutheticsmouthetics
50937
50937
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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