Skip to content

Main content

Multigraph Edge Key Occurrence Suffix

Build an explicit multigraph edge occurrence key, canonicalizing undirected endpoints by UTF-16 lexical order.

Loading tool…

Description

Build a multigraph edge-occurrence key with canonical endpoint order for undirected edges.

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.

Build a multigraph edge-occurrence key with canonical endpoint order for undirected edges.

When to use this tool

Use Multigraph Edge Key Occurrence Suffix when checking the stated graph degree, walk, key or entry-presence convention.

How to use the tool and how it works

  1. Enter sourceId, targetId, occurrenceIndex, directed. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read edgeKey. Use the output convention below.

Require nonempty source/target IDs and nonnegative whole occurrence index. For undirected edges, sort endpoints by literal string order; encode [first,second,index,directed] as JSON text.1

Input fieldMeaning and unitsAccepted input
sourceIdLiteral source identifier, not a retrieved or verified document.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192.
targetIdTarget IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 8192.
occurrenceIndexSupplied zero-based occurrence label for parallel edges, not inferred from graph data.Required. Safe integer; minimum 0.
directedDirectedRequired. Boolean.
Output fieldInterpretationReturned shape
edgeKeyEdge KeyRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "sourceId": "B",
    "targetId": "A",
    "occurrenceIndex": 2,
    "directed": false
  },
  "output": {
    "edgeKey": "[\"A\",\"B\",2,false]"
  }
}

Limitations and assumptions

  • The occurrence index is supplied, not discovered; no duplicate-edge detection, graph existence or persistent unique-ID allocation occurs.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete graph and appropriate structural/traversal algorithms for realizability, connectivity, Eulerian properties and globally unique edge handling.

References

  1. Calculation and input contract: graph/multigraph-edge-key-occurrence-suffix — tool.io

Similar or alternative tools