TITLE: How many resistors are needed?
QUESTION [44 upvotes]: I was told about the following problem. Suppose you have infinite number of resistors with only value 1$\Omega$. Question is 

What minimal number of 1$\Omega$-resistors is needed to construct given fraction resistance $R$, i.e. $R\in \mathbb{Q}_+$.

Note that you can connect two resistors ($R_1$ and $R_2$) in two ways: parallel and series. The resulting resistance ($R_p$ and $R_s$ respectively) in those cases are:
$$R_s = R_1 + R_2$$
$$R_p = R_1 \oplus R_2 = \frac{1}{\frac{1}{R_1}+\frac{1}{R_2}},$$
where we introduced $\oplus$-operation in order to simplify notes. NOTE: only schemes which are able to be written in the form:
$$(... 1 + (1\oplus 1) ... )$$
are allowed. For example, this is not allowed:

If you know how to formulate this rule better, please, say.

For example, you can use the Euclidean algorithm. 
$$\frac56 = \frac{1}{\frac65}=\frac{1}{1+\frac15} = 1 \oplus 5,$$
so you needed 6 resistors because
$$5 = \sum_{k=1}^{5}1$$
But it was not the minimum number of resistors because, for example,
$$\frac56 = \frac12 + \frac13 = (1\oplus 1)+(1\oplus 1\oplus 1),$$
where it is enough to use only 5 resistors.

I think that Euclidean algorithm often solves the problem. More over, it is needed to consider only one "half of $\mathbb{Q}_+$", for the other half it is enough to replace +'s by $\oplus$'s and vice-versa.

The one who told me about this problem adhered to the following notations.
$$[1,1]\quad \text{for}\quad 1\oplus 1.$$
$$(1,1)\quad \text{for}\quad 1 + 1,$$
so our previous example looks like
$$[1,(1,1,1,1,1)]\quad \text{and}\quad ([1,1,1],[1,1]).$$

REPLY [6 votes]: Since the other day I've played with resistors, and made a program similar to Martin's to enumerate all possibilities that ensure the minimum number of resistors.
You can download the result file there $\to$ All rationnals for $n\le 12$
Also from this list, I've drawn a picture of the rationnals that share the same $n$. It is quite impressive the see how the bubble expands, but the border of this bubble seems to have an asymptotic behaviour already.
As you can see it is hollow, because many rationnals are not reached for such a low $n$, eventually all the white is to be filled with a superior rank color.


For a better rendering you can download directly the XPM file.