this post was submitted on 02 Dec 2024
1461 points (99.3% liked)
Memes
8429 readers
472 users here now
Post memes here.
A meme is an idea, behavior, or style that spreads by means of imitation from person to person within a culture and often carries symbolic meaning representing a particular phenomenon or theme.
An Internet meme or meme, is a cultural item that is spread via the Internet, often through social media platforms. The name is by the concept of memes proposed by Richard Dawkins in 1972. Internet memes can take various forms, such as images, videos, GIFs, and various other viral sensations.
- Wait at least 2 months before reposting
- No explicitly political content (about political figures, political events, elections and so on), [email protected] can be better place for that
- Use NSFW marking accordingly
Laittakaa meemejä tänne.
- Odota ainakin 2 kuukautta ennen meemin postaamista uudelleen
- Ei selkeän poliittista sisältöä (poliitikoista, poliittisista tapahtumista, vaaleista jne) parempi paikka esim. [email protected]
- Merkitse K18-sisältö tarpeen mukaan
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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?
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.
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).
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).
That's the case with virtually every breaker box.
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!
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.
What Rumba said. Why full ass a job when half is plenty.
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.
Ah, obvious now, thank you. For some reason ~~my~~ his brain couldn't get to actually turning off half the breakers in one go
Binary search requires splitting the search space into two halves, then asking “is it in that half?”
Normally the “is it in that half?” check involves a numerical comparison: test value versus target value. “higher or lower” here gets you to “is it in that half?”
So finding the midpoint seems like a core part of the process, but really that’s just a shortcut in the case of comparable values, that helps you split into two and check membership.
I admit I couldn’t think of that either: just alter half the items and check for effect.
Turn off half the breakers. Now you know which half the outlet is on, based on whether or not it has power. Repeat.
For instance, let’s say you have 100 breakers. You turn off the first 50. Your target outlet still has power. So now you have divided the potential number of breakers by half, and you know the breaker is somewhere in 51-100.
So you cut that in half, and turn off 51-75. Your outlet is now dead, so you know it’s somewhere in the 51-75 range that you just turned off; if it were still on, it would be somewhere between 76-100.
So now you reset 51-63, while leaving 64-75 off. It is still dead, so you know it is somewhere between 64-75.
Maybe now you turn on all of the odd breakers, leaving the evens off. It is still dead, so you know it must be 64, 66, 68, 70, 72, or 74. Reset the first three. Your outlet has power now, so it must be one of the first three.
Flip 64 and 66 off. If you get lucky, your outlet still has power and you know it is 68. But you get unlucky, and it is dead. So now you know it must be either 64 or 66.
Flip 64 back on. If it has power, you know it’s 64. If it doesn’t, you know it’s 66.
We just eliminated 99 breakers and found the correct one using only 7 tests. Because each test eliminated half of the potential values, it whittles things down very quickly. We went from 1-100, to 51-100, to 51-75, to 64-75, to the evens between 64-74, to only 64/66/68, to 64/66, and finally landed on 66 as the correct breaker. If we had gotten lucky earlier, we could have done it in 6 instead. If you had simply started with breaker 1 and worked subsequently, it would have taken 66 trips to the breaker box to figure out.
Where binary search really excels is with large data sets. Even if it had been 1000 breakers instead of 100, it still would have only taken an extra three or four searches (1-1000 > 1-500 > 1-250 > 1-125 > 1-75… etc…) to narrow it down.