• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    40
    arrow-down
    1
    ·
    edit-2
    20 days ago

    My dad once told me that he had to find the circuit breaker that corresponded to a particular wire and because we have around 60 circuit breakers in our house, he had to flick one off, run down and check the wire, run back up, flick the next circuit breaker off, and do that quite a lot of times.

    In that moment, I got to explain binary search to him and he was genuinely interested. 🙃

    • someguy3@lemmy.world
      link
      fedilink
      arrow-up
      21
      ·
      20 days ago

      I think the old school method was to plug in a stereo and turn the volume up. When you couldn’t hear it then you got the right breaker.

      • phughes@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        20 days ago

        I hook a cheap webcam up to a USB battery pack and load it up on my phone. Then I plug in a light and point the camera at that. It makes it a single trip and doesn’t bother the neighbors.

    • greenhorn@lemm.ee
      link
      fedilink
      English
      arrow-up
      9
      ·
      20 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?

      • spongebue@lemmy.world
        link
        fedilink
        arrow-up
        26
        arrow-down
        2
        ·
        20 days ago

        Turn off half the breakers. See if you still have power where you need to go. That will tell you which half it’s on. Turn off half of those breakers, repeat.

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        20 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
          6
          ·
          20 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
              5
              ·
              20 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!

              • rumba@lemmy.zip
                link
                fedilink
                English
                arrow-up
                1
                ·
                20 days ago

                I had two breakers labeled “dishwasher”

                Electrical work is one of those things that’s not difficult to do as long as you don’t mind it being some level of wrong but relatively hard to do 100% to code right without training. With most of the wrong ways, the project still works, but it’s dangerous and/or hard to maintain. Professional work is expensive, so you end up with a LOT of handyman work that’s poorly labeled, poorly run, poorly designed or some combination of the three.

                My best guess would be that at some point, running the dishwasher tripped the breaker. They had space so they added a breaker below it and moved the line to the new breaker. Then it still tripped, so they moved the line at the dishwasher circuit that was already close by.

                Either the original line has a fault in it (old aluminum lines can have junction issues over time) or the dishwasher had a short in it, and they either replaced the dishwasher, or the new line they chose didn’t fail.

          • phughes@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            20 days ago

            I keep a spreadsheet with every outlet/light in every room on it and their corresponding breakers. Much easier since breakers often span multiple rooms, sometimes only powering one or two fixtures in each.

        • greenhorn@lemm.ee
          link
          fedilink
          English
          arrow-up
          2
          ·
          19 days ago

          Ah, obvious now, thank you. For some reason my his brain couldn’t get to actually turning off half the breakers in one go

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        20 days ago

        Thanks, I changed it. I wasn’t sure, what the correct English word is…

        • AwkwardLookMonkeyPuppet@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          ·
          20 days ago

          I would have never guessed that you’re not a native English speaker from your writing. Neat!

          A fuse and a circuit breaker perform the same function, but a fuse blows out and has to be replaced, whereas a circuit breaker can just be flipped back on. Fuses haven’t been used in household wiring for a long time now, but they’re still used in cars, and for portable things like Christmas lights.

    • jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      7
      arrow-down
      5
      ·
      20 days ago

      Binary search only works if the fuses were correctly sorted in the same order as the houses though.

      • domdanial@reddthat.com
        link
        fedilink
        English
        arrow-up
        19
        ·
        edit-2
        20 days ago

        I don’t think that’s true, it’s more of a set problem. If you pull half the fuses, and the thing is still on, then you’ve ruled out that half. Then you pull half the remaining fuses, and if it turns off it was one of the new half you pulled. Then you put another half back in, ect .

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        ·
        20 days ago

        You know, after posting that comment, I really doubted myself, if it really is binary search, because Wikipedia also tells me it needs to be a sorted array.

        But yeah, I think that’s only relevant, if your method of checking whether it’s in one half or the other uses > and <. As far as I can tell, so long as you can individually identify the fuses, a.k.a. they’re countable, then you can apply binary search.