optimization-ai999x / figures /shortest-path-graph.svg
ibnuljaiffarabi's picture
optimization-ai999x 1.6.4: Apache-2.0 release
8a0cb23
|
Raw History Blame Contribute Delete
3.45 kB
<svg class="axp" viewBox="0 0 520 420" role="img" aria-labelledby="axp-optimization-s-2-t" aria-describedby="axp-optimization-s-2-d" xmlns="http://www.w3.org/2000/svg" font-family="system-ui, sans-serif" font-size="12" width="520" height="420"><style>.axp-c{fill:none;stroke:#e0306f;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}.axp-d{fill:#e0306f}.axp-c3,.axp-c4{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}.axp-c3{stroke:#7a5cf0}.axp-c4{stroke:#8a8794;stroke-width:1.8}.axp-d4{fill:#8a8794}.axp-lt{fill:#7f7c8a;font-size:13px}</style><title id="axp-optimization-s-2-t">Shortest path and minimum spanning tree</title><desc id="axp-optimization-s-2-d">A weighted network (A-B 4, A-C 2, B-C 1, B-D 5, C-D 8, A-E 7, E-D 3, C-E 6): the shortest path from A to D the package finds, A → C → B → D of length 8, and its minimum spanning tree (B-C, A-C, E-D, B-D, total weight 11).</desc><clipPath id="axp-optimization-s-2-k"><rect x="16" y="54" width="488" height="352"/></clipPath><g clip-path="url(#axp-optimization-s-2-k)"><path class="axp-c4" d="M260.0,78.3 L419.5,194.2" style="stroke-width:1.6"/><path class="axp-c3" d="M260.0,78.3 L100.5,194.2" style="stroke-width:4"/><path class="axp-c3" d="M419.5,194.2 L100.5,194.2" style="stroke-width:4"/><path class="axp-c3" d="M419.5,194.2 L358.6,381.7" style="stroke-width:4"/><path class="axp-c4" d="M100.5,194.2 L358.6,381.7" style="stroke-width:1.6"/><path class="axp-c4" d="M260.0,78.3 L161.4,381.7" style="stroke-width:1.6"/><path class="axp-c3" d="M161.4,381.7 L358.6,381.7" style="stroke-width:4"/><path class="axp-c4" d="M100.5,194.2 L161.4,381.7" style="stroke-width:1.6"/><path class="axp-c" d="M260.0,78.3 L100.5,194.2" stroke-dasharray="6 4"/><path class="axp-c" d="M100.5,194.2 L419.5,194.2" stroke-dasharray="6 4"/><path class="axp-c" d="M419.5,194.2 L358.6,381.7" stroke-dasharray="6 4"/></g><circle class="axp-d" cx="260.0" cy="78.3" r="9"/><circle class="axp-d" cx="419.5" cy="194.2" r="9"/><circle class="axp-d" cx="358.6" cy="381.7" r="9"/><circle class="axp-d" cx="100.5" cy="194.2" r="9"/><circle class="axp-d4" cx="161.4" cy="381.7" r="9"/><text class="axp-lt" x="349.8" y="140.2" text-anchor="start">4</text><text class="axp-lt" x="180.2" y="126.2" text-anchor="middle">2</text><text class="axp-lt" x="260.0" y="184.2" text-anchor="middle">1</text><text class="axp-lt" x="399.1" y="292.0" text-anchor="start">5</text><text class="axp-lt" x="229.5" y="283.0" text-anchor="middle">8</text><text class="axp-lt" x="220.7" y="234.0" text-anchor="start">7</text><text class="axp-lt" x="260.0" y="371.7" text-anchor="middle">3</text><text class="axp-lt" x="140.9" y="292.0" text-anchor="start">6</text><text class="axp-lt" x="260.0" y="63.3" text-anchor="middle">A</text><text class="axp-lt" x="419.5" y="179.2" text-anchor="middle">B</text><text class="axp-lt" x="358.6" y="408.7" text-anchor="middle">D</text><text class="axp-lt" x="161.4" y="408.7" text-anchor="middle">E</text><text class="axp-lt" x="100.5" y="179.2" text-anchor="middle">C</text><line class="axp-c4" x1="16" y1="14" x2="34" y2="14"/><text class="axp-lt" x="40" y="18">other edges</text><line class="axp-c3" x1="134" y1="14" x2="152" y2="14"/><text class="axp-lt" x="158" y="18">minimum spanning tree, weight 11</text><line class="axp-c" x1="16" y1="34" x2="34" y2="34" stroke-dasharray="6 4"/><text class="axp-lt" x="40" y="38">shortest path A → D, length 8</text></svg>