[ANN] Ruby Challenge for Beginners #3 - Short Circuit

Discussion in 'Ruby' started by Satish Talim, Oct 30, 2009.

  1. Satish Talim

    Satish Talim Guest

    [Note: parts of this message were removed to make it a legal post.]

    Ruby beginners: The third installment of the Ruby Programming Challenge for
    Newbies (Short Circuit) is now live. The problem has been set by Gautam
    Rege. Entry is free and registration is optional. You stand a chance to win
    a prize. Hurry. Only 20 days per challenge -
    http://rubylearning.com/blog/2009/10/30/rpcfn-short-circuit-3/

    Satish Talim
    RubyLearning.org
    Satish Talim, Oct 30, 2009
    #1
    1. Advertising

  2. Satish Talim

    Paul Smith Guest

    On Fri, Oct 30, 2009 at 10:52 AM, Satish Talim <> wrote:
    > Ruby beginners: The third installment of the Ruby Programming Challenge for
    > Newbies (Short Circuit) is now live. The problem has been set by Gautam
    > Rege. Entry is free and registration is optional. You stand a chance to win
    > a prize. Hurry. Only 20 days per challenge -
    > http://rubylearning.com/blog/2009/10/30/rpcfn-short-circuit-3/


    I totally read that as "Entry fee is optional"

    The problem statement might be flawed by trying to frame it in an
    electrical context. The author uses the phrase "Electricity always
    follows the path of least resistance" but I understood that current
    could flow down multiple routes in proportion inverse to the
    resistances, i.e. that if one path had a 10% higher resistance, it
    would receive 10% less current, not that all current would flow
    through the less resistive(?) path.

    Feel free to correct my knowledge of physics and electrical engineering though.

    I think the problem is just looking for a simple shortest path
    algorithm Dijkstra or something.

    --
    Paul Smith
    http://www.nomadicfun.co.uk

    Paul Smith, Oct 30, 2009
    #2
    1. Advertising

  3. Re: Ruby Challenge for Beginners #3 - Short Circuit

    On Oct 30, 6:04=A0am, Paul Smith <> wrote:
    > The problem statement might be flawed by trying to frame it in an
    > electrical context. =A0The author uses the phrase "Electricity always
    > follows the path of least resistance" but I understood that current
    > could flow down multiple routes in proportion inverse to the
    > resistances, i.e. that if one path had a 10% higher resistance, it
    > would receive 10% less current, not that all current would flow
    > through the less resistive(?) path.
    >
    > Feel free to correct my knowledge of physics and electrical engineering t=

    hough.
    >
    > I think the problem is just looking for a simple shortest path
    > algorithm =A0Dijkstra or something.


    I think the challenge also suffers from a disconnect between the
    apparently intended goal and the stated goal. To solve the problem,
    you need to go through the effort of finding the shortest path; rather
    than return this path as the solution, you need to indicate which
    segments are *not* part of the path.

    --
    -yossef
    Yossef Mendelssohn, Oct 30, 2009
    #3
  4. Re: Ruby Challenge for Beginners #3 - Short Circuit

    On Fri, Oct 30, 2009 at 9:00 PM, Yossef Mendelssohn <> wrote:
    >
    > I think the challenge also suffers from a disconnect between the
    > apparently intended goal and the stated goal. To solve the problem,
    > you need to go through the effort of finding the shortest path; rather
    > than return this path as the solution, you need to indicate which
    > segments are *not* part of the path.


    that's actually a pretty good test of your datastructure.

    martin
    Martin DeMello, Oct 30, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phil...
    Replies:
    10
    Views:
    715
    Joona I Palaste
    Oct 23, 2003
  2. Phil...
    Replies:
    1
    Views:
    968
    Thomas G. Marshall
    Oct 22, 2003
  3. JS#
    Replies:
    5
    Views:
    3,520
    Roedy Green
    Nov 21, 2005
  4. Satish Talim

    [ANN] Ruby Challenge for Beginners #2

    Satish Talim, Oct 10, 2009, in forum: Ruby
    Replies:
    1
    Views:
    102
    Thiago Massa
    Oct 10, 2009
  5. Satish Talim

    [ANN] Ruby Challenge for Beginners #4

    Satish Talim, Dec 4, 2009, in forum: Ruby
    Replies:
    0
    Views:
    83
    Satish Talim
    Dec 4, 2009
Loading...

Share This Page