Skip to main content

Recursive Algorithm Ontology

Algorithm Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 09 November 2026
Audio Overview
SEMANTIC LIBRARY — FLOW ALGEBRA v1.0
RECURSIVE ALGORITHM ONTOLOGY
Category: Computational Entities / Algorithm Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/algorithm-entities/recursive-algorithm-ontology-2.html
Authors: Mark Anthony Higgins — Sky Recursive AI
Prepared: 09 November 2026
Status: Constructed ontology-level Flow Algebra mapping; not a transcription of inaccessible embedded specifications.

1. PURPOSE
Represent recursive algorithms as typed entities with explicit state, base cases, reduction rules, call relationships, invariants, resource limits, and verifiable termination conditions.

2. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = current problem instance, arguments, call stack and intermediate results.
R_t = recursion rules, decomposition, combination and return semantics.
B_t = base-case predicates, safety constraints and resource budgets.
K_t = algorithm knowledge: types, invariants, preconditions and established results.
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t) and type_valid(x, K_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t)
Note: argmax is an optional selection model for competing valid recursion paths; deterministic algorithms instead use a specified transition rule.

3. ENTITY GRAPH
RecursiveAlgorithm -> HAS -> InputDomain
RecursiveAlgorithm -> DEFINES -> BaseCase
RecursiveAlgorithm -> DEFINES -> RecursiveCase
RecursiveCase -> INVOKES -> RecursiveAlgorithm
RecursiveCall -> TRANSFORMS -> ProblemInstance
RecursiveCall -> CREATES -> StackFrame
StackFrame -> HOLDS -> LocalState
RecursiveCase -> COMBINES -> SubproblemResults
RecursiveAlgorithm -> MAINTAINS -> Invariant
RecursiveAlgorithm -> REQUIRES -> TerminationMeasure
RecursiveAlgorithm -> PRODUCES -> Output
RecursiveAlgorithm -> CONSUMES -> TimeAndMemoryResources

4. FORMAL RECURSION RULES
For input x in domain D:
F(x) = base(x)                                  if BaseCase(x)
F(x) = combine(x, F(g_1(x)), ..., F(g_k(x)))    otherwise
Precondition: each g_i(x) is in D.
Correctness: base and combine preserve the output specification.
Termination: a well-founded measure mu:D->W decreases on every recursive edge; W has no infinite descending chains.

5. EXECUTION PATHWAY
INPUT -> VALIDATE -> TEST_BASE_CASE
TEST_BASE_CASE[true] -> RETURN_BASE_RESULT
TEST_BASE_CASE[false] -> DECOMPOSE -> VALIDATE_SUBPROBLEMS -> RECURSE -> COMBINE -> RETURN
Errors or exceeded limits -> CONTROLLED_FAILURE, not silent success.

6. RECURSIVE STATE TRANSITIONS
State = (input, depth, call_stack, partial_results, budget, status)
status in {READY, ACTIVE, WAITING, RETURNED, FAILED}
READY -> ACTIVE when preconditions hold.
ACTIVE -> RETURNED when base case holds.
ACTIVE -> WAITING when valid recursive calls are created.
WAITING -> RETURNED when all required results are available and combine succeeds.
Any nonterminal state -> FAILED on invalid input, invariant violation or exhausted budget.

7. INFERENCE RULES
IF BaseCase(x) THEN Result(x) = base(x).
IF not BaseCase(x) AND all subcalls terminate AND combine is defined THEN Result(x) = combine(subresults).
IF a recursive call does not decrease the declared well-founded measure THEN termination is not established.
IF repeated subproblems occur AND memoisation is permitted THEN cached results may replace recomputation.
IF depth exceeds configured maximum THEN return RESOURCE_LIMIT rather than asserting termination.
IF preconditions fail THEN reject the input or return a typed error.

8. COMPLEXITY AND RESOURCES
T(n) = sum_i T(size(g_i(x))) + C_decompose(n) + C_combine(n).
Auxiliary stack space is proportional to maximum active recursion depth, excluding other allocations.
Memoisation changes time/space trade-offs and requires valid cache keys and stable result semantics.
Tail-call optimisation is implementation-dependent and must not be assumed.

9. MINI RECURSION ENGINE
Receive instance x and declared specification.
Validate types, preconditions, recursion budget and invariants.
If BaseCase(x), return base(x) with evidence.
Otherwise derive subinstances using authorised reduction rules.
Verify each subinstance and its termination measure.
Evaluate subinstances; combine results under declared rules.
Verify postconditions; return result and provenance.
On failure, return explicit failure status and reason.

10. EXECUTION GUARANTEE AND LIMITS
Conditional guarantee: if preconditions, well-founded decrease, total base cases, valid subcalls and combine correctness hold, recursion terminates with a result satisfying the specification.
No unconditional guarantee is made for arbitrary recursive programs.
An AI inference score is not a proof of algorithmic correctness.

11. SEMANTIC EQUIVALENCE
recursive procedure ~ self-referential computation with base and recursive cases
recursive call != unbounded loop (unless proven equivalent under a specified model)
recursion depth != total call count
memoisation != recursion itself

12. CITATION AND PROVENANCE
Source title: Recursive Algorithm Ontology
Source authors as displayed: Mark Anthony Higgins — Sky Recursive AI
Source publication date: 11 October 2025; revision: 02 August 2026.
Citation backlink: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/algorithm-entities/recursive-algorithm-ontology-2.html
Construction note: The public page displays an AI interpretation note but did not expose the complete underlying formal specification in accessible page text. This file is an independently constructed, topic-aligned Flow Algebra mapping.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