I need some help with the following problem:
Given a set of resistances, need to construct circuit with given resistance (i.e. we choose some resistors and construct circuit). Only parallel and sequential connection are allowed. So, the formal definition of such circuit is the following:
Circuit = Resistance | (Sequential (Circuit) (Circuit a)) |
(Parallel (Circuit) (Circuit))
The total number of circuits with N unlabeled resistors (where all resistors are used) is A000084 (Thanks Axel Kemper). But in my case resistors are labeled and I don't know how to check all circuits efficiently.
Number of resistors is about 15, is it possible to solve this problem?
UPD. Resistors may have different resistance. And of course, some resistances can't be achieved, in such case we just say that there is no solutions.
Integer sequence A000084 lists the Number of series-parallel networks with n unlabeled edges. Also called yoke-chains by Cayley and MacMahon. MacMahon's paper is online.
The first 15 elements of the sequence: 1, 2, 4, 10, 24, 66, 180, 522, 1532, 4624, 14136, 43930, 137908, 437502, 1399068
If the resistors have different resistance values, they are not "unlabeled".
The number of different overall-resistances is less than the number of networks.
Looking at the numbers, brute-force enumeration is probably feasible for moderate values of n.
It is not possible to match every conceivable total resistance exactly. As mentioned in a comment: The number of 15 resistors might be too small to reach the required value. Other example: If all 15 restors have 1 ohm each, the total resistance cannot be smaller than 1/15 ohm.
Look on page 70 of Analytic Combinatorics to find an illustration of the equivalence between a tree, a bracketed expression and a series-parallel graph:
Like mentioned in one of the comments, a search procedure like A* could be used to search the space of possible trees. The tree representation of the series-parallel network is also useful to determine the source-to-sink resistance with a simple recursive function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With