5D Library › Diagnostic-to-Pedagogy Conversion Funnels, Mastery-Gated Curriculum Architecture and Certification Network Economics · 中文

Chapter 2. Prerequisite Graphs and Forgetting Curves: The Skeleton of a Course

Twelve subjects: which comes first?

A course covering many divinatory arts must first settle an ordering problem: four pillars needs the calendar and the stem-branch cycle; Qimen needs the four pillars and the hexagram images of six-line divination; fengshui (taking the nine-palace flying-star methods as an example) uses Qimen’s nine palaces. Writing “a must be finished before b” as a directed edge turns the course into a directed acyclic graph (DAG). A topological sort of the graph gives an admissible study order (Kahn 1962); how many admissible orders there are is the problem of counting linear extensions, hard in general (Brightwell and Winkler 1991), but for 12 subjects a dynamic programme over subsets computes it exactly.

Note

The prerequisites are illustrative parameters set by this book, not rules of any tradition. The hours per subject are illustrative too. In the programs, subjects carry pinyin or English abbreviations; the key is in the Preface.

Calculation

# Chapter 2. [p03] A 12-subject prerequisite graph: order, path, count.
# Subjects (hours of study): lifa calendar (12), numer numerology (6),
# astro western astrology (14), bazi four pillars (30), liuyao six lines
# (18), ziwei purple star (28), chenggu bone weight (4), meihua plum
# blossom (10), qimen (32), fengshui (24), xingming naming (10), uranian
# (16). An edge a -> b means a must be passed before b starts.
# Computed: a topological order (Kahn, alphabetical tie-break), the
# longest (critical) path in hours, the depth layers, and the exact
# number of admissible study orders (linear extensions) by a DP over
# the 2^12 subsets of passed subjects.

HOURS = {"lifa": 12, "numer": 6, "astro": 14, "bazi": 30, "liuyao": 18,
         "ziwei": 28, "chenggu": 4, "meihua": 10, "qimen": 32,
         "fengshui": 24, "xingming": 10, "uranian": 16}
EDGES = [("lifa", "bazi"), ("lifa", "ziwei"), ("lifa", "liuyao"),
         ("lifa", "chenggu"), ("liuyao", "meihua"), ("bazi", "qimen"),
         ("liuyao", "qimen"), ("qimen", "fengshui"), ("bazi", "ziwei"),
         ("numer", "xingming"), ("bazi", "xingming"), ("astro", "uranian")]

def topo(names, edges):
    indeg = {n: 0 for n in names}
    for a, b in edges:
        indeg[b] += 1
    ready = sorted(n for n in names if indeg[n] == 0)
    order = []
    while ready:
        n = ready.pop(0)
        order.append(n)
        for a, b in edges:
            if a == n:
                indeg[b] -= 1
                if indeg[b] == 0:
                    ready.append(b)
                    ready.sort()
    return order

if __name__ == "__main__":
    names = sorted(HOURS)
    order = topo(names, EDGES)
    print("   order: " + " ".join(order[:6]))
    print("          " + " ".join(order[6:]))
    finish, prev, depth = {}, {}, {}
    for n in order:
        pre = [a for a, b in EDGES if b == n]
        best = max(pre, key=lambda a: finish[a]) if pre else None
        finish[n] = HOURS[n] + (finish[best] if best else 0)
        prev[n] = best
        depth[n] = 1 + max((depth[a] for a in pre), default=0)
    end = max(finish, key=finish.get)
    path, n = [], end
    while n:
        path.append(n)
        n = prev[n]
    print("   critical path ({} h): {}".format(
        finish[end], " -> ".join(reversed(path))))
    print("   total hours: {}".format(sum(HOURS.values())))
    for d in range(1, max(depth.values()) + 1):
        print("   layer {}: {}".format(
            d, " ".join(n for n in order if depth[n] == d)))
    idx = {n: i for i, n in enumerate(names)}
    need = [0] * len(names)
    for a, b in EDGES:
        need[idx[b]] |= 1 << idx[a]
    ways = [0] * (1 << len(names))
    ways[0] = 1
    for m in range(1 << len(names)):
        if ways[m]:
            for i in range(len(names)):
                if not m >> i & 1 and need[i] & m == need[i]:
                    ways[m | 1 << i] += ways[m]
    full = ways[-1]
    print("   admissible study orders: {:,d} of 12! = {:,d}".format(
        full, 479001600))
    print("   share of all orders    : {:.4f}".format(full / 479001600))
    print("\nReading: 12 edges remove all but a small share of the")
    print("orders, yet many admissible paths remain; the gate fixes")
    print("which subject may come next, not a single syllabus.")
