An incremental span stepwedge is a stepwedge that spans its complete interval, and that has the same integer increment between all pairs of neighboring steps. There are only certain combinations that satisfy these constraints. All possible cases are summarized in the table below.
A common example would be a stepwedge representing 8-bit pixel values. In this case, an 8-bit value can represent 256 unique levels, spanning the range [0, 255]. What integer increments exist that will exactly span this range? An obvious value would be an increment of one. This would make a 256 level stepwedge (0, 1, 2, … 253, 254, 255). This is an incremental span stepwedge because it has the same integer increment between all pairs of steps (1) and it spans the full 8-bit range (0 through 255). Another obvious value would be an increment of 255 which would make a two-level stepwedge (0, 255). Both of these stepwedges span the entire range (i.e. they contain both extreme values 0 and 255) and both have integer increments (i.e. 1 and 255 in these examples).
Other possibilities exist that are less obvious. An increment of 2 will not work, because that produces a stepwedge that does not span the full range (0, 2, 4, … 252, 254). Notice that this stepwedge does not contain the value 255; therefore it is disqualified. An increment of 3 will work, since it produces a spanning stepwedge (0, 3, 6, 9, … 249, 252, 255). If you exhaustively examine all possible increments, you will find that the 8-bit case has only eight incremental span stepwedges:
Here is a table that presents all possible incremental span stepwedges for bit sizes from 1 through 16.
Number of Bits | Number of Steps | Increment | Step Values |
1 | 2 | 1 | 0, 1 |
2 | 4 2 |
1 3 |
0, 1, 2, 3 0, 3 |
3 | 8 2 |
1 7 |
0, 1, 2, 3, 4, 5, 6, 7 0, 7 |
4 | 16 6 4 2 |
1 3 5 15 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 0, 3, 6, 9, 12, 15 0, 5, 10, 15 0, 15 |
5 | 32 2 |
1 31 |
0, 1, 2, 3, 4, 5, … 26, 27, 28, 29, 30, 31 0, 31 |
6 | 64 22 10 8 4 2 |
1 3 7 9 21 63 |
0, 1, 2, 3, 4, 5, … 58, 59, 60, 61, 62, 63 0, 3, 6, 9, 12, 15, … 48, 51, 54, 57, 60, 63 0, 7, 14, 21, 28, 35, 42, 49, 56, 63 0, 9, 18, 27, 36, 45, 54, 63 0, 21, 42, 63 0, 63 |
7 | 128 2 |
1 127 |
0, 1, 2, 3, 4, 5, … 122, 123, 124, 125, 126, 127 0, 127 |
8 | 256 86 52 18 16 6 4 2 |
1 3 5 15 17 51 85 255 |
0, 1, 2, 3, 4, 5, … 250, 251, 252, 253, 254, 255 0, 3, 6, 9, 12, 15, … 240, 243, 246, 249, 252, 255 0, 5, 10, 15, 20, 25, … 230, 235, 240, 245, 250, 255 0, 15, 30, 45, 60, 75, … 180, 195, 210, 225, 240, 255 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255 0, 51, 102, 153, 204, 255 0, 85, 170, 255 0, 255 |
9 | 512 74 8 2 |
1 7 73 511 |
0, 1, 2, 3, 4, 5, … 506, 507, 508, 509, 510, 511 0, 7, 14, 21, 28, 35, … 476, 483, 490, 497, 504, 511 0, 73, 146, 219, 292, 365, 438, 511 0, 511 |
10 | 1024 342 94 34 32 12 4 2 |
1 3 11 31 33 93 341 1023 |
0, 1, 2, 3, 4, 5, … 1018, 1019, 1020, 1021, 1022, 1023 0, 3, 6, 9, 12, 15, … 1008, 1011, 1014, 1017, 1020, 1023 0, 11, 22, 33, 44, 55, … 968, 979, 990, 1001, 1012, 1023 0, 31, 62, 93, 124, 155, … 868, 899, 930, 961, 992, 1023 0, 33, 66, 99, 132, 165, … 858, 891, 924, 957, 990, 1023 0, 93, 186, 279, 372, 465, 558, 651, 744, 837, 930, 1023 0, 341, 682, 1023 0, 1023 |
11 | 2048 90 24 2 |
1 23 89 2047 |
0, 1, 2, 3, 4, 5, … 2042, 2043, 2044, 2045, 2046, 2047 0, 23, 46, 69, 92, 115, … 1932, 1955, 1978, 2001, 2024, 2047 0, 89, 178, 267, 356, 445, … 1602, 1691, 1780, 1869, 1958, 2047 0, 2047 |
12 | 4096 1366 820 586 456 316 274 196 118 106 92 66 64 46 40 36 22 16 14 10 8 6 4 2 |
1 3 5 7 9 13 15 21 35 39 45 63 65 91 105 117 195 273 315 455 585 819 1365 4095 |
0, 1, 2, 3, 4, 5, … 4090, 4091, 4092, 4093, 4094, 4095 0, 3, 6, 9, 12, 15, … 4080, 4083, 4086, 4089, 4092, 4095 0, 5, 10, 15, 20, 25, … 4070, 4075, 4080, 4085, 4090, 4095 0, 7, 14, 21, 28, 35, … 4060, 4067, 4074, 4081, 4088, 4095 0, 9, 18, 27, 36, 45, … 4050, 4059, 4068, 4077, 4086, 4095 0, 13, 26, 39, 52, 65, … 4030, 4043, 4056, 4069, 4082, 4095 0, 15, 30, 45, 60, 75, … 4020, 4035, 4050, 4065, 4080, 4095 0, 21, 42, 63, 84, 105, … 3990, 4011, 4032, 4053, 4074, 4095 0, 35, 70, 105, 140, 175, … 3920, 3955, 3990, 4025, 4060, 4095 0, 39, 78, 117, 156, 195, … 3900, 3939, 3978, 4017, 4056, 4095 0, 45, 90, 135, 180, 225, … 3870, 3915, 3960, 4005, 4050, 4095 0, 63, 126, 189, 252, 315, … 3780, 3843, 3906, 3969, 4032, 4095 0, 65, 130, 195, 260, 325, … 3770, 3835, 3900, 3965, 4030, 4095 0, 91, 182, 273, 364, 455, … 3640, 3731, 3822, 3913, 4004, 4095 0, 105, 210, 315, 420, 525, … 3570, 3675, 3780, 3885, 3990, 4095 0, 117, 234, 351, 468, 585, … 3510, 3627, 3744, 3861, 3978, 4095 0, 195, 390, 585, 780, 975, … 3120, 3315, 3510, 3705, 3900, 4095 0, 273, 546, 819, 1092, 1365, 1638, 1911, 2184, 2457, 2730, 3003, 3276, 3549, 3822, 4095 0, 315, 630, 945, 1260, 1575, 1890, 2205, 2520, 2835, 3150, 3465, 3780, 4095 0, 455, 910, 1365, 1820, 2275, 2730, 3185, 3640, 4095 0, 585, 1170, 1755, 2340, 2925, 3510, 4095 0, 819, 1638, 2457, 3276, 4095 0, 1365, 2730, 4095 0, 4095 |
13 | 8192 2 |
1 8191 |
0, 1, 2, 3, 4, 5, … 8186, 8187, 8188, 8189, 8190, 8191 0, 8191 |
14 | 16384 5462 382 130 128 44 4 2 |
1 3 43 127 129 381 5461 16383 |
0, 1, 2, 3, 4, 5, … 16378, 16379, 16380, 16381, 16382, 16383 0, 3, 6, 9, 12, 15, … 16368, 16371, 16374, 16377, 16380, 16383 0, 43, 86, 129, 172, 215, … 16168, 16211, 16254, 16297, 16340, 16383 0, 127, 254, 381, 508, 635, … 15748, 15875, 16002, 16129, 16256, 16383 0, 129, 258, 387, 516, 645, … 15738, 15867, 15996, 16125, 16254, 16383 0, 381, 762, 1143, 1524, 1905, … 14478, 14859, 15240, 15621, 16002, 16383 0, 5461, 10922, 16383 0, 16383 |
15 | 32768 4682 1058 218 152 32 8 2 |
1 7 31 151 217 1057 4681 32767 |
0, 1, 2, 3, 4, 5, … 32762, 32763, 32764, 32765, 32766, 32767 0, 7, 14, 21, 28, 35, … 32732, 32739, 32746, 32753, 32760, 32767 0, 31, 62, 93, 124, 155, … 32612, 32643, 32674, 32705, 32736, 32767 0, 151, 302, 453, 604, 755, … 32012, 32163, 32314, 32465, 32616, 32767 0, 217, 434, 651, 868, 1085, … 31682, 31899, 32116, 32333, 32550, 32767 0, 1057, 2114, 3171, 4228, 5285, … 27482, 28539, 29596, 30653, 31710, 32767 0, 4681, 9362, 14043, 18724, 23405, 28086, 32767 0, 32767 |
16 | 65536 21846 13108 4370 3856 1286 772 258 256 86 52 18 16 6 4 2 |
1 3 5 15 17 51 85 255 257 771 1285 3855 4369 13107 21845 65535 |
0, 1, 2, 3, 4, 5, … 65530, 65531, 65532, 65533, 65534, 65535 0, 3, 6, 9, 12, 15, … 65520, 65523, 65526, 65529, 65532, 65535 0, 5, 10, 15, 20, 25, … 65510, 65515, 65520, 65525, 65530, 65535 0, 15, 30, 45, 60, 75, … 65460, 65475, 65490, 65505, 65520, 65535 0, 17, 34, 51, 68, 85, … 65450, 65467, 65484, 65501, 65518, 65535 0, 51, 102, 153, 204, 255, … 65280, 65331, 65382, 65433, 65484, 65535 0, 85, 170, 255, 340, 425, … 65110, 65195, 65280, 65365, 65450, 65535 0, 255, 510, 765, 1020, 1275, … 64260, 64515, 64770, 65025, 65280, 65535 0, 257, 514, 771, 1028, 1285, … 64250, 64507, 64764, 65021, 65278, 65535 0, 771, 1542, 2313, 3084, 3855, … 61680, 62451, 63222, 63993, 64764, 65535 0, 1285, 2570, 3855, 5140, 6425, … 59110, 60395, 61680, 62965, 64250, 65535 0, 3855, 7710, 11565, 15420, 19275, … 46260, 50115, 53970, 57825, 61680, 65535 0, 4369, 8738, 13107, 17476, 21845, 26214, 30583, 34952, 39321, 43690, 48059, 52428, 56797, 61166, 65535 0, 13107, 26214, 39321, 52428, 65535 0, 21845, 43690, 65535 0, 65535 |