Macaulay2 » Documentation
Packages » Graphs :: degreeSequence
next | previous | forward | backward | up | index | toc

# degreeSequence -- the degree sequence of a graph

- Usage:
    `degreeSequence G`
- Inputs:
  - G, a graph,
- Outputs:
  - a list, the degree sequence of G;

## Description

The degree sequence of a graph is the list of the degrees of its vertices sorted in nonincreasing order.

    i1 : degreeSequence pathGraph 5

    o1 = {2, 2, 2, 1, 1}

    o1 : List

## Ways to use degreeSequence:

- `degreeSequence(Graph)`

## For the programmer

The object degreeSequence is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Graphs.m2:1997:0.