Skip to content

Instantly share code, notes, and snippets.

@mbolivar
Created March 22, 2018 19:56
Show Gist options
  • Select an option

  • Save mbolivar/b292cc1e012fddc85e12caed85b477a0 to your computer and use it in GitHub Desktop.

Select an option

Save mbolivar/b292cc1e012fddc85e12caed85b477a0 to your computer and use it in GitHub Desktop.
For 17 total events:
Consecutive integer command codes [1, 2, 3, ..., 17] yield 89 total false positive pairs (15 and 17 are particularly bad values):
event <---> false positives:
----------------------------
1 <---> {3, 5, 7, 9, 11, 13, 15, 17}
2 <---> {3, 6, 7, 10, 11, 14, 15}
3 <---> {5, 6, 7, 9, 10, 11, 13, 14, 15, 17}
4 <---> {5, 6, 7, 12, 13, 14, 15}
5 <---> {6, 7, 9, 11, 12, 13, 14, 15, 17}
6 <---> {7, 10, 11, 12, 13, 14, 15}
7 <---> {9, 10, 11, 12, 13, 14, 15, 17}
8 <---> {9, 10, 11, 12, 13, 14, 15}
9 <---> {10, 11, 12, 13, 14, 15, 17}
10 <---> {11, 12, 13, 14, 15}
11 <---> {12, 13, 14, 15, 17}
12 <---> {13, 14, 15}
13 <---> {17, 14, 15}
14 <---> {15}
15 <---> {17}
16 <---> {17}
Bitmask-style command codes which minimize overlap ([1, 2, 4, ..., 16384, 32768, 3]) yield 2 total false positive pairs:
event <---> false positives:
----------------------------
1 <---> {3}
2 <---> {3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment