Prices and Safe Cuts
Это содержимое пока не доступно на вашем языке.
Both Opal routes for “key” finish on the same key. If the cost model charges for changing hands, that last press costs more after Magic than after the ordinary “e” key. Keymaxx uses recent events to price a route and shares the work when routes leave the same conditions for continuing.
Prices and Recent Events
Section titled “Prices and Recent Events”A model that charges one per press and two per hand change gives the ordinary route a cost of three. The Magic route costs seven: three for its presses, two for moving to Magic, and two for moving back to “y”. At the written position after “ke”, the two routes have the same final key left to press but a different price for pressing it.
Keymaxx adds the event’s own cost, the cost of its pair with the previous event, and the cost of the triple ending there. A triple penalty could distinguish the two complete routes as well.
In the three-event pricing mode, the state keeps the last two priced events, enough to compute the next event’s pair and triple. A model with event prices alone needs none of that additional pricing history. Presses, acquisitions, and releases can all contribute. Layout history is separate: even with one unit per event, the decoder still needs the earlier press that can license Skip Magic.
Synchronization
Section titled “Synchronization”A safe place to price two parts independently is where every legal path that can finish the sequence reaches the same full state. The paths must agree on the conditions that can affect later steps: typed-text context, layer and hold state, pending actions, and the recent events needed for pricing. They must all visit that position. For a position with alternate fingerings, the proof fixes the incoming assigned events used for pricing. It places no cut while an assignment declaration or a release witness is unresolved. These conditions make it safe to reuse the following factor: each incoming route hands it the same start state and pricing context for any given continuation.
Keymaxx calls this a synchronizing position. It can occur inside a word, and several such positions can share a written offset when physical events advance no text. If no interior position satisfies the proof, the remaining search stays together.
On Afterburner, the “t” of “the” can come from the letter key or Skip Magic. Immediately after that “t”, the physical histories differ. In this example both routes then use the ordinary keys for “he”. At the end of “the”, their last two events and the rest of their state agree. A cut there can share the continuation. The analyzer still remembers enough across the following space to make the next Skip Magic available.
Types at the end
After “h”, the two most recent events on each route still include its different way to type “t”. After “e”, both routes carry the same pair of events: H followed by E.
Which Paths Reach the Cut
Section titled “Which Paths Reach the Cut”A one-press output can bypass a boundary the ordinary route visits. In Magic Sturdy, the Magic key after a comma sends “ but”. In “no, but why?”, the ordinary route visits the position after “bu”. The Magic press crosses it in one event.
Types no, but why?
Inside “but”, the written position the routes share is after the whole word. That gives a candidate to check. A three-event price reads two recent events there: U and T on the letter route, Comma and Magic on the macro route. This position fails the price-history check even though both routes visit it.
For each word, Keymaxx starts with one completing path and marks its possible cuts. Each mark identifies a boundary between physical events, including its written offset, decoder state, and written suffix state. Every common mark has to be on this first path. A step adds only the marks that every completing physical way through it visits; a join keeps the marks shared by all incoming completing paths. It intersects the surviving marks at the applicable exits and checks that recent pricing events also agree. Past a word’s separator, the proof checks the entries that continue beyond that separator. The graph lets it perform these checks once per reached state and edge without writing down every complete route.
Factors
Section titled “Factors”The portions between consecutive synchronizing positions are factors. At an interior cut, both neighboring factors meet at a fixed state, so their cheapest completions combine. At the true end, a sequence can have several legal final states. Each distinct complete route is a combination of the tied local alternatives. Events needed to finish the left factor belong to it, with their prices accounted for once. Keymaxx also has a reference route that prices whole sequences before recovering the canonical factor spans. It checks that the split search finds the same optimum and retains the same ties.
The Afterburner paths for “at the end” and “cut the end” can reach the same certified state after “the”. The next matching span between certified cuts has the same spelling and start conditions, so its solved graph can serve both. The source spans keep their own occurrence weights. If “at the end” has two occurrences and “cut the end” one, they contribute three uses of that value.
Tied Paths
Section titled “Tied Paths”With the earlier Opal hand-change prices, both prefixes after “e” have the same written offset and the same next Y press. The priced graph keeps their recent events separate: K, E costs two and K, Magic costs four. Each is a cheapest arrival at its own priced state. Adding Y costs one after E and three after Magic, so the paths finish at three and seven.
Keymaxx keeps the cheapest arrival at each state. An edge is tight if it reaches its own target at that target’s cheapest cost. Both final Opal edges can be tight because they reach separate endpoints. The backward walk begins only at the cheapest accepting state, the cost-three endpoint. If several accepting states tie for that cost, it begins at all of them. Walking tight edges from those endpoints keeps exactly the minimum routes.
The forward pass visits each state after its predecessors. Event, pair, and triple costs are prepared in lookup tables, so repeated applications of an edge price reuse the same indexed value.
Afterburner’s “at the gym” shows why a cut must leave both ties available. The “t” in “the” can come from the left-hand letter key or the right-hand Skip Magic key. Both routes take one event per character. After “he” their last two events and decoder state agree.
Types at the gym
On “at the” alone, the ordinary route is balanced at three presses per hand. The Skip Magic route has two left and four right. The shared continuation uses the right hand for Space and the left hand for “gym”. The ordinary route now has six left and four right, while the Skip Magic route has five per hand. The choice that balanced the first part no longer balances the phrase.
Hand balance here would add a preference the press-count cost never expressed. Picking a local winner would narrow the analysis. Keymaxx keeps both optima and gives the whole set a canonical form. Moving a valid cut changes the work, not the answer.
Shared Tied Suffixes
Section titled “Shared Tied Suffixes”On Afterburner, “brrr” begins with the ordinary B and R presses. The last two letters can each come from the ordinary letter or Repeat. With one unit per event all four routes tie. The two ways to reach “brr” leave the same choices for the last letter, so their suffixes share one node.
Start with one completion at the terminal. The two last-letter edges each reach it, giving two completions before the final letter. Each earlier edge allows those same two completions, giving four routes after “br” and a quarter share to each. The graph that shares equal remaining streams is the factor’s minimal deterministic acyclic value automaton.
What Counts as a Route
Section titled “What Counts as a Route”An aligned stream includes its physical events, their written advances, and any transient text. Two internal ways of discovering the same stream count once. Different transient text can distinguish streams that ultimately type the same text with the same physical events.
Every extra physical event has a positive price. One optimal stream cannot be a shorter prefix of another optimal stream; their common terminal can therefore mark the end of every optimal path.