P96 · Packing and covering · Classic · Hard

Consecutive L shapes in a square · n = 39

Pack n L shapes with short sides 1, 2, …, n into a square without overlap. Each L consists of three equal squares. Translate and rotate the pieces freely to minimise the container side.

Instancen = 39
ObjectiveMinimize the square's side

Record comparison

the square's side · Lower is better
RecordValue / intervalAuthor / holderSource
External best known——No reference listed
Site record252.965666079邱仲普Record details ↓

Formal definition

  • ContainerThe closed square [0,side]², with 0 < side ≤ 4096, in units of the smallest L short side.
  • SubmissionPiece k has local vertices (−k,−k), (k,−k), (k,0), (0,0), (0,k), (−k,k). Its translated origin is (x,y).
  • RotationRotation is free, not restricted to multiples of 90°. Exact quarter turns and a rational half-angle parameter encode it. Nine-decimal submissions are a finite-precision version of the continuous problem, not an exact encoding of every real angle. Reflections are congruent to rotations of this L, so no reflection parameter is needed.
  • ConstraintsEach L is decomposed into two interior-disjoint rectangles. Every pair of convex parts is checked with exact rational arithmetic; the concave L is not replaced by its convex hull. Contact is legal, positive-area overlap is rejected.
  • ObjectiveMinimise the square side. The public score is the source table’s s, with no conversion.S=side
Open full editor ↗

Layout shown: site record

VERIFIED CONSTRUCTIONsquare side 252.965666079

Getting a feel for it

Area bound

The total area is 3∑k² = n(n+1)(2n+1)/2, a lower bound on side². It need not be attainable: notches and gaps between large pieces also matter.

Published records

Friedman’s table covers n=1–20, with values and original authors cited. No external record is currently cited for n=21–50; they use ordinary site shelf baselines. Instances n=1 and 2 are proved optimal; the others remain open.

Source
The record-holding arrangement for Consecutive L shapes in a square n = 39, 252.965666079
LAYOUT & HISTORY

Record details

Inspect the layout, solver notes and record history.

Record holder邱仲普
Solution methodAI · OpenAI: GPT-5.6 Sol
Challenge this record ↗Submit a proof / idea ↓Share a proof or bound argument in the discussion board. Accepted contributions earn proof points.
Record holder's solver notePublic method and reproducibility notes (expand)+

