M[g]
gives the number of edges in the graph g.
M[g,Directed]
is obsolete because M[g] works for directed as well as undirected graphs.


M
M[g]
gives the number of edges in the graph g.
M[g,Directed]
is obsolete because M[g] works for directed as well as undirected graphs.
Details and Options
- M functionality is now available in the built-in Wolfram Language function EdgeCount.
- To use M, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
Tech Notes
Related Guides
-
▪
- Graph Construction and Representations ▪
- Graphs & Networks ▪
- Graph Visualization ▪
- Computation on Graphs ▪
- Graph Construction & Representation ▪
- Graphs and Matrices ▪
- Graph Properties & Measurements ▪
- Graph Operations and Modifications ▪
- Statistical Analysis ▪
- Social Network Analysis ▪
- Graph Properties ▪
- Mathematical Data Formats ▪
- Discrete Mathematics
Text
Wolfram Research (2012), M, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/M.html.
CMS
Wolfram Language. 2012. "M." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/M.html.
APA
Wolfram Language. (2012). M. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/M.html
BibTeX
@misc{reference.wolfram_2025_m, author="Wolfram Research", title="{M}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/M.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_m, organization={Wolfram Research}, title={M}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/M.html}, note=[Accessed: 13-August-2025]}