Edge ID Trail Validity Check

Verify an edge-ID trail with no repeated edge occurrences from an explicit start; directed or undirected traversal, with failure indexes retained.

Description

Verify an edge-ID trail with no repeated edge occurrences from an explicit start; directed or undirected traversal, with failure indexes retained.

A trail follows specific edge IDs from a starting vertex without reusing an edge. This preserves parallel-edge identity.

When to use this tool

Verify an edge-ID trail with no repeated edge occurrences from an explicit start; directed or undirected traversal, with failure indexes retained.

  • Prepare the supplied edgesJson, edgeIds, start, directed fields for this operation.
  • Compare the complete example with the representation used by your own input before carrying the result into another step.

How to use the tool and how it works

  1. Enter edgesJson, edgeIds, start, directed. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.valid, result.violations, result.vertices. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Validate uniquely identified edges. For each edgeIds entry require existence, first occurrence and incidence from the current vertex in the selected directed/undirected convention. On a violation record its step and retain the current vertex; otherwise advance.1

Input fieldMeaning and representationAccepted input
edgesJsonJSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file.Text
edgeIdsedge ids.List of strings; at most 128 entries
startstart.Text; at most 8,192 UTF-16 code units, subject to the grammar above
directedExplicit choice for directed; supply a boolean rather than a text label.true or false

For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.

json
[
  {
    "field": "edgesJson",
    "decoded": [
      {
        "id": "a",
        "source": "u",
        "target": "v",
        "weight": 2
      },
      {
        "id": "b",
        "source": "v",
        "target": "u",
        "weight": 4
      },
      {
        "id": "c",
        "source": "u",
        "target": "u",
        "weight": 1
      }
    ]
  }
]
Output fieldInterpretation
resultObject containing the named outputs below.
result.validFlag for valid under the exact condition described above.
result.violationsSource positions or records that fail the specific screen above; an empty list means no such violation.
result.verticesThe vertices list in the ordering and representation described above.
json
{
  "input": {
    "edgesJson": "[{\"id\":\"a\",\"source\":\"u\",\"target\":\"v\",\"weight\":2},{\"id\":\"b\",\"source\":\"v\",\"target\":\"u\",\"weight\":4},{\"id\":\"c\",\"source\":\"u\",\"target\":\"u\",\"weight\":1}]",
    "edgeIds": [
      "a",
      "b"
    ],
    "start": "u",
    "directed": true
  },
  "output": {
    "result": {
      "valid": true,
      "violations": [],
      "vertices": [
        "u",
        "v",
        "u"
      ]
    }
  }
}

Limitations and assumptions

  • The tool does not repair the trail. Repeated vertices are allowed, and the vertex list includes repeated current positions after invalid steps.
  • Every edge record requires unique string id, string source/target and finite numeric weight, even when this operation does not use the weight. Parallel endpoints and loops are retained unless explicitly filtered.
  • Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
  • Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
  • Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.

Alternative or Complementary methods

Choose edge identities, directedness and vertex coverage explicitly. Local edge-list audits and transformations do not replace a graph algorithm with the required connectivity, path or ordering guarantees.

References

  1. Tool behavior and example: Edge ID Trail Validity Check — tool.io

Similar or alternative tools

  • Edge List Walk Validity Check

    Verify consecutive vertex transitions against explicit directed or undirected edge observations; repeated vertices and edges are allowed in a walk.

  • Edge List Boundary Cut Selector

    Select edges crossing an explicit vertex-set boundary using endpoint exclusive membership; direction and occurrence IDs remain intact.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies