Write a program or function that takes input: all resistors available and a resistance value and outputs a truthy value of whether or not it is possible to get the resistance by using those resistors.
Any format for input will do.
There will be at least 1 available resistor and your program should output for at least 10 available resistors.
Resistance of all available resistors and the required resistance will be positive integers.
For available resistors if a fractional value is also possible, the required resistance may be the approximated value.(See example)
Output should be any 2 unique values for Possible and Not possible.
The resistors may be connected in any manner.
Series Resistance: For n resistances in series: Result=R1+R2+R3+....Rn
Parallel Resistance: For n resistances in parallel: Result=1/(1/R1+1/R2+1/R3+....+1/Rn)
The circuit may not require all the resistors to get the required resistance (output True if that is the case).
This is code-golf so shortest-code wins.
R List 110 220,220 -> True 440 220,220 -> True 550 400,300 -> False 3000 1000,3000 -> True 750 1000,3000 -> True 333 1000,1000,1000 -> True (1000||1000||1000=333.333) 667 1000,1000,1000 -> True ((1000+1000)||1000=666.6666) 8000 1000,1000,7000 -> True 190 100,200,333,344,221 -> True 193 105,200,333,344,221 -> True 400 200,100 -> False
Explanation for the last two examples: https://physics.stackexchange.com/questions/22252/resistor-circuit-that-isnt-parallel-or-series