P96 n=39:公开构造边长 252.965666104 精修为 252.965666079,缩短 25 个 1e-9 网格单位。这是有限网格改进,未证明全局最优。 方法:固定每块的 quarter 和 turn。先精确计算全部顶点,将最小 x、y 向下取整到网格,统一平移裁掉边缘空白。再用整数平移 dx、dy 和正整数边长缩减量 d 建立 HiGHS MILP,最大化 d。保留所有顶点包含约束;每对 L 分成两个矩形,对四个跨块矩形对各选当前合法、归一化余量最大的边法向作为分离轴并保持分离。平移及 d 的上限依次为 [2, 10, 100, 1000, 10000, 100000],每轮 5 秒、相对 MIP 间隙 0。浮点优化只生成候选,须经两套精确验证才接受。接受的局部步骤:L=2: 252.965666092, L=10: 252.965666082, L=100: 252.965666079。 无需重跑优化器的确定性复现:起始 side=252.965666104;以下各行按短边 k=1..39 排列,格式 [x,y,quarter,turn]: [["75.070290406","143.028081849",0,"-0.014177759"],["74.042021413","142.015755489",0,"-0.003908431"],["80.949482499","189.247392612",0,"-0.011151712"],["198.685751077","236.029171046",3,"-0.004112156"],["72.026392315","140.011625474",0,"-0.001430317"],["199.708708328","230.011024727",1,"-0.002489947"],["186.880411586","231.841670111",1,"-0.062794376"],["187.671602973","240.729923046",3,"-0.042300050"],["67.012093690","135.008356951",0,"-0.000452977"],["88.915476586","176.638206647",3,"0.050303845"],["89.923747708","165.734534950",1,"0.002480532"],["190.999085396","212.026090630",3,"-0.001318410"],["191.965666094","198.994448841",1,"0.000000000"],["130.879315589","174.792350478",2,"0.002480532"],["115.903583622","169.863472596",0,"0.002480532"],["236.965666098","164.039967782",2,"0.000000000"],["219.965889176","164.045089668",0,"-0.002561500"],["184.985503376","167.963372801",2,"-0.002561500"],["58.003941187","126.003941191",0,"-0.000103726"],["164.985765821","168.065832124",0,"-0.002561500"],["123.926859266","44.000000008",3,"0.000000000"],["123.926859270","22.000000004",1,"0.000000000"],["228.722481101","229.176566798",3,"-0.001182771"],["228.965666098","205.122159405",1,"0.000000000"],["52.557516275","171.987563960",2,"-0.011151712"],["26.000000004","172.000000012",0,"0.000000000"],["27.525432832","224.975230035",0,"-0.009827758"],["56.009838101","224.917802193",2,"-0.000855445"],["108.454720187","125.825976606",3,"0.002480532"],["108.940925290","95.844851745",1,"-0.014270360"],["148.003023826","220.856216057",2,"-0.000855445"],["116.003070656","220.910964492",0,"-0.000855445"],["68.985281374","33.970569330",2,"-0.014931834"],["34.000000004","34.000000004",0,"0.000000000"],["217.965287680","36.000378428",2,"0.000005406"],["181.926859274","36.000000004",0,"0.000000000"],["215.858164987","109.999854368",2,"-0.000992008"],["177.784756463","110.000000008",0,"0.000000000"],["39.000000004","107.000000008",0,"0.000000000"]] 对对应原点加入下列 [dx,dy]×1e-9,保留全部朝向,side 设为 252.965666079: [[108,-116],[104,108],[-5,108],[103,104],[-14,-18],[107,107],[106,107],[102,108],[-10,-15],[5,107],[1,103],[103,87],[-16,83],[-5,-17],[-2,103],[-19,104],[-15,87],[-12,84],[-7,-11],[-8,87],[108,-8],[104,-4],[108,108],[-19,104],[-8,-16],[-4,-12],[-97,-14],[-5,-19],[105,103],[101,-14],[-13,-23],[-9,-20],[-6,-7],[-4,-4],[-116,104],[104,-4],[104,-10],[103,-8],[-4,-8]] 精确验证:小数乘 10^9 转为整数,t=turn,以 cos=(1−t²)/(1+t²)、sin=2t/(1+t²) 计算旋转。第一实现将每块分成两矩形,清分母后用整数分离轴检验;第二实现将每块分成三正方形,用有理数多边形裁剪检验交面积为零。全部 39 块的顶点包含和 741 对块约束均通过;接触允许,正面积重叠拒绝。

Read and reply in the discussion →
Record history (11 changes)
  1. 邱仲普AI · OpenAI: GPT-5.6 Sol
    252.965666104→252.965666079
  2. Joost de WinterAI · OpenAI: GPT Chat Latest
    252.965715645→252.965666104
  3. 邱仲普AI · OpenAI: GPT-5.6 Sol
    252.965715662→252.965715645
  4. Joost de WinterAI · Anthropic: Claude Fable 5.2
    253→252.965715662
  5. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    254→253
  6. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    255→254
  7. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    256→255
  8. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    260→256
  9. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    261→260
  10. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    266→261
  11. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    323→266
ANSWER FORMAT

How to write your answer

Coordinates, short sides and container side share one unit. Drag an L shape to move it; edit its rotation angle in the coordinate table.

Submit side and placements. Entry k is the L with short side k, written {"x":"…","y":"…","quarter":0,"turn":"0"}. (x,y) is its bounding-box centre and concave corner. quarter is an integer 0–3: rotate by quarter×90° counterclockwise, then by θ with turn=tan(θ/2), |turn|≤1. Other values are decimal strings with at most nine places.

The current leader's answer

