diff --git a/app/security/__pycache__/security.cpython-312.pyc b/app/security/__pycache__/security.cpython-312.pyc index 1190b53..478ebf9 100644 Binary files a/app/security/__pycache__/security.cpython-312.pyc and b/app/security/__pycache__/security.cpython-312.pyc differ diff --git a/app/security/security.py b/app/security/security.py index 0d52f59..932b287 100644 --- a/app/security/security.py +++ b/app/security/security.py @@ -9,4 +9,10 @@ templates = Jinja2Templates(directory="templates") async def browser_local_cryptography_strength(request: Request): return templates.TemplateResponse( request=request, name="browser_random_number.html", contents={"rand": "rand"} + ) + +@security_router.get("/pigeonhole") +async def pigeonhole_principle_simulation(request: Request): + return templates.TemplateResponse( + request=request, name="pigeonhole.html" ) \ No newline at end of file diff --git a/app/templates/pigeonhole.html b/app/templates/pigeonhole.html new file mode 100644 index 0000000..0f4f39b --- /dev/null +++ b/app/templates/pigeonhole.html @@ -0,0 +1,173 @@ +{% extends "base.html" %} + +{% block title %}Pigeonhole Principle Simulation{% endblock %} + +{% block content %} +
+
+

Pigeonhole Principle Simulation

+

+ If we place 5 dots in a square of side length $s$, there must be at least two dots whose distance $d$ + satisfies: + $$ d < \frac{s}{\sqrt{2}} $$

+

+ (The user requested condition: "distance is smaller than square root of square ($s^2$)", which means + $d < \sqrt{s^2}=s$. Since $\frac{s}{\sqrt{2}} \approx 0.707 s < s$, the condition is always met if + the stronger Pigeonhole Principle holds.)

+ +
+ +
+
+ +
+
+ + +
+
+
+
+{% endblock %} + +{% block js %} + + + + +{% endblock %} \ No newline at end of file