Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27

Math Help - Ordering resisters for the most stable circuit

  1. #16
    Newbie im43173's Avatar
    Joined
    Nov 2010
    From
    zagreb, croatia
    Posts
    12


    this is for your values multiplied by 10000 because my program is set to work with integer values. shouldn't make a differance. there are 9 combinations with the same result.
    Follow Math Help Forum on Facebook and Google+

  2. #17
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Hmm. Interesting. What is the value of the function on those permutations?
    Follow Math Help Forum on Facebook and Google+

  3. #18
    Newbie im43173's Avatar
    Joined
    Nov 2010
    From
    zagreb, croatia
    Posts
    12
    Quote Originally Posted by Ackbeet View Post
    Hmm. Interesting. What is the value of the function on those permutations?
    it's 0,000144
    Follow Math Help Forum on Facebook and Google+

  4. #19
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Hmm. Well, I've written my own little program in Mathematica to find the minimizing permutation. The winner I found was your sixth permutation. The function's value at that permutation is smaller, by a very small amount, than the function's value at the first permutation. It also beats out the second permutation, by a very little bit. I wonder if your integer arithmetic is hiding some numerical errors in computation such as round-off error. Mathematica has arbitrary-precision arithmetic, so I'm thinking that you might want to increase the precision of your computations.

    The sixth permutation that you found does do this alternating about the mean, to some extent. The first two values are actually both higher than the mean; after that, they alternate. However, I can't see any discernible pattern in the order of the numbers above or below the mean.

    I've attached my Mathematica code, and a few plots, for you to see.

    Ordering resisters for the most stable circuit-resistor-ordering-problem.jpg
    Follow Math Help Forum on Facebook and Google+

  5. #20
    Newbie im43173's Avatar
    Joined
    Nov 2010
    From
    zagreb, croatia
    Posts
    12


    yeah, you're wright, looks like i have a bug somewhere. however, there are still 4 permutations with the same result. there must be a pattern but it looks like it's really complicated...

    i'm giving up on this one. this is for a collage project, so i'll just tell my mentor that i can't do it...

    anyway, it's getting late here in croatia, tnx for your efforts...
    Follow Math Help Forum on Facebook and Google+

  6. #21
    MHF Contributor undefined's Avatar
    Joined
    Mar 2010
    From
    Chicago
    Posts
    2,340
    Awards
    1
    Interesting thread. The problem reminds me of this one on Project Euler (I hide the link because the site is pseudo-competitive and this post could be considered a hint at how to solve it):

    although the resemblance might only be superficial. The fastest solver of that problem used a random-restart hill climbing algorithm, which might be usable here. Of course a closed-form solution if one exists would be nice. I'll be looking into this as time allows and hopefully can report back before too many hours pass (and hopefully with something to contribute).
    Follow Math Help Forum on Facebook and Google+

  7. #22
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    I asked my father about this problem, and he had some very helpful ideas. Let's take the original function f:

    \displaystyle f(\mathbf{R})=\sum_{k=1}^{49}\left(\frac{\sum_{j=1  }^{k}R_{j}}{\sum_{n=1}^{50}R_{n}}-\frac{k}{50}\right)^{\!\!2}.

    We can multiply this function by a positive constant, and not change the minimums. We wish to multiply by

    \displaystyle\left(\sum_{n=1}^{50}R_{n}\right)^{\!  \!2}. Define \displaystyle\bar{R}=\frac{1}{50}\sum_{n=1}^{50}R_  {n} as the mean. Then

    \displaystyle g(\mathbf{R}):=\left(\sum_{n=1}^{50}R_{n}\right)^{  \!\!2}f(\mathbf{R})=\sum_{k=1}^{49}\left(\sum_{j=1  }^{k}R_{j}-k\bar{R}\right)^{\!\!2}=\sum_{k=1}^{49}\left(\sum_  {j=1}^{k}(R_{j}-\bar{R})\right)^{\!\!2}.

    Define \Delta_{j}:=R_{j}-\bar{R}. Then we have to minimize the function

    \displaystyle g(\mathbf{R})=\sum_{k=1}^{49}\left(\sum_{j=1}^{k}\  Delta_{j}\right)^{\!\!2}.

    Note that the sum of the \Delta_{j}'s from 1 to 50 will give exactly zero. This means that the above can be rewritten as:

    \displaystyle g(\mathbf{R})=\sum_{k=1}^{25}\left(\sum_{j=1}^{k}\  Delta_{j}\right)^{\!\!2}+\sum_{k=1}^{24}\left(\sum  _{j=1}^{k}\Delta_{51-j}\right)^{\!\!2}.

    Examination of this last expression will show that if 1 is exchanged with 50, 2 with 49, etc., that the formula will remain unchanged. (This corresponds to a complete mirror image switch.)

    Writing out the equation longhand will reveal a strategy for selection of placement of the resistors:

    g(\mathbf{R})=(\Delta_{1})^{2}+(\Delta_{1}+\Delta_  {2})^{2}+\dots+(\Delta_{1}+\dots+\Delta_{25})^{2}+  (\Delta_{50})^{2}+(\Delta_{50}+\Delta_{49})^{2}+\d  ots+(\Delta_{50}+\dots+\Delta_{27})^{2}.

    Note that the delta for 26 is missing. As one can see, the lower numbers and the higher numbers both should have small deltas, because they appear the most frequently. Also, it would seem that alternate signs of the deltas would be good in cancelling out at least some of the quantities in the parentheses. Therefore, it would seem to be a good strategy to go from ends to middle using smaller alternating deltas until the resistors in the center of the array have the largest departure from the mean.

    Cheers.
    Last edited by Ackbeet; November 8th 2010 at 06:47 PM. Reason: Possible error.
    Follow Math Help Forum on Facebook and Google+

  8. #23
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    There. I think my edits have settled down a bit now. Sorry about all that.
    Follow Math Help Forum on Facebook and Google+

  9. #24
    Newbie im43173's Avatar
    Joined
    Nov 2010
    From
    zagreb, croatia
    Posts
    12
    sorry, i don't get it

    can you explain how to sort them again?
    Follow Math Help Forum on Facebook and Google+

  10. #25
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Based on the analysis in post # 22, you want to start at both endpoints and work your way to the center. The endpoints themselves need to be the two resistors that are closest to the mean. As you work your way in, you want to alternate values that are above and below the mean. (This corresponds to delta values that are positive and negative.) Also, you will generally want to pick more and more oscillatory values - that is, ones that are farther and farther away from the mean. If I were to plot the envelope of the resistances, it would look something like this. Think of the x-axis here as the mean of the resistance values.

    Make sense? That is generally what the solutions we've found look like, with some small possible exceptions. The point is, you can find a permutation that gets your function quite small, even if it isn't the global minimum.
    Follow Math Help Forum on Facebook and Google+

  11. #26
    Newbie im43173's Avatar
    Joined
    Nov 2010
    From
    zagreb, croatia
    Posts
    12
    thanks, got it. i'll present this solution to my mentor, and see if he'd be satisfied with it.

    anyway, i'll post his solution here after he tells me.
    Follow Math Help Forum on Facebook and Google+

  12. #27
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Yeah. I'd be interested to see what he got.
    Follow Math Help Forum on Facebook and Google+

Page 2 of 2 FirstFirst 12

Similar Math Help Forum Discussions

  1. Circuit Analysis - Redrawing Circuit
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: September 13th 2011, 07:20 PM
  2. Stable Matching
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: October 14th 2010, 05:26 PM
  3. [SOLVED] Stable by but not Asymptotically Stable
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: September 9th 2010, 05:26 AM
  4. Stable, but not asymptotically stable
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: February 25th 2009, 11:06 AM
  5. Stable Equilibrium
    Posted in the Calculus Forum
    Replies: 0
    Last Post: August 28th 2008, 05:41 AM

Search Tags


/mathhelpforum @mathhelpforum