{
  "placements": [
    {
      "quarter": 0,
      "turn": "-0.014177759",
      "x": "75.070290514",
      "y": "143.028081733"
    },
    {
      "quarter": 0,
      "turn": "-0.003908431",
      "x": "74.042021517",
      "y": "142.015755597"
    },
    {
      "quarter": 0,
      "turn": "-0.011151712",
      "x": "80.949482494",
      "y": "189.247392720"
    },
    {
      "quarter": 3,
      "turn": "-0.004112156",
      "x": "198.685751180",
      "y": "236.029171150"
    },
    {
      "quarter": 0,
      "turn": "-0.001430317",
      "x": "72.026392301",
      "y": "140.011625456"
    },
    {
      "quarter": 1,
      "turn": "-0.002489947",
      "x": "199.708708435",
      "y": "230.011024834"
    },
    {
      "quarter": 1,
      "turn": "-0.062794376",
      "x": "186.880411692",
      "y": "231.841670218"
    },
    {
      "quarter": 3,
      "turn": "-0.042300050",
      "x": "187.671603075",
      "y": "240.729923154"
    },
    {
      "quarter": 0,
      "turn": "-0.000452977",
      "x": "67.012093680",
      "y": "135.008356936"
    },
    {
      "quarter": 3,
      "turn": "0.050303845",
      "x": "88.915476591",
      "y": "176.638206754"
    },
    {
      "quarter": 1,
      "turn": "0.002480532",
      "x": "89.923747709",
      "y": "165.734535053"
    },
    {
      "quarter": 3,
      "turn": "-0.001318410",
      "x": "190.999085499",
      "y": "212.026090717"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "191.965666078",
      "y": "198.994448924"
    },
    {
      "quarter": 2,
      "turn": "0.002480532",
      "x": "130.879315584",
      "y": "174.792350461"
    },
    {
      "quarter": 0,
      "turn": "0.002480532",
      "x": "115.903583620",
      "y": "169.863472699"
    },
    {
      "quarter": 2,
      "turn": "0.000000000",
      "x": "236.965666079",
      "y": "164.039967886"
    },
    {
      "quarter": 0,
      "turn": "-0.002561500",
      "x": "219.965889161",
      "y": "164.045089755"
    },
    {
      "quarter": 2,
      "turn": "-0.002561500",
      "x": "184.985503364",
      "y": "167.963372885"
    },
    {
      "quarter": 0,
      "turn": "-0.000103726",
      "x": "58.003941180",
      "y": "126.003941180"
    },
    {
      "quarter": 0,
      "turn": "-0.002561500",
      "x": "164.985765813",
      "y": "168.065832211"
    },
    {
      "quarter": 3,
      "turn": "0.000000000",
      "x": "123.926859374",
      "y": "44.000000000"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "123.926859374",
      "y": "22.000000000"
    },
    {
      "quarter": 3,
      "turn": "-0.001182771",
      "x": "228.722481209",
      "y": "229.176566906"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "228.965666079",
      "y": "205.122159509"
    },
    {
      "quarter": 2,
      "turn": "-0.011151712",
      "x": "52.557516267",
      "y": "171.987563944"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "26.000000000",
      "y": "172.000000000"
    },
    {
      "quarter": 0,
      "turn": "-0.009827758",
      "x": "27.525432735",
      "y": "224.975230021"
    },
    {
      "quarter": 2,
      "turn": "-0.000855445",
      "x": "56.009838096",
      "y": "224.917802174"
    },
    {
      "quarter": 3,
      "turn": "0.002480532",
      "x": "108.454720292",
      "y": "125.825976709"
    },
    {
      "quarter": 1,
      "turn": "-0.014270360",
      "x": "108.940925391",
      "y": "95.844851731"
    },
    {
      "quarter": 2,
      "turn": "-0.000855445",
      "x": "148.003023813",
      "y": "220.856216034"
    },
    {
      "quarter": 0,
      "turn": "-0.000855445",
      "x": "116.003070647",
      "y": "220.910964472"
    },
    {
      "quarter": 2,
      "turn": "-0.014931834",
      "x": "68.985281368",
      "y": "33.970569323"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "34.000000000",
      "y": "34.000000000"
    },
    {
      "quarter": 2,
      "turn": "0.000005406",
      "x": "217.965287564",
      "y": "36.000378532"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "181.926859378",
      "y": "36.000000000"
    },
    {
      "quarter": 2,
      "turn": "-0.000992008",
      "x": "215.858165091",
      "y": "109.999854358"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "177.784756566",
      "y": "110.000000000"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "39.000000000",
      "y": "107.000000000"
    }
  ],
  "side": "252.965666079"
}
Submission format and technical detailsOpen this when you are ready to prepare a JSON answer+

Instance parameters

{
  "n": 39
}

The current leader's answer

