An open API service indexing awesome lists of open source software.

https://github.com/pivari/lo-shu-enigma

An interactive OER journey from the ancient Luo River legend to modern computational complexity. Accessible, multilingual, and PWA ready.
https://github.com/pivari/lo-shu-enigma

accessibility education history-of-science interactive-learning magic-square mathematics multilingual oer pivari-com pwa

Last synced: 9 days ago
JSON representation

An interactive OER journey from the ancient Luo River legend to modern computational complexity. Accessible, multilingual, and PWA ready.

Awesome Lists containing this project

README

          

# 🐢 Lo Shu Enigma: From Ancient Legend to Computational Abyss

**Version 1.1 | Official OER & Cross-Platform Resource**[cite: 3]

Welcome to the **Lo Shu Enigma**, an interactive journey that explores one of the oldest mathematical puzzles in human history. This project is designed for students and educators to demonstrate how a simple 3x3 grid connects ancient Chinese cosmology with modern **Combinatorial Analysis** and **Supercomputing**.

---

## 🌊 The Legend: The Script of the Luo River
Ancient legends tell of a time when the **Luo River (洛)** flooded, threatening the survival of the people[cite: 6]. While **Emperor Yu the Great** was working to tame the waters, a divine turtle emerged from the river[cite: 6]. On its shell was a unique pattern of dots: the **Luo Shu (洛書)**, or the "Book of the Luo River"[cite: 6].

This pattern was the first **Magic Square**—a grid where every row, column, and diagonal sums to the same number: **15**[cite: 4]. In Chinese culture, this is more than a game; it is the foundation of **Feng Shui (風水)** and represents the perfect, moving order of the universe[cite: 4].

---

## 🔢 The Mathematical Challenge
While the legend is mystical, the underlying math is rigorous. The project challenges users to solve the 3x3 square while teaching key mathematical concepts[cite: 4]:

### 1. The Magic Constant (M)
Why 15? In any magic square of order $n$, the sum is determined by a precise formula[cite: 4]:

$$M = \frac{n(n^2 + 1)}{2}$$

For our 3x3 square ($n=3$):
$$M = \frac{3(3^2 + 1)}{2} = 15$$

Interestingly, **15** is also the number of days in each of the 24 solar terms of the Chinese solar calendar[cite: 4].

### 2. Probability and Chaos
How hard is it to solve by "guessing"?
* There are **9!** (9 Factorial) ways to arrange the numbers 1–9[cite: 4].
* **9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362,880** total combinations[cite: 4].
* Only **8** of these are valid magic squares (the core solution plus its rotations and reflections)[cite: 4].
* **The odds of winning by pure luck?** Approximately **0.0022%**[cite: 4].

---

## 🖥️ The "Computational Abyss": 3x3 vs. 10x10
This project serves as a perfect introduction to **Computational Complexity**[cite: 4].

* **The 3x3 Square:** A modern smartphone can solve this in a fraction of a millisecond. It is a "toy problem".
* **The 10x10 Square:** If we increase the size to a 10x10 grid, the number of combinations becomes **100!**[cite: 4].
* This is a number with **158 digits** (more than the atoms in the observable universe)[cite: 4].
* Even using a **Supercomputer**, it would take over **$10^{130}$ years** to check every possibility[cite: 4].
* **Context:** The Universe is only **$1.38 \times 10^{10}$ years** old[cite: 4].

---

## 🛠️ New in Version 1.1: Features & OER
* **Expanded Multilingual Support:** English, Italian, and now **Simplified Chinese (zh)**—including full translation of historical legends and mathematical theory[cite: 1, 6].
* **Cache Busting Technology:** Implementation of versioned fetching (`?v=1.1`) for all JSON and HTML assets to ensure users always access the latest content[cite: 3].
* **HarmonyOS NEXT Compatibility:** Updated `manifest.json` with "Atomic Ability" specifications and maskable icons for seamless performance on the new Huawei ecosystem.
* **Text-to-Speech (TTS):** Legend narration for accessibility, now supporting native Chinese synthesis voices[cite: 3].
* **PWA Ready:** Works offline on tablets and phones—perfect for school labs.
* **Open Educational Resource (OER):** Designed to be freely shared, adapted, and cited in academic environments.

## 👨‍💻 Author & Credits
This project is maintained by [pivari.com](https://pivari.com)[cite: 3].
It was developed as an educational tool to bridge the gap between ancient history and modern computational logic.

## ⚖️ License
This project is licensed under the **MIT License**[cite: 3].

You are free to:
* **Share**: Copy and redistribute the material in any medium or format.
* **Adapt**: Remix, transform, and build upon the material for any purpose, even commercially.

## 🎓 Academic Metadata
To ensure this resource is discoverable and citable, the following metadata files are included in the repository:
* `codemeta.json`: Technical metadata for software indexing.
* `CITATION.cff`: Standardized format for citing this educational tool.
* `manifest.json`: Web App metadata, optimized for HarmonyOS and Android.

---

**Master the numbers. Restore the balance. Explore the abyss.**