The five-dimensional Watson integral
Find a closed form for the five-dimensional Watson integral W5 ≈ 0.2312616250, which fixes the return probability of a random walk on Z^5.

+1 −0 cover.svg added View file
| @@ -0,0 +1 @@ | ||
| 1 | +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 304" role="img"><title>walks on Z⁵, distance from home · ~0.135 return</title><style>svg{--ink:#1f1f1f;--ink2:#3c4043;--faint:#9aa0a6;--line:#dadce0;--sand:#b8862c;--bg:#ffffff;--muted:#5f6368;--f:#129d96}@media (prefers-color-scheme: dark){svg{--ink:#e8eaed;--ink2:#c4c7c5;--faint:#6f7479;--line:#3c4043;--sand:#d9b26a;--bg:#1f2023;--muted:#9aa0a6;--f:#5fd0c8}}.ink{fill:var(--ink)}.ink-s{stroke:var(--ink);fill:none}.ink2-s{stroke:var(--ink2);fill:none}.f{fill:var(--f)}.f-s{stroke:var(--f);fill:none}.f-soft{fill:var(--f);fill-opacity:.14}.sand{fill:var(--sand)}.sand-s{stroke:var(--sand);fill:none}.faint{fill:var(--faint)}.faint-s{stroke:var(--faint);fill:none}.ring{stroke:var(--bg);stroke-width:3}.bg{fill:var(--bg)}.soft{fill-opacity:.16}.lbl{fill:var(--muted);font:400 19px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}line,path,polyline{stroke-linecap:round;stroke-linejoin:round}</style><line class="faint-s" x1="40" y1="250" x2="600" y2="250" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,183.4 117.8,159.9 133.3,164.1 148.9,159.9 164.4,155.9 180,144.7 195.6,134.7 211.1,125.5 226.7,111.4 242.2,125.5 257.8,134.7 273.3,125.5 288.9,134.7 304.4,119.7 320,134.7 335.6,119.7 351.1,101.1 366.7,89.2 382.2,73.9 397.8,71.8 413.3,65.7 428.9,67.7 444.4,82.5 460,98.7 475.6,82.5 491.1,80.3 506.7,61.7 522.2,63.7 537.8,61.7 553.3,71.8 568.9,65.7 584.4,52.1 600,36" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,183.4 117.8,168.5 133.3,183.4 148.9,168.5 164.4,164.1 180,144.7 195.6,128.5 211.1,119.7 226.7,116.9 242.2,108.8 257.8,122.5 273.3,131.5 288.9,116.9 304.4,108.8 320,91.5 335.6,80.3 351.1,91.5 366.7,76 382.2,82.5 397.8,89.2 413.3,91.5 428.9,108.8 444.4,91.5 460,108.8 475.6,128.5 491.1,144.7 506.7,128.5 522.2,131.5 537.8,128.5 553.3,131.5 568.9,148.3 584.4,144.7 600,128.5" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,183.4 117.8,178.1 133.3,155.9 148.9,159.9 164.4,183.4 180,189.2 195.6,183.4 211.1,202.9 226.7,195.6 242.2,178.1 257.8,183.4 273.3,178.1 288.9,183.4 304.4,178.1 320,173.1 335.6,189.2 351.1,173.1 366.7,178.1 382.2,173.1 397.8,159.9 413.3,141.3 428.9,131.5 444.4,116.9 460,131.5 475.6,134.7 491.1,131.5 506.7,122.5 522.2,114.1 537.8,101.1 553.3,108.8 568.9,122.5 584.4,103.6 600,111.4" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,211.6 117.8,202.9 133.3,195.6 148.9,202.9 164.4,183.4 180,178.1 195.6,173.1 211.1,178.1 226.7,183.4 242.2,178.1 257.8,173.1 273.3,178.1 288.9,155.9 304.4,144.7 320,134.7 335.6,144.7 351.1,134.7 366.7,119.7 382.2,101.1 397.8,119.7 413.3,122.5 428.9,103.6 444.4,101.1 460,89.2 475.6,86.9 491.1,98.7 506.7,86.9 522.2,80.3 537.8,86.9 553.3,71.8 568.9,73.9 584.4,71.8 600,86.9" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,195.6 117.8,202.9 133.3,183.4 148.9,159.9 164.4,164.1 180,159.9 195.6,183.4 211.1,178.1 226.7,183.4 242.2,178.1 257.8,183.4 273.3,168.5 288.9,164.1 304.4,152 320,155.9 335.6,137.9 351.1,116.9 366.7,125.5 382.2,134.7 397.8,125.5 413.3,148.3 428.9,152 444.4,148.3 460,144.7 475.6,141.3 491.1,144.7 506.7,155.9 522.2,178.1 537.8,164.1 553.3,152 568.9,134.7 584.4,119.7 600,111.4" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,195.6 117.8,189.2 133.3,195.6 148.9,202.9 164.4,195.6 180,178.1 195.6,164.1 211.1,168.5 226.7,164.1 242.2,159.9 257.8,164.1 273.3,144.7 288.9,148.3 304.4,131.5 320,122.5 335.6,137.9 351.1,148.3 366.7,168.5 382.2,155.9 397.8,137.9 413.3,134.7 428.9,137.9 444.4,148.3 460,144.7 475.6,155.9 491.1,131.5 506.7,106.2 522.2,108.8 537.8,106.2 553.3,131.5 568.9,122.5 584.4,144.7 600,155.9" stroke-width="2"/><polyline class="faint-s" points="40,250 55.6,222.8 71.1,211.6 86.7,202.9 102.2,183.4 117.8,178.1 133.3,164.1 148.9,168.5 164.4,148.3 180,168.5 195.6,148.3 211.1,144.7 226.7,148.3 242.2,125.5 257.8,101.1 273.3,108.8 288.9,101.1 304.4,98.7 320,101.1 335.6,76 351.1,69.7 366.7,67.7 382.2,61.7 397.8,52.1 413.3,50.3 428.9,55.9 444.4,65.7 460,67.7 475.6,57.8 491.1,44.8 506.7,50.3 522.2,52.1 537.8,50.3 553.3,52.1 568.9,73.9 584.4,89.2 600,101.1" stroke-width="2"/><polyline class="f-s" points="40,250 55.6,222.8 71.1,195.6 86.7,189.2 102.2,211.6 117.8,202.9 133.3,183.4 148.9,168.5 164.4,164.1 180,152 195.6,141.3 211.1,152 226.7,164.1 242.2,159.9 257.8,148.3 273.3,159.9 288.9,164.1 304.4,178.1 320,164.1 335.6,168.5 351.1,164.1 366.7,168.5 382.2,164.1 397.8,168.5 413.3,164.1 428.9,178.1 444.4,183.4 460,189.2 475.6,183.4 491.1,159.9 506.7,183.4 522.2,178.1 537.8,195.6 553.3,202.9 568.9,211.6 584.4,222.8 600,250" stroke-width="3.5"/><circle class="ink ring" cx="40" cy="250" r="7"/><circle class="f ring" cx="600" cy="250" r="9"/><text class="lbl" x="320" y="288" text-anchor="middle">walks on Z⁵, distance from home · ~0.135 return</text></svg> | |
+36 −0 figure.py added View file
| @@ -0,0 +1,36 @@ | ||
| 1 | +"""What W5 measures: a simple random walk on Z^5 ever comes back to where it started with probability 1 - 1/(5 W5), | |
| 2 | +about 0.135; most walks drift away for good. Drawn: the distance from home of real (seeded) walks of 36 steps. Seven | |
| 3 | +are the first seeds that never came back in those steps (faint); one is the first seed whose walk is home for the first | |
| 4 | +time at step 36 (the field's colour).""" | |
| 5 | +import math | |
| 6 | +import random | |
| 7 | +from pathlib import Path | |
| 8 | + | |
| 9 | +import kit | |
| 10 | + | |
| 11 | +W5 = 0.23126162496804623574 # the README's value | |
| 12 | +assert abs(1 - 1 / (5 * W5) - 0.13518) < 5e-6 # the README's return probability | |
| 13 | +T = 36 | |
| 14 | + | |
| 15 | + | |
| 16 | +def distances(seed): | |
| 17 | + """Distance from the origin after each of T steps of the walk with this seed.""" | |
| 18 | + rng, pos, out = random.Random(seed), [0] * 5, [0.0] | |
| 19 | + for _ in range(T): | |
| 20 | + pos[rng.randrange(5)] += rng.choice((-1, 1)) | |
| 21 | + out.append(math.sqrt(sum(x * x for x in pos))) | |
| 22 | + return out | |
| 23 | + | |
| 24 | + | |
| 25 | +came_back = next(d for d in map(distances, range(10 ** 6)) if d[-1] == 0 and all(d[1:-1])) | |
| 26 | +away = [d for d in map(distances, range(100)) if all(d[1:])][:7] | |
| 27 | +assert len(away) == 7 | |
| 28 | + | |
| 29 | +x0, x1, base, top = 40, 600, 250, 36 | |
| 30 | +m = max(max(d) for d in away + [came_back]) | |
| 31 | +pts = lambda d: [(x0 + (x1 - x0) * t / T, base - (base - top) * v / m) for t, v in enumerate(d)] | |
| 32 | +body = kit.line(x0, base, x1, base, 'faint-s', 2) # home: distance 0 | |
| 33 | +body += ''.join(kit.polyline(pts(d), 'faint-s', 2) for d in away) | |
| 34 | +body += kit.polyline(pts(came_back), 'f-s', 3.5) | |
| 35 | +body += kit.dot(x0, base, 7, 'ink') + kit.dot(x1, base, 9, 'f') | |
| 36 | +kit.write(__file__, 'physics-astronomy', body, label='walks on Z⁵, distance from home · ~0.135 return') | |
+124 −0 kit.py added View file
| @@ -0,0 +1,124 @@ | ||
| 1 | +"""The drawing kit for problem cards: one canvas, one palette, light and dark built in. | |
| 2 | + | |
| 3 | +It lives here only: tools/cards/kit.py in the catalog, which each problem folder links as kit.py. The Shoal site | |
| 4 | +serves no copy of it: a card's cover is the problem's poster (tools/cards/posters.py), and what this kit draws is kept | |
| 5 | +for the problem's own page. | |
| 6 | + | |
| 7 | +A figure.py at a problem's root, with this file beside it, imports it, draws the problem's object and writes cover.svg | |
| 8 | +next to itself (docs/cards.md says what a figure must be): | |
| 9 | + | |
| 10 | + import kit | |
| 11 | + body = kit.circle(320, 152, 40, 'f') | |
| 12 | + kit.write(__file__, 'mathematics', body, label='what is drawn') | |
| 13 | + | |
| 14 | +Classes (each colour means one thing on a figure; pick the meaning, then the class): | |
| 15 | + ink, ink-s the object itself (fill / stroke) | |
| 16 | + ink2-s secondary structure (edges, outlines) | |
| 17 | + f, f-s, f-soft the field's colour: the part the question is about (fill / stroke / pale fill) | |
| 18 | + sand, sand-s the one accent: a second colour class, an open or contested part | |
| 19 | + faint, faint-s context: grids, axes, ghosts | |
| 20 | + ring a halo in the page's colour, so dots read on top of lines | |
| 21 | + bg a fill in the page's colour, to hide what lies behind (front faces, occluding balls) | |
| 22 | + soft a pale fill of any class's colour: add it next to f, sand or ink (class="sand soft") | |
| 23 | + lbl the one label line | |
| 24 | +""" | |
| 25 | +import math | |
| 26 | +from pathlib import Path | |
| 27 | + | |
| 28 | +W, H = 640, 304 # shown at 320 x 152 on a card, larger on a featured card | |
| 29 | + | |
| 30 | +# the site's field colours (public/app.css, --f-*), light and dark | |
| 31 | +FIELD = { | |
| 32 | + 'mathematics': ('#4f6bed', '#93a6ff'), 'computer-science': ('#9b59d0', '#c9a2f3'), | |
| 33 | + 'physics-astronomy': ('#129d96', '#5fd0c8'), 'chemistry-materials': ('#d08a17', '#f2c063'), | |
| 34 | + 'life-health': ('#5a9e2c', '#a3d47a'), 'earth-environment': ('#2a8ccf', '#7cc4f2'), | |
| 35 | + 'engineering-energy': ('#d4533f', '#f29484'), 'social-economics': ('#c2448f', '#f09ac8'), | |
| 36 | +} | |
| 37 | +LIGHT = dict(ink='#1f1f1f', ink2='#3c4043', faint='#9aa0a6', line='#dadce0', sand='#b8862c', bg='#ffffff', muted='#5f6368') | |
| 38 | +DARK = dict(ink='#e8eaed', ink2='#c4c7c5', faint='#6f7479', line='#3c4043', sand='#d9b26a', bg='#1f2023', muted='#9aa0a6') | |
| 39 | + | |
| 40 | + | |
| 41 | +def _vars(c, f): | |
| 42 | + return (f'--ink:{c["ink"]};--ink2:{c["ink2"]};--faint:{c["faint"]};--line:{c["line"]};--sand:{c["sand"]};' | |
| 43 | + f'--bg:{c["bg"]};--muted:{c["muted"]};--f:{f}') | |
| 44 | + | |
| 45 | + | |
| 46 | +def style(field): | |
| 47 | + light, dark = FIELD[field] | |
| 48 | + return (f'<style>svg{{{_vars(LIGHT, light)}}}@media (prefers-color-scheme: dark){{svg{{{_vars(DARK, dark)}}}}}' | |
| 49 | + '.ink{fill:var(--ink)}.ink-s{stroke:var(--ink);fill:none}.ink2-s{stroke:var(--ink2);fill:none}' | |
| 50 | + '.f{fill:var(--f)}.f-s{stroke:var(--f);fill:none}.f-soft{fill:var(--f);fill-opacity:.14}' | |
| 51 | + '.sand{fill:var(--sand)}.sand-s{stroke:var(--sand);fill:none}.faint{fill:var(--faint)}.faint-s{stroke:var(--faint);fill:none}' | |
| 52 | + '.ring{stroke:var(--bg);stroke-width:3}.bg{fill:var(--bg)}.soft{fill-opacity:.16}' | |
| 53 | + '.lbl{fill:var(--muted);font:400 19px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}' | |
| 54 | + 'line,path,polyline{stroke-linecap:round;stroke-linejoin:round}</style>') | |
| 55 | + | |
| 56 | + | |
| 57 | +def f1(n): | |
| 58 | + return f'{round(n, 1):g}' | |
| 59 | + | |
| 60 | + | |
| 61 | +def circle(x, y, r, cls, extra=''): | |
| 62 | + return f'<circle class="{cls}" cx="{f1(x)}" cy="{f1(y)}" r="{f1(r)}"{extra}/>' | |
| 63 | + | |
| 64 | + | |
| 65 | +def dot(x, y, r=6, cls='ink'): | |
| 66 | + """A point that stays readable on top of lines: filled, with a halo in the page's colour.""" | |
| 67 | + return circle(x, y, r, f'{cls} ring') | |
| 68 | + | |
| 69 | + | |
| 70 | +def line(x1, y1, x2, y2, cls='ink2-s', w=2, extra=''): | |
| 71 | + return f'<line class="{cls}" x1="{f1(x1)}" y1="{f1(y1)}" x2="{f1(x2)}" y2="{f1(y2)}" stroke-width="{w}"{extra}/>' | |
| 72 | + | |
| 73 | + | |
| 74 | +def path(d, cls='ink2-s', w=2, extra=''): | |
| 75 | + return f'<path class="{cls}" d="{d}" stroke-width="{w}"{extra}/>' | |
| 76 | + | |
| 77 | + | |
| 78 | +def polygon(pts, cls='f-soft', extra=''): | |
| 79 | + return f'<polygon class="{cls}" points="{" ".join(f"{f1(x)},{f1(y)}" for x, y in pts)}"{extra}/>' | |
| 80 | + | |
| 81 | + | |
| 82 | +def polyline(pts, cls='ink2-s', w=2, extra=''): | |
| 83 | + return f'<polyline class="{cls}" points="{" ".join(f"{f1(x)},{f1(y)}" for x, y in pts)}" stroke-width="{w}"{extra}/>' | |
| 84 | + | |
| 85 | + | |
| 86 | +DASH = ' stroke-dasharray="7 6"' # pass as `extra` for a dashed stroke | |
| 87 | + | |
| 88 | + | |
| 89 | +def polypath(pts, cls='ink2-s', w=2, closed=False, extra=''): | |
| 90 | + """Many points as one relative path: the same line as polyline, a fraction of the bytes.""" | |
| 91 | + (x0, y0), d, px, py = pts[0], [], pts[0][0], pts[0][1] | |
| 92 | + for x, y in pts[1:]: | |
| 93 | + d.append(f'{f1(x - px)} {f1(y - py)}'); px, py = x, y | |
| 94 | + return path(f'M{f1(x0)} {f1(y0)}l' + ' '.join(d) + ('z' if closed else ''), cls, w, extra) | |
| 95 | + | |
| 96 | + | |
| 97 | +def arrow(x1, y1, x2, y2, cls='ink2-s', w=2, head=10): | |
| 98 | + """A line ending in an open arrowhead at (x2, y2).""" | |
| 99 | + a = math.atan2(y2 - y1, x2 - x1) | |
| 100 | + tips = [(x2 - head * math.cos(a - s), y2 - head * math.sin(a - s)) for s in (0.45, -0.45)] | |
| 101 | + return line(x1, y1, x2, y2, cls, w) + polyline([tips[0], (x2, y2), tips[1]], cls, w) | |
| 102 | + | |
| 103 | + | |
| 104 | +def text(x, y, s, cls='lbl', anchor='middle'): | |
| 105 | + s = s.replace('&', '&').replace('<', '<').replace('>', '>') | |
| 106 | + return f'<text class="{cls}" x="{f1(x)}" y="{f1(y)}" text-anchor="{anchor}">{s}</text>' | |
| 107 | + | |
| 108 | + | |
| 109 | +def svg(field, body, label=None, title=''): | |
| 110 | + """The whole figure. `label` is the one line naming what is drawn, at the bottom; leave room for it (y < 262).""" | |
| 111 | + if field not in FIELD: | |
| 112 | + raise ValueError(f'unknown field {field!r}') | |
| 113 | + if label and len(label) > 50: | |
| 114 | + raise ValueError(f'label over 50 characters (more does not fit at card size): {label!r}') | |
| 115 | + t = f'<title>{title or label or ""}</title>' | |
| 116 | + tail = text(W / 2, H - 16, label) if label else '' | |
| 117 | + return f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {W} {H}" role="img">{t}{style(field)}{body}{tail}</svg>\n' | |
| 118 | + | |
| 119 | + | |
| 120 | +def write(figure_py, field, body, label=None, title=''): | |
| 121 | + """Writes cover.svg next to the figure.py that calls it.""" | |
| 122 | + out = Path(figure_py).resolve().parent / 'cover.svg' | |
| 123 | + out.write_text(svg(field, body, label, title)) | |
| 124 | + return out | |
+0 −0 poster.webp added View file
+6 −0 posters.json added View file
| @@ -0,0 +1,6 @@ | ||
| 1 | +{ | |
| 2 | + "poster.webp": { | |
| 3 | + "style": "poster", | |
| 4 | + "idea": "A brass-centered five-axis lattice with a looping wooden-bead random walk returning to its origin, staged as a tactile deep-teal scientific still life." | |
| 5 | + } | |
| 6 | +} | |
+30 −1 scienceslack.json View file
| @@ -16,5 +16,34 @@ | ||
| 16 | 16 | "catalog": "0521c19bbd38" |
| 17 | 17 | }, |
| 18 | 18 | "review": true, |
| 19 | - "approval": "first-time" | |
| 19 | + "approval": "first-time", | |
| 20 | + "cover": { | |
| 21 | + "file": "poster.webp" | |
| 22 | + }, | |
| 23 | + "card": { | |
| 24 | + "question": "Is there an exact formula for the chance that a random walk in five dimensions ever comes back to where it started?", | |
| 25 | + "stake": "Four dimensions fell in 2019, when Zhou proved Laporta's link to a four-loop Feynman diagram; five is the next case.", | |
| 26 | + "frontier": { | |
| 27 | + "shape": "cases", | |
| 28 | + "items": [ | |
| 29 | + { | |
| 30 | + "label": "d = 3", | |
| 31 | + "state": "solved", | |
| 32 | + "year": 1939, | |
| 33 | + "by": "Watson" | |
| 34 | + }, | |
| 35 | + { | |
| 36 | + "label": "d = 4", | |
| 37 | + "state": "solved", | |
| 38 | + "year": 2019, | |
| 39 | + "by": "Zhou" | |
| 40 | + }, | |
| 41 | + { | |
| 42 | + "label": "d = 5", | |
| 43 | + "state": "open" | |
| 44 | + } | |
| 45 | + ] | |
| 46 | + }, | |
| 47 | + "first": "Find a closed form that matches W₅ to 20 digits" | |
| 48 | + } | |
| 20 | 49 | } |