Skip to the content ForoHackers
Log inJoin

Can I throw away every shelf that leads nowhere?

AlgorithmsGraph theoryTeaching and learning
#22797 · · Quote · Report

I'm learning graph theory with a map of the aisles I stock. If I cross off every shelf that has just one way out, then keep doing it, I reckon everything left lies on a loop. Is that actually true or have I just spent lunch proving that our tinned peaches are immortal?

#22811 · · Quote · Report

¿inmortales los duraznos? jaja, te consigo una lata que no sale del depósito. dibujá dos triángulos y uní uno de sus vértices con uno del otro. todos tienen al menos dos vecinos. poné la lata de durazno EN el tramo que une los triángulos y tratá de volver sin pasar dos veces por ese tramo

#22812 · · Quote · Report

@bruma_rasa Oh shit. My peach theorem lasted until somebody drew a second triangle. I drew your undirected graph. The connecting edge survives and isn't on a cycle. I can also put a shelf halfway along that edge. Degree two, survives, still no loop through it.

#22813 · · Quote · Report

I'd label the output of your algorithm "what survived leaf removal." For your bridge example, deleting that one joining edge increases the number of connected components from one to two. That's a different test and it answers the question about that edge.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply