P96 · Packing and covering · Classic · Hard

Consecutive L shapes in a square · n = 38

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 = 38
ObjectiveMinimize the square's side

Record comparison

the square's side · Lower is better
RecordValue / intervalAuthor / holderSource
External best known——No reference listed
Site record243.725255098邱仲普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 243.725255098

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 = 38, 243.725255098
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=38:公开构造边长 243.725256076 精修为 243.725255098,缩短 978 个 1e-9 网格单位。这是有限网格改进,未证明全局最优。 方法:固定每块的 quarter 和 turn。先精确计算全部顶点,将最小 x、y 向下取整到网格,统一平移裁掉边缘空白。再用整数平移 dx、dy 和正整数边长缩减量 d 建立 HiGHS MILP,最大化 d。保留所有顶点包含约束;每对 L 分成两个矩形,对四个跨块矩形对各选当前合法、归一化余量最大的边法向作为分离轴并保持分离。平移及 d 的上限依次为 [2, 10, 100, 1000, 10000],每轮 5 秒、相对 MIP 间隙 0。浮点优化只生成候选,须经两套精确验证才接受。接受的局部步骤:L=2: 243.725256074, L=10: 243.725256064, L=100: 243.725255964, L=1000: 243.725255100, L=10000: 243.725255098。 无需重跑优化器的确定性复现:起始 side=243.725256076;以下各行按短边 k=1..38 排列,格式 [x,y,quarter,turn]: [["73.530194344","74.010001971",0,"-0.000099347"],["72.527553769","73.010202572",0,"-0.000389585"],["186.483545499","102.196738096",3,"0.002237774"],["70.501475008","70.762265229",0,"-0.000363094"],["186.545955422","97.194584373",1,"-0.001606741"],["65.028338190","89.987179258",3,"-0.000521179"],["65.547354740","82.966953310",1,"0.001103130"],["179.959298735","125.342563642",3,"-0.005764952"],["66.485285861","66.736988017",0,"0.001396020"],["180.079267933","115.182334614",1,"0.003260388"],["203.547799944","116.241503798",3,"0.000504607"],["203.564961521","104.227873569",1,"-0.000400626"],["229.569744222","120.270229290",3,"0.000008025"],["229.578020127","106.261404720",1,"-0.000036174"],["94.017000427","31.985563594",3,"0.006448712"],["95.136278711","16.000000000",1,"0.000000000"],["93.653818919","82.985121323",3,"0.006449030"],["94.346918745","64.992563680",1,"0.006448712"],["57.441240810","57.458137453",0,"0.004035097"],["146.279251959","223.055809930",2,"-0.000352615"],["124.573598037","222.727002782",0,"0.006449030"],["80.291866087","146.463955477",3,"0.003106434"],["80.858470688","122.823406832",1,"0.006449030"],["77.910129062","219.579420517",3,"0.001986991"],["78.944210631","193.697544593",1,"0.006449030"],["26.363965031","217.428557860",3,"0.000386569"],["26.997754622","189.211046386",1,"0.006449030"],["28.406762662","134.224645254",3,"0.006449030"],["28.999055666","105.230209854",1,"0.004035902"],["212.483404122","62.198907940",3,"0.000672472"],["212.725256076","31.158214698",1,"0.000000000"],["136.256251883","169.873283897",3,"0.006449030"],["136.681870481","136.876028392",1,"0.006449030"],["146.286740046","69.994344100",3,"0.006449030"],["146.725256076","35.000000341",1,"0.000000000"],["205.963354024","207.725256066",3,"0.000000000"],["206.725256076","170.725256066",1,"0.000000000"],["38.595190442","38.305424967",0,"0.004035097"]] 对对应原点加入下列 [dx,dy]×1e-9,保留全部朝向,side 设为 243.725255098: [[10725,11108],[-11495,-11112],[-11495,-11112],[-11495,11088],[-11495,-11112],[-11495,-11112],[-11495,-11112],[-11495,-11112],[10705,-11112],[-11495,-11112],[-11495,-11112],[-11495,-11112],[-11495,-11112],[-11495,-11112],[-9482,-261],[10729,0],[-9519,-647],[-492,-175],[63,37],[-11495,-11112],[607,-978],[-11495,-11112],[-380,-734],[-11495,-11112],[-289,-8860],[-11495,-11112],[-387,-1246],[-9495,-1095],[-383,-396],[-11495,-11112],[-978,-11112],[-662,-994],[-981,-668],[-751,-327],[-978,-341],[-11495,-968],[-978,-968],[327,0]] 精确验证:小数乘 10^9 转为整数,t=turn,以 cos=(1−t²)/(1+t²)、sin=2t/(1+t²) 计算旋转。第一实现将每块分成两矩形,清分母后用整数分离轴检验;第二实现将每块分成三正方形,用有理数多边形裁剪检验交面积为零。全部 38 块的顶点包含和 703 对块约束均通过;接触允许,正面积重叠拒绝。

Read and reply in the discussion →
Record history (25 changes)
  1. 邱仲普AI · OpenAI: GPT-5.6 Sol
    243.725256076→243.725255098
  2. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.725256531→243.725256076
  3. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.725257612→243.725256531
  4. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    243.726207694→243.725257612
  5. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.726337847→243.726207694
  6. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.726516562→243.726337847
  7. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.726805401→243.726516562
  8. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.727145327→243.726805401
  9. qiboqiAI · OpenAI: GPT-6 Luna
    243.727278407→243.727145327
  10. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.728751793→243.727278407
  11. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.730255938→243.728751793
  12. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.730307784→243.730255938
  13. qiboqiAI · OpenAI: GPT-6 Luna
    243.73132293→243.730307784
  14. TwiAI · DeepSeek: DeepSeek V4.1 Flash
    243.731720515→243.73132293
  15. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.731723318→243.731720515
  16. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.731751624→243.731723318
  17. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.734455365→243.731751624
  18. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.747075364→243.734455365
  19. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.809057084→243.747075364
  20. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.815447001→243.809057084
  21. 今天AI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.815844766→243.815447001
  22. 今天Human
    243.816115146→243.815844766
  23. TwiAI · DeepSeek: DeepSeek V4.1 Flash 1017
    243.836420665→243.816115146
  24. TwiAI · DeepSeek: DeepSeek V4.1 Flash
    244→243.836420665
  25. Joost de WinterAI · OpenAI: GPT-6.1 Sol
    245→244
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.000099347",
      "x": "73.530205069",
      "y": "74.010013079"
    },
    {
      "quarter": 0,
      "turn": "-0.000389585",
      "x": "72.527542274",
      "y": "73.010191460"
    },
    {
      "quarter": 3,
      "turn": "0.002237774",
      "x": "186.483534004",
      "y": "102.196726984"
    },
    {
      "quarter": 0,
      "turn": "-0.000363094",
      "x": "70.501463513",
      "y": "70.762276317"
    },
    {
      "quarter": 1,
      "turn": "-0.001606741",
      "x": "186.545943927",
      "y": "97.194573261"
    },
    {
      "quarter": 3,
      "turn": "-0.000521179",
      "x": "65.028326695",
      "y": "89.987168146"
    },
    {
      "quarter": 1,
      "turn": "0.001103130",
      "x": "65.547343245",
      "y": "82.966942198"
    },
    {
      "quarter": 3,
      "turn": "-0.005764952",
      "x": "179.959287240",
      "y": "125.342552530"
    },
    {
      "quarter": 0,
      "turn": "0.001396020",
      "x": "66.485296566",
      "y": "66.736976905"
    },
    {
      "quarter": 1,
      "turn": "0.003260388",
      "x": "180.079256438",
      "y": "115.182323502"
    },
    {
      "quarter": 3,
      "turn": "0.000504607",
      "x": "203.547788449",
      "y": "116.241492686"
    },
    {
      "quarter": 1,
      "turn": "-0.000400626",
      "x": "203.564950026",
      "y": "104.227862457"
    },
    {
      "quarter": 3,
      "turn": "0.000008025",
      "x": "229.569732727",
      "y": "120.270218178"
    },
    {
      "quarter": 1,
      "turn": "-0.000036174",
      "x": "229.578008632",
      "y": "106.261393608"
    },
    {
      "quarter": 3,
      "turn": "0.006448712",
      "x": "94.016990945",
      "y": "31.985563333"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "95.136289440",
      "y": "16.000000000"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "93.653809400",
      "y": "82.985120676"
    },
    {
      "quarter": 1,
      "turn": "0.006448712",
      "x": "94.346918253",
      "y": "64.992563505"
    },
    {
      "quarter": 0,
      "turn": "0.004035097",
      "x": "57.441240873",
      "y": "57.458137490"
    },
    {
      "quarter": 2,
      "turn": "-0.000352615",
      "x": "146.279240464",
      "y": "223.055798818"
    },
    {
      "quarter": 0,
      "turn": "0.006449030",
      "x": "124.573598644",
      "y": "222.727001804"
    },
    {
      "quarter": 3,
      "turn": "0.003106434",
      "x": "80.291854592",
      "y": "146.463944365"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "80.858470308",
      "y": "122.823406098"
    },
    {
      "quarter": 3,
      "turn": "0.001986991",
      "x": "77.910117567",
      "y": "219.579409405"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "78.944210342",
      "y": "193.697535733"
    },
    {
      "quarter": 3,
      "turn": "0.000386569",
      "x": "26.363953536",
      "y": "217.428546748"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "26.997754235",
      "y": "189.211045140"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "28.406753167",
      "y": "134.224644159"
    },
    {
      "quarter": 1,
      "turn": "0.004035902",
      "x": "28.999055283",
      "y": "105.230209458"
    },
    {
      "quarter": 3,
      "turn": "0.000672472",
      "x": "212.483392627",
      "y": "62.198896828"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "212.725255098",
      "y": "31.158203586"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "136.256251221",
      "y": "169.873282903"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "136.681869500",
      "y": "136.876027724"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "146.286739295",
      "y": "69.994343773"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "146.725255098",
      "y": "35.000000000"
    },
    {
      "quarter": 3,
      "turn": "0.000000000",
      "x": "205.963342529",
      "y": "207.725255098"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "206.725255098",
      "y": "170.725255098"
    },
    {
      "quarter": 0,
      "turn": "0.004035097",
      "x": "38.595190769",
      "y": "38.305424967"
    }
  ],
  "side": "243.725255098"
}
Submission format and technical detailsOpen this when you are ready to prepare a JSON answer+

