← Back to directory

For 0 to 5 labels starting at zero, construct the whole Steinhaus-Johnson-Trotte...

https://datenvertrag.halowerk.com/v1/adjacent-swap-permutation-tour

Overview

For 0 to 5 labels starting at zero, construct the whole Steinhaus-Johnson-Trotter permutation tour from identity. Each transition swaps the largest mobile value with its adjacent smaller neighbor, then reverses directions of greater values. Own direction convention stores -1 or +1 by value, initially all -1; blocked values retain direction. Return every permutation, direction vector, incoming pair of zero-based adjacent positions and moved value.

Protocol x402 (POST)
Price $0.0030
Payment Asset USD Coin
Payment Network eip155:8453
Category crypto/defi
Provider datenvertrag
Source bazaar
Indexed 2026-11-19 16:09:27

Health

Status unknown
Latency (p50) —
Uptime (30d) —
Reliability Score —
Last Checked Never
Last Healthy Never
Consecutive Failures 0

x402 Payment Validation

Payment Requirements —
Asset Verified —
Facilitator —

Input Schema

{ "body": { "claimed_permutations": [ [ 0, 1, 2 ], [ 0, 2, 1 ], [ 2, 0, 1 ], [ 2, 1, 0 ], [ 1, 2, 0 ], [ 1, 0, 2 ] ], "size": 3 }, "bodyType": "json", "method": "POST", "type": "http" }

Output Schema

{ "example": { "data": { "state": "observed", "value": { "claimed_matches": true, "closing_swap": [ 0, 1 ], "complete": true, "missing": [], "permutation_count": 6, "states": [ { "directions_by_value": [ -1, -1, -1 ], "incoming_swap": null, "moved_value": null, "permutation": [ 0, 1, 2 ] }, { "directions_by_value": [ -1, -1, -1 ], "incoming_swap": [ 1, 2 ], "moved_value": 2, "permutation": [ 0, 2, 1 ] }, { "directions_by_value": [ -1, -1, -1 ], "incoming_swap": [ 0, 1 ], "moved_value": 2, "permutation": [ 2, 0, 1 ] }, { "directions_by_value": [ -1, -1, 1 ], "incoming_swap": [ 1, 2 ], "moved_value": 1, "permutation": [ 2, 1, 0 ] }, { "directions_by_value": [ -1, -1, 1 ], "incoming_swap": [ 0, 1 ], "moved_value": 2, "permutation": [ 1, 2, 0 ] }, { "directions_by_value": [ -1, -1, 1 ], "incoming_swap": [ 1, 2 ], "moved_value": 2, "permutation": [ 1, 0, 2 ] } ] } } }, "type": "json" }