Resistance across a 1k resistor cube. - Page 1
Forum section: electronics / beginners

author: hamster_nz
author_rank: Super Contributor
timestamp: April 22, 2018, 12:47:06 am
content: While lazing around flicking through the latest Diyode Magazine, I came across this little puzzle.What is the resistance across a cube of 1k resistors? (see image)There is a few nice ways to solve it, when insight comes to you.

author: IanB
author_rank: Super Contributor
timestamp: April 22, 2018, 12:59:04 am
content: I would say 833.3 Ω ?Edit: I could even say 833⅓ Ω now that the forum has been upgraded

author: AlfBaz
author_rank: Super Contributor
timestamp: April 22, 2018, 01:27:33 am
content: Easy, 12 x 1k resistors multiplied the alfbaz 1k cube constant of 0.069444'

author: rs20
author_rank: Super Contributor
timestamp: April 22, 2018, 01:45:03 am
content: 833.33... is correct. hamster_nz, did you deliberately angle the cube in your picture to make one of the insights more obvious, or is that just a coincidence?

author: Brumby
author_rank: Unknown
timestamp: April 22, 2018, 01:47:13 am
content: Quote from: IanB on April 22, 2018, 12:59:04 amSo would I.Quote from: rs20 on April 22, 2018, 01:45:03 amI wouldn't have said it wasthatobvious. After all, you need some angle to show the cubic structure. But now that you've said that, there might be a few more who catch on.

author: JDubU
author_rank: Frequent Contributor
timestamp: April 22, 2018, 01:52:08 am
content: LTspice agrees with 833.33... ohms (1 V voltage source has 1.2 mA current through it).

author: IanB
author_rank: Super Contributor
timestamp: April 22, 2018, 01:57:23 am
content: Quote from: JDubU on April 22, 2018, 01:52:08 amIt's good that LTspice works then. It would be awful if LTspice failed on such a simple circuit...(Since this is a lighthearted thread and I am a stickler for correctness, I should mention some typography rules for units of measure. There should be a space between the number and the unit of measure, and case is important. Which means: "A 1 V source has 1.2 mA of current through it.")

author: JDubU
author_rank: Frequent Contributor
timestamp: April 22, 2018, 02:08:37 am
content: I stand corrected!

author: Unknown
author_rank: Unknown
timestamp: April 22, 2018, 05:45:58 am
content: I get 5/6 * R = 5/6 * 1000 =833.33...There's also a general solution for 12 arbitrary resistances which works out to be something like(r1 || r2 || r3) + (r4 || r5 || r6 || r7 || r8 || r9) + (r10 || r11 || r12)but I don't feel like typing in the derivation.

author: rs20
author_rank: Super Contributor
timestamp: April 22, 2018, 06:57:20 am
content: Quote from: steverino on April 22, 2018, 05:45:58 amFalse. If you set all the resistors lying parallel to the x and y axes (arbitrary choice) to infinity ohms (open circuit), but leave the 4 resistors parallel to the z axis at 1 kiloohm, then:- Your formula gives a result of 2.5 kiloohm,- In reality, the such an arrangement breaks the circuit, so the correct solution is infinity ohms.Therefore, your proposed formula is wrong.Actually figuring out the correct answer for the general case is a much harder problem than the all-resistances-equal case (because all the resistances being equal is necessary to pull certain tricks); I haven't figured it out yet (not having really tried though.)

author: Kirr
author_rank: Regular Contributor
timestamp: April 22, 2018, 07:37:54 am
content: For verifying solutions you can try my online solver:http://kirr.homeunix.org/electronics/resistor-network-solver/It solves the network by eliminating nodes one by one using star-mesh transform, until only terminals are left. (Seeexamples, which include resistor cube).A similar quiz: Find resistance across a 4D cube, then also resistance across an edge (singel resistor) of a 4D cube.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 22, 2018, 07:47:56 am
content: Quote from: Kirr on April 22, 2018, 07:37:54 amI'll have to sketch them out.I would be interested in hearing who solved this by which means, from LTspice, to changing to an equivalent structure that is obvious to solve..My first solution was to split all the resistors in half and bisect the design, half way between the test points. Analysis is then a piece of cake.

author: Unknown
author_rank: Unknown
timestamp: April 22, 2018, 07:56:36 am
content: The solution I gave assumes real values for the resistors - not open circuit. Perhaps arbitrary was the wrong term. Correct in this case, no?

