The Remainder Dilemma in Garment Sizing
When designing a round-yoke sweater or picking up stitches along a cardigan front band, you almost never have numbers that divide cleanly. For example, suppose you have 120 stitches after the neckline ribbing and need to increase 40 stitches to reach the yoke circumference:
120 / 40 = 3 stitches per interval (clean division with remainder 0) Instruction: [K3, M1] × 40 times (120 stitches worked, 40 increases made = 160 stitches)
However, real-world patterns frequently encounter remainders. For instance, increasing from 96 stitches to 108 stitches (+12 increases) divides evenly by 8 (96 / 12 = 8: [K8, M1] × 12 times). But what if you need to increase from 100 to 125 stitches (+25 increases)? 100 / 25 = 4 ([K4, M1] × 25 times).
What if you need to increase from 122 to 160 stitches (+38 increases)? 122 / 38 = 3.21. Here, mathematical partitioning is required.
The Division Partitioning Theorem
For any starting stitch count S and increase count D, the working stitches are partitioned into D intervals. By the division algorithm:
q = ⌊S / D⌋ (Base interval size) r = S mod D (Remainder count)
Exactly r intervals will contain q + 1 stitches, and exactly (D - r) intervals will contain q stitches. The total stitches consumed is mathematically guaranteed:
Total = r × (q + 1) + (D - r) × q = D × q + r = S
Instead of placing all the longer intervals at the beginning of the round, our calculator interleaves them evenly using Bresenham’s error accumulation, preventing lopsided yoke bias.
Decreases and the 2-Stitch Rule
A decrease like k2tog (knit two together) or ssk (slip slip knit) uses two stitches to create one. Therefore, in each decrease section of size L, exactly L - 2 stitches are knit plain, followed by the 2-stitch decrease maneuver.
For example, to decrease 10 stitches evenly across an 80-stitch hat round (80 / 10 = 8): each section is 8 stitches wide. The knitter works 8 - 2 = 6 plain knit stitches, followed by 1 k2tog: [K6, k2tog] × 10 times. 10 sections of 8 stitches consumes all 80 stitches, leaving exactly 70 stitches!