Logo van Algorithm Selection And Complexity

Algorithm Selection And Complexity

Community
peterbamuhigire
algorithm-selection-and-complexity

Use when choosing, reviewing, or explaining an algorithm under explicit correctness, time, space, input-scale, or maintainability constraints; use system-architecture-design for service boundaries and language skills for implementation syntax.

Overzicht

Uitgeverpeterbamuhigire
Repositorychwezi-dev-engine
Skillnaamalgorithm-selection-and-complexity
Sterren
29
Forks
6
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 1 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door peterbamuhigire op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Algorithm Selection And Complexity in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/algorithm-selection-and-complexity
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/languages/algorithm-selection-and-complexity .claude/skills/algorithm-selection-and-complexity
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Algorithm Selection And Complexity in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Algorithm Selection And Complexity automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Algorithm Selection And Complexity niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Algorithm Selection and Complexity

Choose algorithms by the problem contract and operating constraints, then prove the choice with edge cases and measurements. This skill covers a small, production-relevant catalogue; it does not replace domain, language, or architecture review.

Use When

  • A feature has a non-trivial search, matching, assignment, optimisation, graph, cache, or pathfinding problem.
  • Two correct implementations have different worst-case time, memory, or operational behaviour.
  • A developer needs a plain-language explanation before writing or reviewing code.
  • An early implementation works on examples but its behaviour at scale or at failure boundaries is unknown.

Do Not Use When

  • A standard library operation already satisfies the measured contract; use the language skill and document the chosen primitive.
  • The main decision is service decomposition, data ownership, or deployment; use the applicable architecture or operations skill.
  • The request is an interview-only puzzle with no implementation, correctness, or maintenance decision.

Inputs

InputRequiredPurpose
Problem statement and expected outputyesEstablish correctness and generality
Input shape, scale, and distributionyesBound time and memory behaviour
Failure, freshness, and determinism constraintsconditionalExpose operational risks
Baseline implementation or brute-force comparatorconditionalMeasure whether optimisation earns its complexity

Outputs

  • Algorithm decision record naming the selected algorithm, rejected alternatives, assumptions, and complexity bounds.
  • Edge-case and correctness test matrix.
  • Benchmark evidence on representative and adversarial inputs, or an explicit NOT ASSESSED record.

Evidence Produced

CategoryArtifactFormatExample
CorrectnessDecision recordMarkdown record: selected algorithm and rejected alternatives are traceable to constraintsdocs/algorithms/pathfinding-decision.md
CorrectnessCorrectness matrixMarkdown matrix: edge and failure cases are covered or marked opendocs/algorithms/pathfinding-correctness.md
PerformanceBenchmark recordMarkdown record: inputs, environment, result, and threshold are retaineddocs/algorithms/pathfinding-benchmark.md

Non-negotiables

  • Start with a clear, correct baseline before optimising.
  • Analyse worst-case time and space, not only a favourable example.
  • State what the algorithm assumes about ordering, alphabet, graph weights, cache workload, or input validity.
  • Prefer a simpler correct algorithm when the measured constraint does not require the extra machinery.
  • Do not treat a book example or asymptotic bound as production evidence.

Decision Rules

Problem shape or constraintCandidate routeRequired caution
Stable matching between two preference listsGale-ShapleyDefine proposer-side outcome and incomplete or tied preferences before implementation
Minimum-cost assignment between equal or rectangular setsHungarian algorithmConfirm the cost matrix, forbidden assignments, and padding policy
Many pattern searches or rolling-hash-friendly textRabin-KarpVerify hash hits with exact comparison; collisions are not matches
Pattern search over a stream that cannot be rewoundKnuth-Morris-PrattTest fallback-table construction and repeated-prefix cases
Long static text with a diverse alphabetHorspoolDo not use its skip assumptions blindly on tiny alphabets or short patterns
Bounded value/capacity optimisationKnapsack dynamic programmingState whether the problem is 0/1 or unbounded and bound the table size
Heuristic exploration of combinatorial pathsAnt colony optimisationDefine convergence, reproducibility, and a usable fallback; it is not an exact guarantee
All-pairs shortest paths on a manageable graphFloyd-WarshallReject negative cycles and bound the cubic work before choosing it
Maximum flow through a capacity networkPush-relabelValidate capacities, residual edges, and conservation invariants
Maximal cliques in a graphBron-KerboschExpect output-sensitive growth; constrain graph size and result volume
Lowest-cost path with a useful heuristicA*The heuristic must be admissible for optimality; handle no-path and stale-node cases
Cache with recency and frequency shiftsAdaptive replacement cacheMeasure workload, memory overhead, and eviction stability against a simpler policy

Workflow

  1. Write the problem as input, output, invariants, and failure behaviour.
  2. Implement or retain a transparent baseline and test it on empty, minimum, maximum, duplicate, malformed, and adversarial inputs.
  3. Compare candidate algorithms by correctness risk, worst-case cost, memory, data-shape assumptions, observability, and maintenance burden.
  4. Choose the smallest candidate that satisfies the stated contract. Record the reason, rejected alternative, and any heuristic or probabilistic caveat.
  5. Add proof-oriented tests for invariants and differential tests against the baseline on generated inputs where practical.
  6. Benchmark representative and worst-case distributions. Keep input fixtures, environment, result, and regression threshold with the decision record.
  7. Revisit the choice when data shape, throughput, memory budget, or failure consequences change; do not optimise from an old measurement.

Anti-patterns

  • Choosing an algorithm because its name is fashionable. Fix: start with the problem contract and measured constraint.
  • Reporting average-case speed without naming the input distribution. Fix: include worst-case analysis and a distribution-specific benchmark.
  • Replacing a correct baseline before writing differential tests. Fix: keep the baseline as an oracle for bounded fixtures.
  • Using a probabilistic hash match as proof of equality. Fix: perform exact verification after a candidate hash hit.
  • Applying A* with an overestimating heuristic while claiming optimality. Fix: prove admissibility or label the result heuristic.
  • Introducing a cache policy without measuring hit rate, memory, and eviction churn. Fix: compare it with a documented baseline.

Read next

  • python-modern-standards or the relevant language skill for implementation and tests.
  • system-architecture-design when the algorithm changes a service or data boundary.
  • database-design-engineering when indexes or query plans are the real solution.
  • advanced-testing-strategy for risk-scaled evidence and regression thresholds.

References

Capability Contract

Read and search are required. Execution is preferred for benchmarks and tests. Editing is allowed only within the authorised implementation scope.

Degraded Mode

Without representative inputs or execution, return the decision, assumptions, complexity analysis, and an explicit NOT ASSESSED benchmark requirement.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Algorithm Selection And Complexity?

Use when choosing, reviewing, or explaining an algorithm under explicit correctness, time, space, input-scale, or maintainability constraints; use system-architecture-design for service boundaries and language skills for implementation syntax.

Waarom Algorithm Selection And Complexity gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Algorithm Selection And Complexity bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Algorithm Selection And Complexity in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/algorithm-selection-and-complexity. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Algorithm Selection And Complexity gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Algorithm Selection And Complexity gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Algorithm Selection And Complexity ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Algorithm Selection And Complexity gratis?

Ja. Deze skill is door peterbamuhigire op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