Top Trading Cycles
The ability to compute and run the top trading cycles algorithm in finding a stable allocation.
Question template
A few neighbours swap sports gear using the Top Trading Cycles algorithm. Each owns one item and ranks all the items, best first: preferences Which item does who end up with after running Top Trading Cycles?
Use it
from datasets import load_dataset
ds = load_dataset("narunraman/steer", "top_trading")curl "https://steer-benchmark.cs.ubc.ca/api/sample?element_name=top_trading&n=5&seed=42"
See the Reference for the parameters.