aabs08's blog

By aabs08, 11 years ago, In English

Link to Problem In this question we need to find the smallest possible number of resistors he needs to make an element using 1 ohm resistor The any solution which got accepted gives 6 as answer for test case a=6 b=5 (R=6/5) while this can be done using 5 resistors : 3 1 ohm resistor in series which is in parallel with 2 1 ohm resistor in series. So,I think the solution is wrong. Can someone justify the solution against this testcase?

  • Vote: I like it
  • +4
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it +7 Vote: I do not like it

You can't do that for this problem. It's considering these as elements 1. one resistor; 2. an element and one resistor plugged in sequence; 3. an element and one resistor plugged in parallel.

  • »
    »
    11 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Can you ellaborate on that plzz i am unable to get it .

    • »
      »
      »
      11 years ago, # ^ |
      Rev. 2   Vote: I like it +8 Vote: I do not like it

      For this problem, only way you can construct a circuit is to add one resistor in parellel or series to the circuit. You're not allowed to combine two circuits with more than one resisters.

»
11 years ago, # |
  Vote: I like it +3 Vote: I do not like it

The problem says "An element and one resistor plugged in sequence". It means there must be a basic resistor. It is impossible to plug two elements in sequence.

»
11 years ago, # |
  Vote: I like it -7 Vote: I do not like it

I'm fairly certain you're correct; there is, at least, a degree of ambiguity regarding the rules for building elements. (I asked a question to this effect during the contest.)

Although I think it was possible to guess the problemsetter's intention, since it has nice mathematical properties.

@ping/dwelling: how did you conclude that? The statement says that "an element and one resistor plugged in sequence" is an element. Hence, "an element and one resistor plugged in parallel" can mean "an 'element and one resistor plugged in sequence' and one resistor plugged in parallel", and so on. There's nothing to say you can't build elements like that.