Maximize the sum modulo m. [closed] Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How do I solve this problem on maximizing sum modulo a given number?Lagrange's Theorem on sum of four squares.How to maximize sum of pairwise multiplication of array elements taken one from each array?Is it known whether any positive integer can be written as the sum of $n$ different squares?Estimating the sum of reciprocals of products of two primesDetermine all ways the integer $2015$ can be written as a sum of consecutive positive integers.On the sum of digits of $f(n)$Symmetric sum of $n$-th residues modulo $p$Find subset of size $k$ such that it maximizes the metric distance of the elements.Efficient calculation of sum over divisor sum (mod p)Maximize multivariable integer function
What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?
Can I throw a sword that doesn't have the Thrown property at someone?
Mortgage adviser recommends a longer term than necessary combined with overpayments
Using "nakedly" instead of "with nothing on"
How is simplicity better than precision and clarity in prose?
Can smartphones with the same camera sensor have different image quality?
Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?
New Order #5: where Fibonacci and Beatty meet at Wythoff
How should I respond to a player wanting to catch a sword between their hands?
What is the electric potential inside a point charge?
Classification of bundles, Postnikov towers, obstruction theory, local coefficients
Why does tar appear to skip file contents when output file is /dev/null?
Stars Make Stars
What is the largest species of polychaete?
How are presidential pardons supposed to be used?
Active filter with series inductor and resistor - do these exist?
Do working physicists consider Newtonian mechanics to be "falsified"?
Was credit for the black hole image misattributed?
Why is there no army of Iron-Mans in the MCU?
Passing functions in C++
Unable to start mainnet node docker container
Can the prologue be the backstory of your main character?
How to retrograde a note sequence in Finale?
Estimated State payment too big --> money back; + 2018 Tax Reform
Maximize the sum modulo m. [closed]
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How do I solve this problem on maximizing sum modulo a given number?Lagrange's Theorem on sum of four squares.How to maximize sum of pairwise multiplication of array elements taken one from each array?Is it known whether any positive integer can be written as the sum of $n$ different squares?Estimating the sum of reciprocals of products of two primesDetermine all ways the integer $2015$ can be written as a sum of consecutive positive integers.On the sum of digits of $f(n)$Symmetric sum of $n$-th residues modulo $p$Find subset of size $k$ such that it maximizes the metric distance of the elements.Efficient calculation of sum over divisor sum (mod p)Maximize multivariable integer function
$begingroup$
I have few known quantities a1, a2, ..., an and m. (All positive)
I want to maximize the sum the S = (a1*x1 + a2*x2 + ... + an*xn) % m where xi >= 0.
number-theory
$endgroup$
closed as off-topic by Arnaud D., YiFan, Javi, Leucippus, max_zorn Apr 8 at 21:50
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Arnaud D., YiFan, Javi, Leucippus, max_zorn
add a comment |
$begingroup$
I have few known quantities a1, a2, ..., an and m. (All positive)
I want to maximize the sum the S = (a1*x1 + a2*x2 + ... + an*xn) % m where xi >= 0.
number-theory
$endgroup$
closed as off-topic by Arnaud D., YiFan, Javi, Leucippus, max_zorn Apr 8 at 21:50
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Arnaud D., YiFan, Javi, Leucippus, max_zorn
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28
add a comment |
$begingroup$
I have few known quantities a1, a2, ..., an and m. (All positive)
I want to maximize the sum the S = (a1*x1 + a2*x2 + ... + an*xn) % m where xi >= 0.
number-theory
$endgroup$
I have few known quantities a1, a2, ..., an and m. (All positive)
I want to maximize the sum the S = (a1*x1 + a2*x2 + ... + an*xn) % m where xi >= 0.
number-theory
number-theory
edited Apr 8 at 19:39
Saurabh Jain
asked Apr 8 at 19:22
Saurabh JainSaurabh Jain
114
114
closed as off-topic by Arnaud D., YiFan, Javi, Leucippus, max_zorn Apr 8 at 21:50
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Arnaud D., YiFan, Javi, Leucippus, max_zorn
closed as off-topic by Arnaud D., YiFan, Javi, Leucippus, max_zorn Apr 8 at 21:50
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Arnaud D., YiFan, Javi, Leucippus, max_zorn
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28
add a comment |
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
@DietrichBurde m-1 is the maximum modulo m. How will the answer be m-1? Can you explain?
$endgroup$
– Saurabh Jain
Apr 8 at 19:29
$begingroup$
@DietrichBurde Actually, the maximum value "modulo $m$" would be $m$ minus the gcd of all the $a_i$ and $m$. This is shown & explained in the answer to a basic duplicate of this question at How do I solve this problem on maximizing sum modulo a given number?.
$endgroup$
– John Omielan
Apr 8 at 22:28