1500
Binary search (slrpnk.net)
submitted 3 weeks ago by ByteOnBikes@slrpnk.net to c/memes@sopuli.xyz
you are viewing a single comment's thread
view the rest of the comments
[-] greenhorn@lemm.ee 11 points 3 weeks 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 11 points 3 weeks 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 7 points 3 weeks 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).

[-] phughes@lemmy.ml 3 points 3 weeks 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.

load more comments (5 replies)
load more comments (7 replies)
load more comments (9 replies)
this post was submitted on 02 Dec 2024
1500 points (99.3% liked)

Memes

8529 readers
1013 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.


Laittakaa meemejä tänne.

founded 2 years ago
MODERATORS