Description
Return oppositeParity and oddCycleWitness when parity is the same.
Local graph quantities describe a vertex, an edge, or a small neighborhood. Their algebra often assumes a simple undirected graph; using the same expression for loops, multigraphs, or directed data can change its meaning.
Return oppositeParity and oddCycleWitness when parity is the same.
When to use this tool
Use Graph Distance Parity Edge Flip when you need a local graph quantity from explicitly supplied neighborhoods or counts.
How to use the tool and how it works
- Enter leftDistance, rightDistance. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read oppositeParity, oddCycleWitness. Inspect oppositeParity, oddCycleWitness before interpreting the associated values.
Require nonnegative integer leftDistance and rightDistance differing by at most one. Return oppositeParity and oddCycleWitness when parity is the same.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| leftDistance | Left Distance | Required. Safe integer; minimum 0. |
| rightDistance | Right Distance | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| oppositeParity | Opposite Parity | Required. Boolean. |
| oddCycleWitness | Odd Cycle Witness | Required. Boolean. |
{
"input": {
"leftDistance": 2,
"rightDistance": 3
},
"output": {
"oppositeParity": true,
"oddCycleWitness": false
}
} Limitations and assumptions
- The witness interpretation assumes valid same-root undirected shortest-path levels and a proposed connecting edge; the tool does not verify distances, reachability, the graph, or an actual cycle path.
- 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
Inspect the actual graph or run a full traversal when the claim depends on global structure. Match the algorithm's graph model to direction, loops, multiplicity, and connectivity requirements.
References
Similar or alternative tools
- Graph Color Single Edge Conflict
Return conflict when firstColor equals secondColor literally.
- Bfs Layer Edge Level Gap
For directed edges allow any gap at most one; for undirected edges require absolute gap at most one.