Charliplexing is a scheme for multiplexing access to components, like LEDs, switches,touch sensors etc, that can is more efficient (in terms of edge connections) than the well known x/y multiplexing.
A runnable demo can be found at: https://malcolmbinstead.github.io/charlieplexing/
And the source code can be found at: https://github.com/malcolmbinstead/charlieplexing
Wikipedia article can be found at: https://en.wikipedia.org/wiki/Charlieplexing