Despite the widespread adoption ofk-mer-based methods in bioinformatics, a fundamental question persists: How to elucidate the structural transition of ak-mer set when the order switches tok′? Attaining a generalized answer has significant implications tok-mer-based methods where the influence ofkhave been empirically analyzed (eg. in areas of assembly, genome comparison, etc.).We unravel the problem with a principle:k-mers andk′-mers can be grouped by their co-occurrences, and those in the same group behave similarly regardless of applications. This concept is embodied in a model, the Prokrustean graph, which embraces all similarity information of a given sequence set and has a channel to accessk-mers of anyk. This gives us a theoretical framework in which we can understand the presence and frequency ofk-mers askchanges.Practically, a Prokrustean graph is a space efficient data structure that can quickly be queried to extract essentially arbitrary information regardingk-mers with time complexity independent ofk-mer size range. We provide a series of examples that perform in competitive time and space when compared to purpose-built tools that operate on a singlek, such as KMC and GGCAT. For example, with large read sets, we can count allk-mers fork= 30 … 150 in ≃ 30 seconds in comparison to KMC requiring ≃ 30 seconds for a singlek. Similarly, on long read sets, we can count all unitigs in ≃ 30 seconds for the entire rangek= 30 …50000, a task that is prohibitively burdensome for GGCAT.Our construction algorithm of Prokrustean graph utilizes an (extended) Burrows-Wheeler transform as input, is easily parallelizable, and operates inO(N) time whereNis the cumulative input sequence length. We provide theoretical justification that the size of a Prokrustean graph isO(N), and in practice, is significantly smaller thanN.All code and algorithms are publicly accessible at:https://github.com/KoslickiLab/prokrustean.