#    order: astro lifa bazi chenggu liuyao meihua
#           numer qimen fengshui uranian xingming ziwei
#    critical path (98 h): lifa -> bazi -> qimen -> fengshui
#    total hours: 204
#    layer 1: astro lifa numer
#    layer 2: bazi chenggu liuyao uranian
#    layer 3: meihua qimen xingming ziwei
#    layer 4: fengshui
#    admissible study orders: 543,510 of 12! = 479,001,600
#    share of all orders    : 0.0011
#
# Reading: 12 edges remove all but a small share of the
# orders, yet many admissible paths remain; the gate fixes
# which subject may come next, not a single syllabus.
The prerequisite graph of 12 subjects. Heavy arrows mark the critical path.

The 12 subjects total 204 hours in four layers. The critical path is lifa -> bazi -> qimen -> fengshui, 98 hours: even a learner who studies several subjects at once must complete these 98 hours before sitting fengshui. Twelve prerequisite edges cut the 12! = 479,001,600 permutations to 543,510, a share of 0.0011. But more than half a million admissible orders still means that a mastery gate fixes “what may be studied next”, not a single syllabus. A course can offer different learners different paths.

What is learned is forgotten: two curves

Ebbinghaus first measured forgetting with nonsense syllables (Ebbinghaus 1885). The form of the curve has been argued over ever since: Wixted and Ebbesen found that a power function fits forgetting better than an exponential (Wixted and Ebbesen 1991); Anderson and Tweney pointed out that averaging the curves of many people, each forgetting exponentially, produces what looks like a power law (Anderson and Tweney 1997). The benefit of spaced review has strong experimental support (Cepeda et al. 2006).

The program calibrates both curves so that recall is 0.9 after SS days, where SS is the memory’s stability: exponential, R(t)=0.9t/SR(t) = 0.9^{t/S}; power law, R(t)=1/(1+t/(9S))R(t) = 1/(1 + t/(9S)). A review is scheduled when recall falls to the target 0.80, and a successful review multiplies SS by 2.5.

Calculation

# Chapter 2. [p04] Exponential versus power-law forgetting; spacing.
# Both curves are calibrated so that recall is 0.9 after S days, where
# S is the memory's stability:
#     exponential  R(t) = 0.9 ** (t / S)
#     power law    R(t) = 1 / (1 + t / (9 S))
# A review is scheduled when R falls to the target 0.80; a successful
# review multiplies S by 2.5. Starting from S = 1 day, the program counts
# the reviews needed to keep recall >= 0.80 for 90 days and the recall
# on day 90 with no review at all. It then averages exponential curves
# over learners whose S is lognormal (median 1, log-sd 1.2): a crowd of
# exponential forgetters looks like a power law.
import math
import random

TARGET, GROW, HORIZON = 0.80, 2.5, 90

def r_exp(t, s):
    return 0.9 ** (t / s)

def r_pow(t, s):
    return 1 / (1 + t / (9 * s))

def gap(model, s):
    if model == "exp":
        return s * math.log(TARGET) / math.log(0.9)
    return 9 * s * (1 / TARGET - 1)

def schedule(model):
    t, s, days = 0.0, 1.0, []
    while True:
        t += gap(model, s)
        if t >= HORIZON:
            return days
        days.append(t)
        s *= GROW

if __name__ == "__main__":
    for model, f in (("exp", r_exp), ("pow", r_pow)):
        days = schedule(model)
        print("   {}: no review, recall on day 90 = {:.5f}".format(
            model, f(HORIZON, 1.0)))
        print("        reviews needed: {}  on days {}".format(
            len(days), " ".join("{:.1f}".format(d) for d in days)))
    rng = random.Random(74004)
    ss = [math.exp(rng.gauss(0, 1.2)) for _ in range(20000)]
    print("   crowd of exponential forgetters (lognormal S):")
    print("        day   crowd   pow(S=1)  exp(S=1)")
    for t in (1, 3, 10, 30, 90):
        crowd = sum(r_exp(t, s) for s in ss) / len(ss)
        print("        {:3d} {:7.3f} {:9.3f} {:9.5f}".format(
            t, crowd, r_pow(t, 1), r_exp(t, 1)))
    print("\nReading: four expanding reviews hold recall at the")
    print("target for 90 days under either law. Without review, the")
    print("two laws part company by orders of magnitude; and a crowd")
    print("of exponential learners already shows a power-law tail, so")
    print("a population curve cannot decide the individual law.")
