Posts

Showing posts from May, 2018

On the Number of Subsets Divisible by \(k\)

In my first post, I want to discuss an elementary combinatorics problem. Somewhat surprisingly, considering complex numbers provides a very slick solution. The problem is as follows: how many subsets of \(n\) elements have size divisible by \(k\)? I first want to consider the case when \(k = 2\). Now we are simply asking how many subsets of \(\{1,...,n\}\) have an even number of elements. If you have never seen this problem before, you may want to take a few minutes to think about it before continuing. The solution involves the idea of "toggling" one of the elements in the set. Given a subset \(S\subset \{1,...,n\}\), consider the subset \(S\oplus \{1\}\), where we add the element \(1\) to \(S\) if \(S\) does not already contain \(1\), and remove it otherwise. It is clear that if \(S\) has an even number of elements, then \(S\oplus \{1\}\) will have an odd number of elements and vice versa. We also easily verify that \((S\oplus \{1\})\oplus\{1\} = S\). Thus, toggling \(1\