From ca5d1e89b8caf5d0904f93a64b5b405c56c8f76e Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Wed, 21 Jan 2026 16:00:13 +0000
Subject: [PATCH 1/7] Changes
---
src/components/LadybugClockPuzzle.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/components/LadybugClockPuzzle.tsx b/src/components/LadybugClockPuzzle.tsx
index 4c6de70..e61e078 100644
--- a/src/components/LadybugClockPuzzle.tsx
+++ b/src/components/LadybugClockPuzzle.tsx
@@ -670,8 +670,7 @@ const LadybugClockPuzzle: React.FC = ({ showSocialShare
{' '}and demonstrated in{' '}
this YouTube short
-
- . It illustrates a beautiful result about random walks on cycle graphs: every position (except the start) has equal probability of being visited last.
+ .
Your prediction ({positionToNumber(userPrediction)}):{' '}
{((lastPaintedCounts[userPrediction] || 0) / totalSimulations * 100).toFixed(2)}%
{' '}— Theory predicts all numbers have equal probability of{' '}
{theoreticalProbability.toFixed(2)}%!
The simulation ends when all numbers have been visited at least once
-
The Surprising Result
-
- Intuitively, you might expect the number 6 (opposite to 12) to be the most likely to be painted last,
- since it's the farthest from the starting point. However, the probability is exactly 1/{numPositions - 1} for
- every number from 1 to {numPositions - 1}! This is because once all but one number is painted, the random walk
- will eventually reach that last number, regardless of where it is.
-
-
Mathematical Connections
+
+
+
-
Random Walks on Cycles: This is an example of a random walk on a cycle graph
-
Cover Time: The number of moves to visit all vertices is called the "cover time"
-
Gambler's Ruin: Related to the classic probability problem of a gambler with a finite amount
+ You're trapped in a tunnel with a deadly cliff {discrepancyBound} step{discrepancyBound > 1 ? 's' : ''} to your LEFT and
+ a pit of vipers {discrepancyBound} step{discrepancyBound > 1 ? 's' : ''} to your RIGHT.
+
+
+ Write a list of instructions: each is either LEFT or RIGHT.
+
+
+ The evil captor then picks a step size d and you follow every d-th instruction.
+
+
+
+
+ The Impossible Task
+
+
+ C = 1: Maximum possible sequence length is 11
+
+
+ C = 2: Maximum possible sequence length is 1,160
+
+
+ Terence Tao proved in 2015: No infinite sequence can survive!
+
+ You wake up in a dark tunnel. There's a cliff to your left and vipers to your right.
+ Your captor demands you write a sequence of LEFT/RIGHT instructions...
+ but they get to choose which instructions you follow.
+
+
+
+ )}
+
+ {/* Fallen Phase */}
+ {gamePhase === 'fallen' && (
+
+
+ You Fell!
+
+ After {prisonerStep} steps with d={captorChosenD}, you ended up at position {prisonerPosition}.
+ The captor found your weakness! Your sequence lasted {sequence.length} instructions.
+
+
+ Try Again
+
+
+
+ Reset
+
+
+
+
+ )}
+
+ {/* Survived Phase (temporary - sequence ended) */}
+ {gamePhase === 'survived' && (
+
+
+ Sequence Complete!
+
+ Your {sequence.length}-instruction sequence survived d={captorChosenD}!
+ But remember: no sequence can survive forever. Try making it longer!
+
+ setGamePhase('writing')} variant="outline" size="sm">
+ Extend Sequence
+
+
+
+ New Game
+
+
+
+
+ )}
+
+ )}
+
+ {/* Acknowledgement */}
+
+
+
Credits & History
+
+ This puzzle is based on the Erdős Discrepancy Problem, posed by Paul Erdős in the 1930s
+ (with a $500 prize!). The "Prisoner's Walk" framing comes from various mathematical expositions,
+ popularized by James Grime's singingbanana video.
+
+
+ 2014: Boris Konev & Alexei Lisitsa proved C=2 has maximum length 1,160 using SAT solvers
+ (generating a 13GB proof!). 2015: Terence Tao proved that NO infinite sequence
+ can have bounded discrepancy, settling the problem completely.
+
);
};
-export default AssistedNimGamePage;
\ No newline at end of file
+export default AssistedNimGamePage;
\ No newline at end of file
diff --git a/src/pages/BagchalGamePage.tsx b/src/pages/BagchalGamePage.tsx
index 2e1ff48..3d65664 100644
--- a/src/pages/BagchalGamePage.tsx
+++ b/src/pages/BagchalGamePage.tsx
@@ -1,13 +1,12 @@
-import Layout from "@/components/Layout";
import BagchalGame from "@/components/BagchalGame";
const BagchalGamePage = () => {
return (
-
+
);
};
-export default DominoRetilingPuzzlePage;
\ No newline at end of file
+export default DominoRetilingPuzzlePage;
diff --git a/src/pages/ErdosDiscrepancyPuzzlePage.tsx b/src/pages/ErdosDiscrepancyPuzzlePage.tsx
index cb323f8..2578ef0 100644
--- a/src/pages/ErdosDiscrepancyPuzzlePage.tsx
+++ b/src/pages/ErdosDiscrepancyPuzzlePage.tsx
@@ -1,15 +1,12 @@
-import Layout from "@/components/Layout";
import ErdosDiscrepancyPuzzle from "@/components/ErdosDiscrepancyPuzzle";
const ErdosDiscrepancyPuzzlePage = () => {
return (
-
-
-
-
-
+
+
+
-
+
);
};
diff --git a/src/pages/EternalDominationGamePage.tsx b/src/pages/EternalDominationGamePage.tsx
index bd81bb9..54506fe 100644
--- a/src/pages/EternalDominationGamePage.tsx
+++ b/src/pages/EternalDominationGamePage.tsx
@@ -1,87 +1,12 @@
-import Layout from "@/components/Layout";
import EternalDominationGame from "@/components/EternalDominationGame";
-import SocialShare from "@/components/SocialShare";
-import { Badge } from "@/components/ui/badge";
-import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
const EternalDominationGamePage = () => {
return (
-
-
-
-
- Miscellany
-
Eternal Domination on a Grid
-
- Explore the m-eternal domination problem on a 12×10 grid. Guards must maintain
- a dominating set while defending against arbitrary attack sequences.
-
-
-
-
-
-
-
- Mathematical Background
-
-
- Dominating Set: A subset S of vertices in a graph G such that
- every vertex not in S has a neighbor in S. Think of guards placed at certain
- vertices that can "watch" their neighbors.
-
-
- m-Eternal Domination: A two-player game where the defender
- places guards on vertices, and the attacker repeatedly attacks unguarded vertices.
- The defender responds by moving guards (all can move simultaneously, but only to
- adjacent vertices) such that one guard ends on the attacked vertex and the guards
- still form a dominating set.
-
-
- The Challenge: The defender wins if they can maintain a dominating
- set forever against any attack sequence. The m-eternal domination number γ∞(G) is
- the minimum number of guards needed to win.
-
-
-
-
-
- Defense Strategy
-
-
- This implementation uses the strategy from research on finite grids:
-
-
-
Border guards: All vertices on the border (rows 0, 1, 8, 9 and
- columns 0, 11) are always guarded, forming a protective cycle C.
-
Interior guards: Placed in a pattern that ensures every interior
- vertex is dominated by exactly one guard.
-
Defense mechanism: When attacked, interior guards shift toward
- the attack, potentially pushing a guard to the border. Border guards shift along
- "complementary paths" to fill the resulting gaps.
-
-
-
-
-
- Reference
-
-
- Based on: "m-Eternal Domination and Variants on Some Classes of Finite and
- Infinite Graphs" by Calamoneri et al. (CIAC 2025), which establishes bounds
- and strategies for eternal domination on various grid types including square,
- hexagonal, and triangular grids.
-
-
-
-
-
-
-
+
+
+
-
+
);
};
diff --git a/src/pages/FerrersRogersRamanujanPage.tsx b/src/pages/FerrersRogersRamanujanPage.tsx
index c343f8e..35253d1 100644
--- a/src/pages/FerrersRogersRamanujanPage.tsx
+++ b/src/pages/FerrersRogersRamanujanPage.tsx
@@ -1,27 +1,12 @@
-import Layout from "@/components/Layout";
import FerrersRogersRamanujan from "@/components/FerrersRogersRamanujan";
-import SocialShare from "@/components/SocialShare";
const FerrersRogersRamanujanPage = () => {
return (
-
-
-
-
Ferrers Diagram & Rogers-Ramanujan Partition
-
- Explore integer partitions through visual Ferrers diagrams and discover the elegant Rogers-Ramanujan transformation.
-
- Practice applying resolution and equivalence rules to derive conclusions step by step.
-
-
-
-
-
-
+
+
+
);
};
-export default RulesOfInferencePlaygroundPage;
\ No newline at end of file
+export default RulesOfInferencePlaygroundPage;
diff --git a/src/pages/StackingBlocksPage.tsx b/src/pages/StackingBlocksPage.tsx
index 7239dfc..ccb4f78 100644
--- a/src/pages/StackingBlocksPage.tsx
+++ b/src/pages/StackingBlocksPage.tsx
@@ -1,29 +1,13 @@
import StackingBlocks from "@/components/StackingBlocks";
-import { useSearchParams } from "react-router-dom";
const StackingBlocksPage = () => {
- const [searchParams] = useSearchParams();
- const from = searchParams.get('from');
-
- if (from === 'puzzles') {
- return (
-
-
-
- window.location.href = '/themes/puzzles'}
- className="text-primary hover:text-primary/80 font-medium"
- >
- ← Back to Puzzles
-
-
-
-
+ return (
+
+
+
- );
- }
-
- return ;
+
+ );
};
-export default StackingBlocksPage;
\ No newline at end of file
+export default StackingBlocksPage;
diff --git a/src/pages/SubtractionGamePage.tsx b/src/pages/SubtractionGamePage.tsx
index 302ca9c..75c3d78 100644
--- a/src/pages/SubtractionGamePage.tsx
+++ b/src/pages/SubtractionGamePage.tsx
@@ -1,7 +1,13 @@
import SubtractionGame from '@/components/SubtractionGame';
const SubtractionGamePage = () => {
- return ;
+ return (
+
+
+
+
+
+ );
};
-export default SubtractionGamePage;
\ No newline at end of file
+export default SubtractionGamePage;
diff --git a/src/pages/TernaryNumberGamePage.tsx b/src/pages/TernaryNumberGamePage.tsx
index 79ba882..a85620d 100644
--- a/src/pages/TernaryNumberGamePage.tsx
+++ b/src/pages/TernaryNumberGamePage.tsx
@@ -2,12 +2,12 @@ import TernaryNumberGame from '@/components/TernaryNumberGame';
const TernaryNumberGamePage = () => {
return (
-
-
-
+
+
+
);
};
-export default TernaryNumberGamePage;
\ No newline at end of file
+export default TernaryNumberGamePage;
diff --git a/src/pages/ZeckendorfGamePage.tsx b/src/pages/ZeckendorfGamePage.tsx
index 130ecfa..c585236 100644
--- a/src/pages/ZeckendorfGamePage.tsx
+++ b/src/pages/ZeckendorfGamePage.tsx
@@ -2,12 +2,12 @@ import ZeckendorfGame from '@/components/ZeckendorfGame';
const ZeckendorfGamePage = () => {
return (
-
-
-
+
+
+
);
};
-export default ZeckendorfGamePage;
\ No newline at end of file
+export default ZeckendorfGamePage;
\ No newline at end of file
diff --git a/src/pages/ZeckendorfSearchTrickPage.tsx b/src/pages/ZeckendorfSearchTrickPage.tsx
index 59e977f..f5cc437 100644
--- a/src/pages/ZeckendorfSearchTrickPage.tsx
+++ b/src/pages/ZeckendorfSearchTrickPage.tsx
@@ -2,12 +2,12 @@ import ZeckendorfSearchTrick from '@/components/ZeckendorfSearchTrick';
const ZeckendorfSearchTrickPage = () => {
return (
-
-
-
+
+
+
);
};
-export default ZeckendorfSearchTrickPage;
\ No newline at end of file
+export default ZeckendorfSearchTrickPage;
\ No newline at end of file
From aff14bdf2f87793cb16e2d8f1d787dc2368edb73 Mon Sep 17 00:00:00 2001
From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Wed, 18 Feb 2026 20:27:43 +0000
Subject: [PATCH 6/7] Remove duplicate SocialShare from Foundations theme page
Components now render SocialShare internally via showSocialShare prop,
so the page-level SocialShare block was causing duplicates.
Co-Authored-By: Neeldhara Misra
---
src/pages/theme-pages/discrete-math/Foundations.tsx | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/pages/theme-pages/discrete-math/Foundations.tsx b/src/pages/theme-pages/discrete-math/Foundations.tsx
index c4eba6c..c8eec1b 100644
--- a/src/pages/theme-pages/discrete-math/Foundations.tsx
+++ b/src/pages/theme-pages/discrete-math/Foundations.tsx
@@ -3,7 +3,6 @@ import { Link } from "react-router-dom";
import { Search } from "lucide-react";
import Layout from "@/components/Layout";
import InteractiveCard from "@/components/InteractiveCard";
-import SocialShare from "@/components/SocialShare";
import BinaryNumberGame from "@/components/BinaryNumberGame";
import TernaryNumberGame from "@/components/TernaryNumberGame";
import BalancedTernaryGame from "@/components/BalancedTernaryGame";
@@ -80,12 +79,6 @@ const Foundations = () => {