graph-algorithms

0
0
Source

Problem-solving strategies for graph algorithms in graph number theory

Install

mkdir -p .claude/skills/graph-algorithms && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4581" && unzip -o skill.zip -d .claude/skills/graph-algorithms && rm skill.zip

Installs to .claude/skills/graph-algorithms

About this skill

Graph Algorithms

When to Use

Use this skill when working on graph-algorithms problems in graph number theory.

Decision Tree

  1. Traversal selection

    • BFS: shortest paths (unweighted), level structure
    • DFS: cycle detection, topological sort, SCC
  2. Shortest path algorithms

    AlgorithmUse CaseComplexity
    DijkstraNon-negative weightsO((V+E) log V)
    Bellman-FordNegative weightsO(VE)
    Floyd-WarshallAll pairsO(V^3)
  3. Minimum Spanning Tree

    • Prim's: dense graphs, greedy from vertex
    • Kruskal's: sparse graphs, union-find
    • z3_solve.py prove "cut_property"
  4. Network Flow

    • Max-flow = min-cut (Ford-Fulkerson)
    • Matching via flow network
    • sympy_compute.py linsolve "flow_conservation"
  5. Graph properties

    • Spectral: eigenvalues of adjacency matrix
    • Connectivity: via DFS/BFS
    • Coloring: greedy or SAT reduction

Tool Commands

Sympy_Adjacency

uv run python -m runtime.harness scripts/sympy_compute.py eigenvalues "adjacency_matrix"

Z3_Dijkstra

uv run python -m runtime.harness scripts/z3_solve.py prove "d[v] >= d[u] + w(u,v) for all edges"

Z3_Mst_Cut

uv run python -m runtime.harness scripts/z3_solve.py prove "min_edge_crossing_cut_in_mst"

Sympy_Flow

uv run python -m runtime.harness scripts/sympy_compute.py linsolve "flow_conservation_equations"

Key Techniques

From indexed textbooks:

  • [Graph Theory (Graduate Texts in Mathematics (173))] Given two numerical graph invariants i1 and i2, write i1 i2 if we can force i2 to be arbitrarily high on some subgraph of G by assuming that i1(G) is large enough. Formally: write i1 i2 if there exists a function f : N → N such that, given any k ∈ N, every graph G with i1(G) f (k) has a subgraph H with i2(H) k. If i1 i2 as well as i1 i2, write i1 ∼ i2.
  • [Graph Theory (Graduate Texts in Mathematics (173))] Find the smallest integer b = b(k) such that every graph of order n with more than kn + b edges has a (k + 1)-edge- connected subgraph, for every k ∈ N. Show that every tree T has at least Δ(T ) leaves. Show that a tree without a vertex of degree 2 has more leaves than other vertices.
  • [Graph Theory (Graduate Texts in Mathematics (173))] For every n > 1, nd a bipartite graph on 2n vertices, ordered in such a way that the greedy algorithm uses n rather than 2 colours. Exercises Consider the following approach to vertex colouring. First, nd a max- imal independent set of vertices and colour these with colour 1; then nd a maximal independent set of vertices in the remaining graph and colour those 2, and so on.
  • [Graph Theory (Graduate Texts in Mathematics (173))] Show that, for every r ∈ N, every innite graph of upper density s subgraph for every s ∈ N. Deduce that the upper density of innite graphs can only take r−1 has a K r the countably many values of 0, 1, 1 2 , 2 3 , 3 4 Extremal Graph Theory Given a tree T , nd an upper bound for ex(n, T ) that is linear in n and independent of the structure of T , i. Prove the Erd˝os-S´os conjecture for the case when the tree considered is a star.
  • [Graph Theory (Graduate Texts in Mathematics (173))] Colouring Slightly more generally, a class G of graphs is called χ-bounded if there exists a function f : N → N such that χ(G) f (r) for every graph G ⊇ Kr in G. In such graphs, then, we can force a Kr subgraph by making χ larger than f (r). Show that the four colour theorem does indeed solve the map colouring problem stated in the rst sentence of the chapter.

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.