how to make N numbers EQUAL by adding only 1,2 and 5

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

#Logic #Math

Note by Akash Goyal
8 years ago

No vote yet
1 vote

  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:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \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

Akash Goyal - 8 years ago

Log in to reply

0,1,2,30,1,2,3.

The best solution uses 2 additions:

  • Add 1 to 0,20,2, giving 1,1,3,31,1,3,3
  • Add 2 to 1,11,1, giving 3,3,3,33,3,3,3

Your algorithm requires 4 additions:

  • Add 1 to 0,2,30,2,3, giving 1,1,3,41,1,3,4
  • Add 2 to 1,1,41,1,4, giving 3,3,3,63,3,3,6
  • Add 2 to 3,3,33,3,3, giving 5,5,5,65,5,5,6
  • Add 1 to 5,5,55,5,5, giving 6,6,6,66,6,6,6

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+20 = 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).

Ivan Koswara - 7 years, 11 months ago
×

Problem Loading...

Note Loading...

Set Loading...