How to make N numbers equal by addin only 1, 2 or 5? You can choose as many of N numbers and add 1, 2 or 5? Result is the minimum number of addition operation?
Example:; 2, 2, 3, 7 are numbers......... then adding 1 to all exept third will give 3, 3, 3, 8........ now add 5 to all exept last give 8 8 8 8......... so for this min number is 2
Pls suggest a solution strategy, which we can apply to any set of numbers
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
I think i got it......
1). find 1st minimum & 2nd minimum
2). calculate difference. between 1st & 2nd min
3).add the difference to all elements, except the 2nd minimum.
Repeat this till all elements become equal.
Example: 2,2,3,7
2nd min-1st min = 2-1 = 1
so, 3,3,3,8
2nd min-1st min = 8-3 = 5
so, 8,8,8,8
total steps=2
If the difference is not 1,2,5, then it sud be arranged in form of addition of 1,2,5.
example: 10=5+5, 9=5+2+2
Log in to reply
0,1,2,3.
The best solution uses 2 additions:
Your algorithm requires 4 additions:
I believe this is a fairly difficult problem. My best strategy at the moment is somewhere like this:
Determine the differences between each number and the maximum. Express the differences in as few terms as possible, and clear them up as efficiently as possible. This means applying as many 5s as possible to clear the maximum difference, then applying at most two 2s and one 1 for the remainders (0=0,1=1,2=2,3=2+1,4=2+2; in all cases, only two 2s and one 1 are required).
I claim the above is at most 2 away from the best solution. I'm thinking of a better solution (or otherwise a rigorous proof that the above strategy is actually the best solution).