{
  "placements": [
    {
      "quarter": 0,
      "turn": "-0.014177759",
      "x": "75.070290514",
      "y": "143.028081733"
    },
    {
      "quarter": 0,
      "turn": "-0.003908431",
      "x": "74.042021517",
      "y": "142.015755597"
    },
    {
      "quarter": 0,
      "turn": "-0.011151712",
      "x": "80.949482494",
      "y": "189.247392720"
    },
    {
      "quarter": 3,
      "turn": "-0.004112156",
      "x": "198.685751180",
      "y": "236.029171150"
    },
    {
      "quarter": 0,
      "turn": "-0.001430317",
      "x": "72.026392301",
      "y": "140.011625456"
    },
    {
      "quarter": 1,
      "turn": "-0.002489947",
      "x": "199.708708435",
      "y": "230.011024834"
    },
    {
      "quarter": 1,
      "turn": "-0.062794376",
      "x": "186.880411692",
      "y": "231.841670218"
    },
    {
      "quarter": 3,
      "turn": "-0.042300050",
      "x": "187.671603075",
      "y": "240.729923154"
    },
    {
      "quarter": 0,
      "turn": "-0.000452977",
      "x": "67.012093680",
      "y": "135.008356936"
    },
    {
      "quarter": 3,
      "turn": "0.050303845",
      "x": "88.915476591",
      "y": "176.638206754"
    },
    {
      "quarter": 1,
      "turn": "0.002480532",
      "x": "89.923747709",
      "y": "165.734535053"
    },
    {
      "quarter": 3,
      "turn": "-0.001318410",
      "x": "190.999085499",
      "y": "212.026090717"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "191.965666078",
      "y": "198.994448924"
    },
    {
      "quarter": 2,
      "turn": "0.002480532",
      "x": "130.879315584",
      "y": "174.792350461"
    },
    {
      "quarter": 0,
      "turn": "0.002480532",
      "x": "115.903583620",
      "y": "169.863472699"
    },
    {
      "quarter": 2,
      "turn": "0.000000000",
      "x": "236.965666079",
      "y": "164.039967886"
    },
    {
      "quarter": 0,
      "turn": "-0.002561500",
      "x": "219.965889161",
      "y": "164.045089755"
    },
    {
      "quarter": 2,
      "turn": "-0.002561500",
      "x": "184.985503364",
      "y": "167.963372885"
    },
    {
      "quarter": 0,
      "turn": "-0.000103726",
      "x": "58.003941180",
      "y": "126.003941180"
    },
    {
      "quarter": 0,
      "turn": "-0.002561500",
      "x": "164.985765813",
      "y": "168.065832211"
    },
    {
      "quarter": 3,
      "turn": "0.000000000",
      "x": "123.926859374",
      "y": "44.000000000"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "123.926859374",
      "y": "22.000000000"
    },
    {
      "quarter": 3,
      "turn": "-0.001182771",
      "x": "228.722481209",
      "y": "229.176566906"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "228.965666079",
      "y": "205.122159509"
    },
    {
      "quarter": 2,
      "turn": "-0.011151712",
      "x": "52.557516267",
      "y": "171.987563944"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "26.000000000",
      "y": "172.000000000"
    },
    {
      "quarter": 0,
      "turn": "-0.009827758",
      "x": "27.525432735",
      "y": "224.975230021"
    },
    {
      "quarter": 2,
      "turn": "-0.000855445",
      "x": "56.009838096",
      "y": "224.917802174"
    },
    {
      "quarter": 3,
      "turn": "0.002480532",
      "x": "108.454720292",
      "y": "125.825976709"
    },
    {
      "quarter": 1,
      "turn": "-0.014270360",
      "x": "108.940925391",
      "y": "95.844851731"
    },
    {
      "quarter": 2,
      "turn": "-0.000855445",
      "x": "148.003023813",
      "y": "220.856216034"
    },
    {
      "quarter": 0,
      "turn": "-0.000855445",
      "x": "116.003070647",
      "y": "220.910964472"
    },
    {
      "quarter": 2,
      "turn": "-0.014931834",
      "x": "68.985281368",
      "y": "33.970569323"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "34.000000000",
      "y": "34.000000000"
    },
    {
      "quarter": 2,
      "turn": "0.000005406",
      "x": "217.965287564",
      "y": "36.000378532"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "181.926859378",
      "y": "36.000000000"
    },
    {
      "quarter": 2,
      "turn": "-0.000992008",
      "x": "215.858165091",
      "y": "109.999854358"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "177.784756566",
      "y": "110.000000000"
    },
    {
      "quarter": 0,
      "turn": "0.000000000",
      "x": "39.000000000",
      "y": "107.000000000"
    }
  ],
  "side": "252.965666079"
}

Submit side and placements. Entry k is the L with short side k, written {"x":"…","y":"…","quarter":0,"turn":"0"}. (x,y) is its bounding-box centre and concave corner. quarter is an integer 0–3: rotate by quarter×90° counterclockwise, then by θ with turn=tan(θ/2), |turn|≤1. Other values are decimal strings with at most nine places. · Verifier v1.0.0

DISCUSSION

Discussion

Discuss strategies, share construction methods, or ask questions. Any signed-in user can post under their public byline and unique #UID. New posts appear after moderation.