library(combinat)
## 
## Attaching package: 'combinat'
## The following object is masked from 'package:utils':
## 
##     combn

The Combination Way (adding [20 choose 1] + [20 choose 2] … + [20 choose 20])

sum = 0
for(i in 1:19){
  comb <- dim(combn(20, i))[2]
  sum = sum + comb
}

# the plus 2 accounts for 20C20 and 20C0
sum + 2
## [1] 1048576

The ‘Each sub-constituency is a distinct binary choice’ Way

2^20
## [1] 1048576

So the answer is the same! Kind of a cool result.

It makes sense that this number is so high: check out all the ways you can choose 8 sub-constituencies out of the 20!

dim(combn(20,8))[2]
## [1] 125970

This was fun.