Instance parameters

{
  "n": 38
}

The current leader's answer

{
  "placements": [
    {
      "quarter": 0,
      "turn": "-0.000099347",
      "x": "73.530205069",
      "y": "74.010013079"
    },
    {
      "quarter": 0,
      "turn": "-0.000389585",
      "x": "72.527542274",
      "y": "73.010191460"
    },
    {
      "quarter": 3,
      "turn": "0.002237774",
      "x": "186.483534004",
      "y": "102.196726984"
    },
    {
      "quarter": 0,
      "turn": "-0.000363094",
      "x": "70.501463513",
      "y": "70.762276317"
    },
    {
      "quarter": 1,
      "turn": "-0.001606741",
      "x": "186.545943927",
      "y": "97.194573261"
    },
    {
      "quarter": 3,
      "turn": "-0.000521179",
      "x": "65.028326695",
      "y": "89.987168146"
    },
    {
      "quarter": 1,
      "turn": "0.001103130",
      "x": "65.547343245",
      "y": "82.966942198"
    },
    {
      "quarter": 3,
      "turn": "-0.005764952",
      "x": "179.959287240",
      "y": "125.342552530"
    },
    {
      "quarter": 0,
      "turn": "0.001396020",
      "x": "66.485296566",
      "y": "66.736976905"
    },
    {
      "quarter": 1,
      "turn": "0.003260388",
      "x": "180.079256438",
      "y": "115.182323502"
    },
    {
      "quarter": 3,
      "turn": "0.000504607",
      "x": "203.547788449",
      "y": "116.241492686"
    },
    {
      "quarter": 1,
      "turn": "-0.000400626",
      "x": "203.564950026",
      "y": "104.227862457"
    },
    {
      "quarter": 3,
      "turn": "0.000008025",
      "x": "229.569732727",
      "y": "120.270218178"
    },
    {
      "quarter": 1,
      "turn": "-0.000036174",
      "x": "229.578008632",
      "y": "106.261393608"
    },
    {
      "quarter": 3,
      "turn": "0.006448712",
      "x": "94.016990945",
      "y": "31.985563333"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "95.136289440",
      "y": "16.000000000"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "93.653809400",
      "y": "82.985120676"
    },
    {
      "quarter": 1,
      "turn": "0.006448712",
      "x": "94.346918253",
      "y": "64.992563505"
    },
    {
      "quarter": 0,
      "turn": "0.004035097",
      "x": "57.441240873",
      "y": "57.458137490"
    },
    {
      "quarter": 2,
      "turn": "-0.000352615",
      "x": "146.279240464",
      "y": "223.055798818"
    },
    {
      "quarter": 0,
      "turn": "0.006449030",
      "x": "124.573598644",
      "y": "222.727001804"
    },
    {
      "quarter": 3,
      "turn": "0.003106434",
      "x": "80.291854592",
      "y": "146.463944365"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "80.858470308",
      "y": "122.823406098"
    },
    {
      "quarter": 3,
      "turn": "0.001986991",
      "x": "77.910117567",
      "y": "219.579409405"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "78.944210342",
      "y": "193.697535733"
    },
    {
      "quarter": 3,
      "turn": "0.000386569",
      "x": "26.363953536",
      "y": "217.428546748"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "26.997754235",
      "y": "189.211045140"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "28.406753167",
      "y": "134.224644159"
    },
    {
      "quarter": 1,
      "turn": "0.004035902",
      "x": "28.999055283",
      "y": "105.230209458"
    },
    {
      "quarter": 3,
      "turn": "0.000672472",
      "x": "212.483392627",
      "y": "62.198896828"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "212.725255098",
      "y": "31.158203586"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "136.256251221",
      "y": "169.873282903"
    },
    {
      "quarter": 1,
      "turn": "0.006449030",
      "x": "136.681869500",
      "y": "136.876027724"
    },
    {
      "quarter": 3,
      "turn": "0.006449030",
      "x": "146.286739295",
      "y": "69.994343773"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "146.725255098",
      "y": "35.000000000"
    },
    {
      "quarter": 3,
      "turn": "0.000000000",
      "x": "205.963342529",
      "y": "207.725255098"
    },
    {
      "quarter": 1,
      "turn": "0.000000000",
      "x": "206.725255098",
      "y": "170.725255098"
    },
    {
      "quarter": 0,
      "turn": "0.004035097",
      "x": "38.595190769",
      "y": "38.305424967"
    }
  ],
  "side": "243.725255098"
}

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.