Description
Count a vertex's occurrences in the two terminal positions of a path.
Graph records separate vertex/edge identities, direction, degree counts and weighted-entry conventions. A zero weight differs from no edge, and local degree balance or endpoint continuity does not establish a whole graph’s connectivity or a valid traversal. Parallel edges need an explicit occurrence convention.
Count a vertex's occurrences in the two terminal positions of a path.
When to use this tool
Use Path Terminal Vertex Parity Contribution when checking the stated graph degree, walk, key or entry-presence convention.
How to use the tool and how it works
- Enter vertexId, firstTerminalId, lastTerminalId. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read endpointOccurrences, contributesOddDegree. Inspect contributesOddDegree before interpreting the associated values.
Require nonempty vertex and two terminal IDs. Count how many terminal positions equal vertexId; contributesOddDegree is true exactly when that count is one.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| vertexId | Vertex Id | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192. |
| firstTerminalId | First Terminal Id | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192. |
| lastTerminalId | Last Terminal Id | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| endpointOccurrences | Zero, one or two matches across the two terminal positions, including identical first/last IDs. | Required. Safe integer. |
| contributesOddDegree | Contributes Odd Degree | Required. Boolean. |
{
"input": {
"vertexId": "V2",
"firstTerminalId": "V1",
"lastTerminalId": "V2"
},
"output": {
"endpointOccurrences": 1,
"contributesOddDegree": true
}
} Limitations and assumptions
- When both terminal IDs match, two occurrences cancel the odd contribution; no actual walk, path or degree sequence is validated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the complete graph and appropriate structural/traversal algorithms for realizability, connectivity, Eulerian properties and globally unique edge handling.
References
Similar or alternative tools
- Graph Walk Edge Continuity
Locate discontinuities between consecutive directed edge endpoints in a supplied walk.
- Vertex Loop Degree Contribution Tool
Return the loop incidence contribution under explicit undirected, single directed in/out, or total directed degree conventions.