author: rs20
author_rank: Super Contributor
timestamp: April 22, 2018, 08:05:09 am
content: Quote from: steverino on April 22, 2018, 07:56:36 amSo we have two facts:-- Your formula works when all the resistances are completely equal-- Your formula totally fails as some of the resistances approach infinityAnd you're still confidently asserting that it's correct for all arbitrary combinations of finite resistances? That's very very bold! The parallel and series resistance formulae always give sane results even when faced with infinite resistances, and yet it very specially breaks down just for you? Hmm...Anyway, your formula is still definitely wrong. You can take my previous argument, replace "infinity" by "one gigaohm", and the same disagreement between common sense and your formula will result. Your formula allows the current to jump freely between the three nodes one step away from the + terminal, and the three nodes one step away from the - terminal. In a real cube, this isn't allowed. This is why your formula gives absurdly low values when very high value resistors are placed in such a way that they provide a unavoidable barrier to current in a real cube.I've got Maple v11.0 to provide a solution (to the all-twelve-resistors-may-be-different-to-each-other case), and the resulting formula is literally 6 pages long. This doesn't prove much on its own, though (I might have made a mistake in the system of equations I provided, and it's also possible that this 6 page formula could be greatly simplified.)

author: Brumby
author_rank: Unknown
timestamp: April 22, 2018, 08:10:35 am
content: Equipotential shorting method - valid because of symmetry.Yellow lines are connecting equipotential points. Because they are equipotential, joining them will not affect circuit operation.Section A is 3 resistors in parallel = 333.3 ΩSection B is 6 resistors in parallel = 166.7 ΩSection C is 3 resistors in parallel = 333.3 ΩA + B + C in series= 333.3 + 166.7 + 333.3= 833.3 Ω30 seconds of mental arithmetic (but I admit I wrote down the three intermediate values).

author: IanB
author_rank: Super Contributor
timestamp: April 22, 2018, 08:17:46 am
content: Quote from: hamster_nz on April 22, 2018, 07:47:56 amMy solution arose from observing the symmetry of the system. If all resistors have the same value then all parallel interior nodes of the network have the same voltage, which means they can be treated as if they were connected, which allows the network to be viewed as groups of parallel resistors. Following this observation the overall resistance is (1/3 + 1/6 + 1/3) · 1000 = 833⅓

author: Unknown
author_rank: Unknown
timestamp: April 22, 2018, 08:27:59 am
content: Quote from: rs20 on April 22, 2018, 08:05:09 amRelax my friend. I simply reduced parallel and series combinations. If my solution is incorrect, that's ok and I'll double check it in the morning. If it looks ok to me, I'll post a copy of my notes. If I find an error, I'll post that also and some kind soul can point out the error. Now, it's 1:27am and I'm relaxing enjoying a glass of brandy. Cheers!BTW, I just looked at Digikey, and I don't seem to be able to find any infinite resistors!

author: Unknown
author_rank: Unknown
timestamp: April 22, 2018, 08:48:47 am
content: quick request. Can somebody please post the ltspice file for the cube (i know, i'm lazy). I'll use it to check my work. Thanks.

author: rs20
author_rank: Super Contributor
timestamp: April 22, 2018, 09:11:37 am
content: For those curious, I got Maple (a symbolic algebra solver thing) to solve the general case (resistors in the cube arrangement, but each resistor may have different, arbitrary values). I've attached a printout of the worksheet, but the TL;DR is:The formula for the resistance is 3 pages long, and has this form (where capital letters are the various resistances, in an weird arrangement explained in the PDF):total resistance = (A*U*G*F*C*V + K*B*A*E*C*F + ...) / (U*A*B*E*V + K*C*G*V*F + ...)Which is at least dimensionally consistent!In the case where four parallel resistors are equal (resistance = Rz) and the remaining 8 resistors are equal (resistance = Ry), then we find:total resistance = (Ry^2 + 3 * Ry * Rz + Rz ^ 2) / (2 * Ry + 4 * Rz)Notably, taking Ry or Rz to infinity brings the whole expression to infinity, as Ry and Rz both have higher powers in the numerator.Finally, setting all the resistances to 1000 gives an answer of 833.33..., which is reassuringBtw, hamster_nz, the above is not how I initially solved the simpler problem: I initially solved in exactly the way that Brumby described. Unfortunately, that method can't be applied in the case where the resistors have different values, as the underlying symmetry breaks downI'd be fascinated to hear if anyone has a non-maching-requiring method of solving the arbitrary case; I'll be the first to admit that I have no idea how to do it by hand.

author: RoGeorge
author_rank: Super Contributor
timestamp: April 22, 2018, 09:28:58 am
content: OK, then, the cube was easy, try this one:What is the resistance between 2 nodes A and B, in an infinite 2 dimensional square grid of resistors, each resistor having the same value, R?

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: April 22, 2018, 10:28:03 am
content: Quote from: IanB on April 22, 2018, 08:17:46 amThis is a great solution Ian and Brumby !I worked out nearly the same way, considering the symmetries of the system, and thus threedifferent voltages, V, V1, V2, 0 , with by symmetry also I/3 or I/6 current, and got the solution,but although this was easy to solve, I did not use your brilliant shortcut.which is to say that all summit with same voltage can be considered as being connected, whichthen simplifies the solution as one can use the already know rules.This equipotential trick is powerful !

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 22, 2018, 01:22:38 pm
content: Here it is.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 22, 2018, 01:26:31 pm
content: This was my method to solve years ago...still works!A couple of months ago I decided that I wanted to build one of these cubes as a piece of desk art. I toyed with some 3D printer corner designs and such, ordered some 1/2 watt precision resistors...ADD as I am, the project is still incomplete along with the other hundred that are incomplete...lol...but I am always busy!!

author: Brumby
author_rank: Unknown
timestamp: April 22, 2018, 01:57:55 pm
content: A lot of us know that song only too well.

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 22, 2018, 03:41:42 pm
content: Quote from: RoGeorge on April 22, 2018, 09:28:58 amHow about this?Using superpostion, go out to infinity and ground the last (LOL) nodes.Then insert a current of 1 amp somewhere in the center of infinity (LOL²).That current will split into fourths (1/4, 1/4, 1/4, 1/4).Now remove that current source and connected a different current source of 1 amp LEAVING an adjacent node.The current leaving will split into fourths.Now, for a linear system, we can add these result yielding 1/2 amp flowing in the resistor between the adjacent points.1/2 amp flowing through R gives V = R/2That voltage (R/2) resulted from a 1 amp source, so the equivalent resistance is V/I = R/2/1 = R/2Edit:After pondering further, I do not have to ground the array at infinity...just insert the first test current and then the second.

author: drussell
author_rank: Super Contributor
timestamp: April 22, 2018, 04:44:16 pm
content: A cube is bad enough, but how about this one from xkcd #730?https://xkcd.com/730/

author: Unknown
author_rank: Unknown
timestamp: April 22, 2018, 07:39:17 pm
content: Here's an attachment that shows my work (no cheating, class!). Let's see if I can get it imbedded in this message...(Didn't have time to check this beyond a casual look. It's Sunday and I have a SWMBO...)

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: April 22, 2018, 08:02:00 pm
content: This is my solution, which I did before seeing the other answers.As you will see, it it quite different from steverino, perhaps because I dont have an EE background, but it gets the job done.Be warned that is a draft that I took back from the trash can. It was done quite casually and not organised to be shown.But when I saw the various posts, and the previous one, I thought it would be interesting to show the various approaches.

author: rs20
author_rank: Super Contributor
timestamp: April 22, 2018, 10:51:53 pm
content: JacquesBBB, don't worry about Steverino's solution, he's trying to solve the much, much more difficult case where all the resistances are different (rather than all being equal to 1k)!Steverino, the parallel resistance formula allows you take take a group of resistors which connects precisely the same two nodes, and replace them all with a single resistor (which connects the same two nodes as before.) For example, if we had rX going from node A to node B, and another resistor rY going from A to B as well, then we can delete those two resistors and replace it with a resistor of value (rX || rY) going between A to B.The main problem with your solution is that you're applying this formula even though r6, r9 and r12 do not connect precisely the same two nodes. For example, r6 goes from Bto A, but r9 goes from Bto C. Unfortunately, you're simply not allowed to apply the parallel resistance formula in this case.Nowif(and only if) the resistances are all equal, and if you apply the reasoning showed by Brumby, then nodes A, C and b become connected (therefore they become the same node), and only then does the parallel resistance formula become applicable. But because we had to assume all the resistances are equal to pull this trick, you're not allowed to claim that your approach gives a valid formula when all the resistances are arbitrary/different. (And, as demonstrated in my earlier messages, your formula gives clearly wrong results in certain contrived arbitrary cases.)

author: Unknown
author_rank: Unknown
timestamp: April 23, 2018, 01:38:45 am
content: Ah, of course, I see it now. Thanks.

author: Kirr
author_rank: Regular Contributor
timestamp: April 23, 2018, 04:40:20 am
content: Quote from: drussell on April 22, 2018, 04:44:16 pmYep, this always comes up (as well as infinite grid). Since there are no apparent symmetries, I guess the easiest calculation is via tedious elimination of nodes one after another -Automated here- tick "Explain each step" to see the steps in detail. (Feel free to try it manually before checking the answer).I am curious about optimizing this calculation, because simple brute force process doesn't scale too well. Exploiting symmetries is one way. Another is noticing repetitions, and simplifying them before solving the entire structure (Example). Have to find time to do more experiments with this.

author: The Electrician
author_rank: Frequent Contributor
timestamp: April 23, 2018, 09:46:49 am
content: Do a google search with the phrase "resistor cube equivalent resistance"Three good ones are:https://sites.google.com/site/physicsassignmenthelp/video-tutorials/how-to-find-equivalent-resistance-of-resistor-cubehttp://web.physics.ucsb.edu/~lecturedemonstrations/Composer/Pages/64.42.htmlhttp://cosinekitty.com/resistor_cube.html

author: The Electrician
author_rank: Frequent Contributor
timestamp: April 23, 2018, 10:45:26 am
content: For extra credit, using these designators and values for the cube resistors, calculate the exact resistance between nodes A and G, showing the result as an improper fraction.

author: Kirr
author_rank: Regular Contributor
timestamp: April 23, 2018, 11:32:20 am
content: Quote from: The Electrician on April 23, 2018, 10:45:26 amWhen ready, click to verify your answer, or to give up

author: rs20
author_rank: Super Contributor
timestamp: April 23, 2018, 11:38:12 am
content: Quote from: The Electrician on April 23, 2018, 10:45:26 amI already provided the arbitrary resistance closed-form formula back in message#18. Subbing in the values you wrote, the answer is: 6195184/1328873 Ohms.

author: rs20
author_rank: Super Contributor
timestamp: April 23, 2018, 11:46:21 am
content: Quote from: Kirr on April 23, 2018, 11:32:20 amVery nice! If I understand correctly, your solver is public domain, but closed source, right? I'd be curious to try adapting it to give closed-form formulae (i.e., the calls you currently make to GMP, make them to a symbolic algebra library instead, using variables instead of fixed rational numbers.) Would be interesting to see if it landed on the same solution as Maple after expansion.

author: Zero999
author_rank: Super Contributor
timestamp: April 23, 2018, 01:02:19 pm
content: Quote from: IanB on April 22, 2018, 12:59:04 amI prefer to use superscript and subscript for fractions, because I find it easier to read. 8331/3Ω.

author: Kirr
author_rank: Regular Contributor
timestamp: April 23, 2018, 01:20:49 pm
content: Quote from: rs20 on April 23, 2018, 11:46:21 amAlso nice work on the formula!Correct about public domain and closed source. I'll probably clean it up enough for opening some day. However I'm also curious about adding symbolic solution to the solver. My only worry is that it can quickly grow out of control and turn out enormous in the end. Would be interesting to see memory requirement and speed on larger networks. Perhaps we could collaborate on this.I guess the final expanded formula is unique for each network, so should be identical (other than order of terms in each sum).

author: The Electrician
author_rank: Frequent Contributor
timestamp: April 23, 2018, 07:14:58 pm
content: Quote from: rs20 on April 23, 2018, 11:38:12 amIn reply #18 you seemed not absolutely certain that your formula was perfectly correct:"total resistance = (A*U*G*F*C*V + K*B*A*E*C*F + ...) / (U*A*B*E*V + K*C*G*V*F + ...)Which is at least dimensionally consistent!"and:"Finally, setting all the resistances to 1000 gives an answer of 833.33..., which is reassuring"I thought I'd give you another dataset to test.

author: The Electrician
author_rank: Frequent Contributor
timestamp: April 23, 2018, 07:22:20 pm
content: A general solution to this sort of problem is provided by graph theory:https://en.wikipedia.org/wiki/Resistance_distanceThis provides a comprehensive and compact way to compute the resistance from every node to every other node:rs20 and kirr got the correct result.

author: rs20
author_rank: Super Contributor
timestamp: April 24, 2018, 04:32:47 am
content: Quote from: The Electrician on April 23, 2018, 07:14:58 pmWhy do you think I suddenly sounded so much more confident? In other words, thanks for the extra testQuote from: The Electrician on April 23, 2018, 07:22:20 pmFascinating! Haven't had a chance to absorb this yet, but I'm a bit blown away that such a general solution can be expressed so compactly in with fairly standard-looking matrix operations.Quote from: Kirr on April 23, 2018, 01:20:49 pmYou don't need the code to be 100% utterly perfectly formatted and coded before open sourcing it! I understand this is a common hesitation, I certainly share it. But anyway, I'm certainly keen to collaborate!Quote from: Kirr on April 23, 2018, 01:20:49 pmIndeed, I suspect you're right about this. But a non-expanded or multi-step calculation (in which there are "temporary variables" or "intermediate values") might give a more compact representation. I'm not sure if all this is any use for anything, but at the very least it could be interesting as a purely academic exercise.Also, your tool can simply refuse to give closed-form solutions for sufficiently large networks :-)

author: hamster_nz
author_rank: Super Contributor
timestamp: April 24, 2018, 05:14:34 am
content: Quote from: rs20 on April 24, 2018, 04:32:47 amIf you want a trip down "old school computer magazine lane" check out this 1986 Byte magazine section:https://archive.org/stream/byte-magazine-1986-07/1986_07_BYTE_11-07_Engineers_Toolbox#page/n167/mode/2upIt walks you though why matrix operations can model this problem, and eventually builds up to modeling a 741 OpAmp on a Commodore 64 (giving results with 1% that of SPICE!)It almost deserves a thread of it's own