Author Topic: Resistance across a 1k resistor cube.  (Read 7470 times)

0 Members and 1 Guest are viewing this topic.

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Resistance across a 1k resistor cube.
« Reply #25 on: April 22, 2018, 04:44:16 pm »
A cube is bad enough, but how about this one from xkcd #730?  https://xkcd.com/730/  :)

 

steverino

  • Guest
Re: Resistance across a 1k resistor cube.
« Reply #26 on: April 22, 2018, 07:39:17 pm »
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...)

« Last Edit: April 22, 2018, 07:59:38 pm by steverino »
 

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Resistance across a 1k resistor cube.
« Reply #27 on: April 22, 2018, 08:02:00 pm »
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.

« Last Edit: April 22, 2018, 08:06:42 pm by JacquesBBB »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Resistance across a 1k resistor cube.
« Reply #28 on: April 22, 2018, 10:51:53 pm »
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 B to A, but r9 goes from B to C. Unfortunately, you're simply not allowed to apply the parallel resistance formula in this case.

Now if (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.)
 

steverino

  • Guest
Re: Resistance across a 1k resistor cube.
« Reply #29 on: April 23, 2018, 01:38:45 am »
Ah, of course, I see it now.  Thanks.
 

Offline Kirr

  • Regular Contributor
  • *
  • Posts: 66
  • Country: jp
Re: Resistance across a 1k resistor cube.
« Reply #30 on: April 23, 2018, 04:40:20 am »
A cube is bad enough, but how about this one from xkcd #730?  https://xkcd.com/730/  :)
Yep, 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.

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Resistance across a 1k resistor cube.
« Reply #32 on: April 23, 2018, 10:45:26 am »
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.  >:D



 

Offline Kirr

  • Regular Contributor
  • *
  • Posts: 66
  • Country: jp
Re: Resistance across a 1k resistor cube.
« Reply #33 on: April 23, 2018, 11:32:20 am »
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.  >:D
When ready, click to verify your answer, or to give up :)
 
The following users thanked this post: rs20

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Resistance across a 1k resistor cube.
« Reply #34 on: April 23, 2018, 11:38:12 am »
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.  >:D

I already provided the arbitrary resistance closed-form formula back in message #18. Subbing in the values you wrote, the answer is: 6195184/1328873 Ohms.


 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Resistance across a 1k resistor cube.
« Reply #35 on: April 23, 2018, 11:46:21 am »
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.  >:D
When ready, click to verify your answer, or to give up :)

Very 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.
 

Online gamalot

  • Super Contributor
  • ***
  • Posts: 1306
  • Country: au
  • Correct my English
    • Youtube
Re: Resistance across a 1k resistor cube.
« Reply #36 on: April 23, 2018, 12:16:28 pm »
 :)


Online Zero999

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • 0999
Re: Resistance across a 1k resistor cube.
« Reply #37 on: April 23, 2018, 01:02:19 pm »
I would say 833.3 Ω ?

Edit: I could even say 833⅓ Ω now that the forum has been upgraded  :)
I prefer to use superscript and subscript for fractions, because I find it easier to read. 8331/3Ω.
 

Offline Kirr

  • Regular Contributor
  • *
  • Posts: 66
  • Country: jp
Re: Resistance across a 1k resistor cube.
« Reply #38 on: April 23, 2018, 01:20:49 pm »
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.  >:D
When ready, click to verify your answer, or to give up :)
Very 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.
Also 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).

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Resistance across a 1k resistor cube.
« Reply #39 on: April 23, 2018, 07:14:58 pm »
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.  >:D

I already provided the arbitrary resistance closed-form formula back in message #18. Subbing in the values you wrote, the answer is: 6195184/1328873 Ohms.



In 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.  :)
 
The following users thanked this post: rs20

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 743
  • Country: us
Re: Resistance across a 1k resistor cube.
« Reply #40 on: April 23, 2018, 07:22:20 pm »
A general solution to this sort of problem is provided by graph theory:
https://en.wikipedia.org/wiki/Resistance_distance

This provides a comprehensive and compact way to compute the resistance from every node to every other node:







rs20 and kirr got the correct result.
« Last Edit: April 23, 2018, 07:24:35 pm by The Electrician »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Resistance across a 1k resistor cube.
« Reply #41 on: April 24, 2018, 04:32:47 am »
In reply #18 you seemed not absolutely certain that your formula was perfectly correct:

...

I thought I'd give you another dataset to test.  :)

Why do you think I suddenly sounded so much more confident? In other words, thanks for the extra test  :)  :-+

A general solution to this sort of problem is provided by graph theory:
https://en.wikipedia.org/wiki/Resistance_distance

Fascinating! 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.

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.

You 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!

I guess the final expanded formula is unique for each network, so should be identical (other than order of terms in each sum).

Indeed, 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 :-)
 

Offline hamster_nzTopic starter

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Resistance across a 1k resistor cube.
« Reply #42 on: April 24, 2018, 05:14:34 am »
A general solution to this sort of problem is provided by graph theory:
https://en.wikipedia.org/wiki/Resistance_distance

Fascinating! 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.

If 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/2up

It 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 :D
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: Wimberleytech


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf