# R = PI Ohms

1. Jun 23, 2004

### ceptimus

Tommy has just ten resistors, a 1-ohm, a 2-ohm, a 3-ohm and so on up to a 10-ohm.

He wants to wire them up in a combination that gives a total resistance as near as possible to π ohms, that is to say 3.14159265(etc.) ohms.

He doesn't have to use all the resistors - if he can get nearer to π ohms by only using (say) eight of the resistors, that's fine.

What's the best he can do?

2. Jun 23, 2004

### NateTG

There's a lot of possible arrangements, and they're hard to describe.

For example: getting $$\frac{22}{7}$$ is possible by using:

a 3 ohm and 4 ohm resistor in parrelel to get a $$\frac{12}{7}$$ Ohm resistor
and a 2 ohm and 5 ohm resistor in parralel to get a $$\frac{10}{7}$$ Ohm resistor
and then putting the two in series. That's a pretty good set-up.
$$\frac{22}{7}=3.\bar{1}\bar{4}\bar{2}\bar{8}\bar{5}\bar{7}$$
so the error is less than .002.

That leaves 6 resistors unused.

Last edited: Jun 23, 2004
3. Jun 23, 2004

### AKG

Quick guess, I'm sure you can get closer, but of all the possible combinations with only 2 resistors, putting 5 and 8 in parallel gives:

3.076923077

4. Jun 23, 2004

### NateTG

5 2 Ohm resistors in parralel for a $$\frac{2}{5}$$ Ohm resistor
put it in series with a 10 Ohm resistance for a $$\frac{52}{5}$$ Ohm resistor
Put it in parralel with two 9 ohm resistors.
That makes for a $$\frac{468}{149} \approx 3.14093$$

This is a pretty ugly problem...

5. Jun 24, 2004

### Gokul43201

Staff Emeritus
Any reasonable way to make 355/113 ~3.1415929 ?

6. Jun 24, 2004

### NateTG

Code tags used for fixed spacing.
Numbers represent resistors of the appropriate value.

Code (Text):

|-1-|
|-|   |---------|
| |-2-|         |
-|               |-2--
| |-4-| |-2-|   |
|-|   |-|   |-1-|
|-5-| |-7-|

7. Jun 24, 2004

### ceptimus

You used the two-ohm and one-ohm resistors more than once.

8. Jun 24, 2004

### NateTG

Oh. I thought it was any 10 resistors with values 1-10...

9. Jun 24, 2004

### verty

Somebody should write a quick proggy to brute force it. I will see if I can do that.

10. Jun 24, 2004

### Gokul43201

Staff Emeritus
I doubt you can do better than 22/7 without repeats...

11. Jun 25, 2004

### The Bob

I am assuming that we are using the proper way of calculating electronic resistance otherwise I cannot do this with as much ease.

12. Jun 25, 2004

### The Bob

NateTG. I just want to double check my double checking of your calculations. I believe your resistance would be 3.709302326 etc. Ω. Here are my calculations of your answer:

1Ω and 2Ω in Parellel = 1/1 + 1/2 = 2/2 + 1/2 = 3/2. Take Reciprocal = 2/3
4Ω and 5Ω in Parellel = 1/4 + 1/5 = 5/20 + 4/20 = 9/20. Take Reciprocal = 20/9
2Ω and 7 Ω in Parellel = 1/2 + 1/7 = 7/14 + 2/14 = 9/14. Take Reciprocal 14/9

Then 20/9 + 14/9 + 1 = 20/9 + 14/9 + 9/9 = 43/9

Then the parellel resistance of the two sides (e.g. the 2/3 and the 43/9):
1/(43/9) + 1/(2/3) = 1.709302326 etc.

1.709302326 + 2 = 3.709302326Ω

Hope I am right in you being right.

13. Jun 25, 2004

### The Bob

Out of intrest ceptimus, had NateTG not got it in post 2#?

14. Jun 25, 2004

### NateTG

I knew there was an error.
It should have been more like:

Code (Text):

|-1-|
|-|   |-1-------|
| |-1-|         |
-|               |-2--
| |-4-| |-2-|   |
|-|   |-|   |-1-|
|-5-| |-7-|

Then it would be:
$$\frac{1}{\frac{3}{2}}+\frac{1}{\frac{43}{9}}=\frac{2}{3}+\frac{9}{43}=\frac{43*2+9*3}{43*3}=\frac{113}{129}$$
So the resistance is the reciprocal:
$$\frac{129}{113}$$
Then the total resistance is:
$$\frac{129}{113}+\frac{226}{113}=\frac{355}{113}$$

Unfortunately the condidition was that only one resistor of each value could be used, so the solution wasn't legal.

I can replace one of the 2 Ohm resistors with a 6 and a 3 Ohm resistor in parralel. That leaves the 8, 9 and 10 Ohm resistors, but even putting the lot of them in parralel gives a resistance that's too large

15. Jun 25, 2004

### ceptimus

No. You can do much better. Here are my best efforts so far using 3, 4, and 5 resistors. By using 6, 7, 8, 9 or all 10 of the resistors, you can get much closer to PI.

Code (Text):

3 resistors: 3.158  (error: 1.6 * 10^-2)
-+--7-----8--+-
|           |
+--4--------+

4 resistors: 3.14102  (error: 5.67 * 10^-4)
-+--1--+--3--+-
|     |     |
+--5--+-10--+

5 resistors: 3.141553  (error: 4.01 * 10^-5)
-+--7-----9--+-
|           |
+--1--+--3--+
|     |
+-10--+

Last edited: Jun 25, 2004
16. Jun 25, 2004

### Gokul43201

Staff Emeritus
hummm...nice.

17. Jun 25, 2004

### NateTG

Brute force or Brain Teaser?

Is there an elegant solution, or should I just dust off my C skills?

18. Jun 25, 2004

### ceptimus

It's brute force, so far as I know. But optimizing the program so that you're not looking at years of run time, is a nice Brain Teaser.

19. Jun 26, 2004

### The Bob

Can I ask that we post the resistors like NateTG in post 6# pleaes because I just got confused (at a glance) with what ceptimus put in the last few posts (with the code diagram).

20. Jul 3, 2004

### ceptimus

How are the programs coming along?

Here is a 6-resistor version:
Code (Text):

6 resistors: 3.14159292  (Error: 2.67 * 10^-7)
-+-------10--------+-
|                 |
+--5--+-----+--2--+
|     |     |
+--8--+     |
|           |
+--7-----9--+

With 9 resistors, I've found 105768/33667

I'll keep my 10-resistor solution secret for now.