Shared workspace layout and memory invariants for Word-RAM auction #
Internal workspace layout record (AuctionWS), its 10-word faithful word_enc_structure encoding,
and the two shared memory invariants connecting Word-RAM state to pure AuctionState:
Cslib.Algorithms.WordRAM.Auction.AuctionWS: parameters and base addresses (bC,bOwner,bPrice,bStack,outBase).Cslib.Algorithms.WordRAM.Auction.AuctionMem: representation predicate pairing aMemory.Statewith an unsigned cost matrixCand pureAuctionState ws.n.Cslib.Algorithms.WordRAM.Auction.ValidWS: layout contiguity and frontier invariant.
Main definitions #
Cslib.Algorithms.WordRAM.Auction.AuctionWS,Cslib.Algorithms.WordRAM.Auction.encAuctionWS: workspace record and 10-word encoding.Cslib.Algorithms.WordRAM.Auction.AuctionMem,Cslib.Algorithms.WordRAM.Auction.ValidWS: shared memory-representation and layout-validity predicates.
Main results #
Cslib.Algorithms.WordRAM.Auction.ValidWS.of_frontier_eq: transportValidWSacross frontier-preserving steps.Cslib.Algorithms.WordRAM.Auction.AuctionMem.redCost_read: shared reduced-cost readout and range bound used by both row scans inAuction.RowScan.
Workspace layout and parameters for the memory-client auction solver.
- n : ℕ
Common number of persons and objects.
- eps : ℕ
Positive bidding increment
ε. - scale : ℕ
Cost scaling factor (
1orn + 1). - M : ℕ
Scanned entry magnitude bound
M. - matBase : ℕ
Start address of encoded input matrix (
3or2). - bC : ℕ
- bOwner : ℕ
- bPrice : ℕ
Base address of nonnegative integer prices
price[0..n). - bStack : ℕ
Base address of reversed unassigned-person stack
stack[0..n). - outBase : ℕ
Base address of length-prefixed output list (
n + 1cells).
Instances For
Registered WordEncoding for AuctionWS.
Memory s represents pure st : AuctionState ws.n over unsigned cost matrix C at ws.
Disjointness and frontier validity of ws : AuctionWS.
pricebegins immediately afterowner.stackbegins immediately afterprice.Length-prefixed output array begins immediately after
stack.Allocated frontier covers the entire output buffer (
n + 1words).
Reading C[i₀, j] and price[j] in memory computes
redCost (fun e => (C e : ℤ)) st.price i₀ j and stays bounded by 2 * W + ws.eps. Shared by
both row scans in Auction.RowScan.