4 ms·
i can't for the life of me figure out why the 3x3 apartment building was divided into two bipartite graphs. can someone please explain? i thought each room is c
by zackattack 16y ago
i can't for the life of me figure out why the 3x3 apartment building was divided into two bipartite graphs. can someone please explain? i thought each room is connected to any adjacent building.. since "Passing only through walls, ceilings, and floors" is an option??
- Locke1689 16y agoSorry if I gave that impression. The apartment building is a single graph which I labeled G. The three separate diagrams symbolize each floor. As I said: I have built the graph for the apartment below. Each vertex in the graph represents a room, while each edge represents a path the fairy can travel. The graph is split into three separate floors for easy visualization, but simply imagine that each vertex is connected to the nodes above and below them.
- zackattack 16y agoright, so why are some of the vertices black and why are some of them red?
- Locke1689 16y agoIt's a single bipartite graph -- the requirement for a bipartite graph is that every vertex can be separated into two non-adjacent disjoint sets. Since the names of the sets are arbitrary I just named them "red" and "black." The color of the vertex represents the membership of its set.
- zackattack 16y agoRight... so why are the sets disjoint? Why are some vertices in the red set and others in the black set?
- zackattack 16y agolike is the bipartite graph a natural translation or is it something arbitrary you invented? because if it's arbitrary it's confusing because in the written description you mentioned you could from one edge to another so it doesn't seem like it would be a bipartite graph but simply a regular connected graph?
- dnautics 16y agoit's just a tool to help solve the problem. Kind of like the chessboard/dominoes thing. You could have just as easily formulated the problem on a go board. But having black and white squares on the chessboard makes the solution much, much easier to visualize.