#    exp: no review, recall on day 90 = 0.00008
#         reviews needed: 4  on days 2.1 7.4 20.6 53.7
#    pow: no review, recall on day 90 = 0.09091
#         reviews needed: 4  on days 2.2 7.9 21.9 57.1
#    crowd of exponential forgetters (lognormal S):
#         day   crowd   pow(S=1)  exp(S=1)
#           1   0.839     0.900   0.90000
#           3   0.655     0.750   0.72900
#          10   0.378     0.474   0.34868
#          30   0.157     0.231   0.04239
#          90   0.041     0.091   0.00008
#
# Reading: four expanding reviews hold recall at the
# target for 90 days under either law. Without review, the
# two laws part company by orders of magnitude; and a crowd
# of exponential learners already shows a power-law tail, so
# a population curve cannot decide the individual law.
Exponential forgetting, power-law forgetting and the average of a crowd of exponential forgetters. The horizontal axis is symmetric-log.

Under either law, four reviews at expanding intervals keep recall at or above 0.80 for 90 days: on days 2.1, 7.4, 20.6 and 53.7 under the exponential, and 2.2, 7.9, 21.9 and 57.1 under the power law – almost the same schedule. Without review, the two differ by orders of magnitude: on day 90 recall is 0.00008 under the exponential and 0.09091 under the power law. The third part is Anderson and Tweney’s point: a crowd of exponential forgetters with differing stabilities still averages 0.041 on day 90, far above a single exponential forgetter, and looks like a power law.

Two lessons follow for course design. First, the review schedule is insensitive to the form of the forgetting law, so “review when recall falls to the target” is a safe rule. Second, the average curve of all learners cannot reveal an individual’s forgetting law, so it cannot set an individual’s review intervals; stability should be estimated from each learner’s own answers.

Hypothesis · not established

The author’s interpretation (not yet tested): in courses on the divinatory arts, the knowledge most easily forgotten is look-up knowledge (such as Najia assignments or the palaces of stars), and spaced review scheduled by each learner’s stability can keep recall above 0.80 after 90 days. What would show this wrong: if, in a pre-registered experiment, learners scheduled by individual stability did no better on a day-90 transfer test than learners reviewing at fixed intervals, individual scheduling would not be worth its complexity.

Summary

The prerequisite graph of 12 subjects has a critical path of 98 hours and 543,510 admissible study orders; a gate fixes the next step, not a single path. The two forgetting laws give almost the same review schedule but differ by orders of magnitude without review, and a population’s average curve cannot tell them apart.

References

Anderson, Richard B., and Ryan D. Tweney. 1997. “Artifactual Power Curves in Forgetting.” Memory & Cognition 25 (5): 724–30.
Brightwell, Graham, and Peter Winkler. 1991. “Counting Linear Extensions.” Order 8 (3): 225–42.
Cepeda, Nicholas J., Harold Pashler, Edward Vul, John T. Wixted, and Doug Rohrer. 2006. “Distributed Practice in Verbal Recall Tasks: A Review and Quantitative Synthesis.” Psychological Bulletin 132 (3): 354–80.
Ebbinghaus, Hermann. 1885. Über Das Gedächtnis: Untersuchungen Zur Experimentellen Psychologie. Duncker & Humblot.
Kahn, A. B. 1962. “Topological Sorting of Large Networks.” Communications of the ACM 5 (11): 558–62.
Wixted, John T., and Ebbe B. Ebbesen. 1991. “On the Form of Forgetting.” Psychological Science 2 (6): 409–15.

Fan, Y. (2026). Diagnostic-to-Pedagogy Conversion Funnels, Mastery-Gated Curriculum Architecture and Certification Network Economics: Self-Cannibalization Bounds, Spaced-Retrieval Curves and Two-Sided Practitioner Licensing [诊学一体转化漏斗、掌握度门控课程与持牌人网络经济学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090197 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).