Let $G$ be a simple connected graph. Each edge has two phases, which is either blue or red. Each vertex are switches that change the colour of every edge that connects the vertex. All edges are initially red. Find all ordered pairs $(n,k)$, $n\ge 3$, such that: a) For all graph $G$ with $n$ vertex and $k$ edges, it is always possible to perform a series of switching process so that all edges are eventually blue. b) There exist a graph $G$ with $n$ vertex and $k$ edges and it is possible to perform a series of switching process so that all edges are eventually blue.
Problem
Source: Junior Olympiad of Malaysia Shortlist 2015 C5
Tags: combinatorics
24.07.2015 09:22
a. All $(n,k)$ with $k \le 2$, and only those. If $k \le 2$, since two edges may not connect the same pair of vertices, at least one endpoint of each of these edges is a leaf. Toggle the leaves. If $k \ge 3$, consider any graph that has a triangle $abc$, and look at these three edges. Any toggle of $a,b,c$ will change the state of an even number of them (and toggle of any other vertex doesn't change these edges), so the parity of the number of red edges remains the same. Initially it's odd (3), but at the end it's even (0), impossible.
27.07.2015 18:44
b. All $(n,k)$ with $k \le \frac{n^2}{4}$, and only those. First, to show that they are possible: Divide the vertices into two groups of as equal sizes as possible (that is, one is $\left\lfloor \frac{n}{2} \right\rfloor$ and the other is $\left\lceil \frac{n}{2} \right\rceil$), and only draw edges between these; draw any $k$ edges. Toggling all vertices of one group makes all edges blue, so this is valid. Also, by dividing into cases ($n$ even and $n$ odd), we can show that $\left\lfloor \frac{n}{2} \right\rfloor \cdot \left\lceil \frac{n}{2} \right\rceil = \left\lfloor \frac{n^2}{4} \right\rceil$, so any such $k$ can be done. Showing that no larger $k$ works is easy: by Turan's theorem, a graph with more than $\frac{n^2}{4}$ edges has a triangle, and by applying the reasoning from before this graph can never be solved.
15.09.2015 10:43
part a is almost correct, except that G is connected, so k<=2 might not be sufficient.
15.09.2015 12:10
Oops, okay. a. $(n,n-1)$ for all $n \ge 3$. If there are more than $n-1$ edges, we can simply construct a triangle and add the remaining edges together to make a connected graph. Since there's a triangle, it's impossible for the same reason as above. If there are $n-1$ edges, the graph is a tree and hence bipartite; toggle all vertices of one side.