Cycle in LaTeX (C_n)
- LaTeX command
C_n- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Cycle graph on n vertices (n at least 3), forming a single closed loop; also the n-th Catalan number in combinatorics.
In graph theory C_n is the cycle with n vertices and n edges; it is bipartite exactly when n is even, so \chi(C_n) = 2 for even n and 3 for odd n. In combinatorics the same notation commonly means the Catalan number C_n = \frac{1}{n+1}\binom{2n}{n}, which counts balanced parenthesizations, binary trees, and Dyck paths: 1, 1, 2, 5, 14, 42. Since this page is shared between the two areas, say which meaning you intend early. Braces are needed for compound indices, C_{2k+1}.
Also listed under: Combinatoriek
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Cycle: $C_n$
\[ \chi(C_{2k+1}) = 3, \quad C_n = \frac{1}{n+1}\binom{2n}{n} \]
\end{document}Related symbols
- Complete Graph
K_n - Path
P_n - Bipartite
K_{m,n} - Out-Degree
\deg^{+}(v) - Adjacency Matrix
A_{ij} - In-Degree
\deg^{-}(v)
Frequently asked questions
- How do I write Cycle in LaTeX?
- Type C_n in math mode, for example $\chi(C_{2k+1}) = 3, \quad C_n = \frac{1}{n+1}\binom{2n}{n}$. It works in plain LaTeX without loading any package.
- Which package do I need for C_n?
- None. C_n is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use C_n in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $C_n$ in running text.
Beste AI LaTeX Editor, Overleaf Alternatief
Octree helpt onderzoekers van 15+ universiteiten sneller onderzoeksartikelen schrijven met AI
- Genereer mooie TikZ-diagrammen met AI
- Upload afbeelding en converteer naadloos naar LaTeX
- Krijg directe hulp bij het schrijven en opmaken van onderzoeksartikelen