• greenhorn@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    25 days ago

    My friend has some upcoming electrical work in his house, can you explain how to use binary search in this instance so I can tell him?

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      25 days ago

      Oh, well, you switch off half the fuses, then you go check the wire.
      Let’s say the wire still has power on it, so now you know that none of the fuses in that half affected it (which you can turn back on now).

      Then you do the same thing again with the other half of the fuses, i.e. you switch off half of the fuses in that half and go check the wire.
      Now, let’s say the wire is dead, so now you know that the fuse you want is in this quarter.

      So, then you flick off half of the fuses in that quarter and check the wire again, and so on.

      With every step, you eliminate half of the remaining fuses, so for 60 fuses, you need at most 6 steps (which is the logarithm for base 2 of 60).

      • dan@upvote.au
        link
        fedilink
        arrow-up
        0
        ·
        25 days ago

        Once you figure out which one it is, label it! I labeled all the breakers in my panel when I moved in to my house, as half of the existing labels were wrong (no idea why).

          • dan@upvote.au
            link
            fedilink
            arrow-up
            0
            ·
            25 days ago

            Why are so many mislabeled though? It’s not like the loads are being changed every day. I had two breakers labeled “dishwasher” and neither of them were the dishwasher!

            • psud@aussie.zone
              link
              fedilink
              arrow-up
              1
              ·
              22 days ago

              I have only six circuits and both of my recent electricians checked and labelled each circuit. I must have had good luck in sparkies