How many connected components does this graph have?

227 Views Asked by At

Let $G=(V,E)$ with $V = \{0,1,...,199\},$ $$E = \{(x,y) : x,y\in V, x \ne y, x \equiv y \pmod 7 \}$$ How many connected components does this Graph have?

How can I answer this question? I have no idea how to solve this except draw a table in order to get the set $E$ and after that, write the graph, but I think there's a more straightforward way to do this.

2

There are 2 best solutions below

0
On BEST ANSWER

The answer is 7. The components are $X_j; j=0,1,2,\ldots, 6$, where $X_j = \{y; y \in \{0,1,2, \ldots, 199\}; y \pmod 7 = j\}$. Can you see why this is [and that each $X_j$ is nonempty].

If you need more hints, note that $G[X_j]$ is in fact a clique, for each $j \in \{0,1,2,\ldots 6\}$, and that there are no edges between vertices in $X_j$ and $X_{j'}$ for any two distinct $j,j' \in \{0,1,2,\ldots, 6\}$

0
On

We can define an equivalence relation - $x\sim y\iff x\equiv y\pmod7$ (I leave it to the OP to check that this is indeed an equivalence relation). So, $(x,y)\in E \iff x\equiv y\pmod 7\iff x\sim y\iff [x]=[y]$. So that means that two vertices connect iff they're in the same equivalence class. That means we have $7$ connected components - the same number of equivalence classes.