|
Download math/math-0154.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 896 Bytes
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/b5bf3ebebe22b46f4f78c2589a5bb814a44293a7/math/math-0154.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@b5bf3ebebe22b46f4f78c2589a5bb814a44293a7/math/math-0154.jsonl
-
curl -L -o math-0154.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/b5bf3ebebe22b46f4f78c2589a5bb814a44293a7/math/math-0154.jsonl
896 Bytes
| {"type": "session", "harness": "opencode", "id": "math-0154", "name": "Catalan Numbers"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert mathematician and programmer."}} | |
| {"type": "message", "message": {"role": "user", "content": "Explain Catalan numbers applications"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "C_n = C(2n,n)/(n+1) = sum(C_i * C_{n-1-i}) for i=0..n-1.\nFirst: 1,1,2,5,14,42,132,429,1430.\n\nApplications (all count same thing):\n1. Balanced parentheses: n pairs in valid order\n2. BST shapes: n distinct keys\n3. Triangulations: convex (n+2)-gon\n4. Dyck paths: (0,0) to (2n,0) staying above x-axis\n5. Non-crossing partitions of n elements\n6. Full binary trees with n+1 leaves\n7. Stack-sortable permutations\n\nMod prime: C(2n,n) * mod_inverse(n+1) mod p.\nGeneralization: Fuss-Catalan C_n^(m) = C(mn,n)/(mn-n+1)."}} | |