Skip to content

N-Version Programming

Independently designed software versions perform one required function, and a cross-version decision uses their comparable results to tolerate some design faults.

Core Idea

N-version programming uses at least two separately designed programs to perform one required function. They receive corresponding inputs, produce comparable results, and a specified decision mechanism compares those results. A wrong result from one version may be detected or masked, but that depends on the other versions and the decision rule. Independent development does not guarantee independent Failure.[1][2]

How would you explain it like I'm…

Ask Several, Compare Answers

Imagine asking two or three different friends to each solve the same puzzle on their own, then checking whether their answers match. If one friend makes a mistake but the others agree on the right answer, you can catch it. N-version programming does this with computer programs. But friends can still all make the same mistake if the puzzle is confusing.

Separate Programs, Compare Answers

N-version programming means having separate teams each write their own program to do the same job. All the versions get the same input, and their answers are compared using a rule, such as going with what most of them say. If one version makes a mistake while the others give a different, correct answer, the system can pick the right answer or notice that they disagree. But the versions being written separately doesn't guarantee they make mistakes separately: if the instructions were unclear, or a problem is hard for everyone, several versions can make the same mistake together.

Design-Diverse Software Redundancy

N-version programming builds at least two versions of software for the same job through separate design efforts, runs them on the same inputs, and compares their results using a specified decision rule. The goal is to survive some design faults: if one version is wrong and the others give a clearly different right answer, the decision mechanism can pick an acceptable result or flag the disagreement. For this to work, the requirements, input format, comparison points, and allowed variation in outputs must be specified precisely. The word 'independent' describes the development efforts, not the failures. A shared ambiguous requirement, a common tool bug, or an especially hard case can make separate programs agree on the same wrong answer. An experiment by Knight and Leveson found such coincident failures more often than an independence model predicted, though they limited that finding to their own experiment.

 

N-version programming constructs two or more software versions of the same required function through separate development efforts, executes them on corresponding inputs, and compares their outputs under a specified decision rule. The rationale is fault tolerance against implementation-design faults: when one version is wrong and the others yield a distinguishable correct result, the decision mechanism can select an acceptable output or detect disagreement. This requires a shared specification of the requirement, input contract, comparison points, and permissible output variation, so that independently built versions can operate as a single unit. Crucially, independence refers to the development efforts, not to statistical independence of failures. Ambiguous shared requirements, common tool faults, or intrinsically difficult inputs can produce correlated errors in which separately written programs agree on a wrong answer. Knight and Leveson observed coincident failures more often than an independence model predicted for one simulated decision problem, while explicitly restricting that conclusion to their experiment. The method is therefore a design pattern with a conditional reliability argument, not a guarantee that adding versions improves reliability.

Scope of Application

The method applies where a software function can be implemented more than once and checked at agreed decision points. Avizienis describes an airport scheduling/reservation experiment with eighteen delivered versions and transaction-end checks. Knight and Leveson studied twenty-seven independently written versions of a simulated radar-decision program. Neither case is evidence that these experimental programs controlled a real airport or interceptor.[1][2]

Clarity

Three claims must stay separate: copies of one program provide replication; separately written versions provide design diversity; a measured low rate of joint error would support a reliability estimate. Only the second is built into the N-version method. Two disagreeing versions can detect a problem without identifying the correct one, and a majority can still be wrong if errors coincide.[1][2]

Manages Complexity

The pattern reduces a complicated software design to a few essential questions: What common function is required? Who independently designed the versions? How are inputs and outputs aligned? What does the decision mechanism do on disagreement? What shared faults remain possible? Version count alone answers none of the last questions.[1]

Abstract Reasoning

Check that versions implement the same function, were designed separately, receive comparable inputs, and send corresponding outputs to a declared decision rule. Then analyze when an erroneous version can be overruled—and when correlated erroneous outputs or a defective voter can defeat the scheme. Knight and Leveson found more coincident failures than an independence model predicted for their particular experimental task, not for every possible N-version application.[1][2]

Knowledge Transfer

The same software pattern can be recognized in database transactions and simulated decision functions, although their input types, checkpoints and error consequences differ. The broader idea of deliberately redundant, diverse means belongs to live Redundancy Engineering, the proposed strict parent, and to the more portable Redundancy and Diversification primes. Calling ordinary duplicated hardware “N-version programming” is only analogy unless independently designed software versions and their comparison rule are actually present.[1][2]

Relationships to Other Abstractions

Local relationship map for N-Version ProgrammingParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.N-Version ProgrammingDOMAINDomain-specific abstraction: Redundancy (engineering) — is a kind ofRedundancy(engineering)DOMAIN

Current abstraction N-Version Programming Domain-specific

Parents (1) — outgoing typed relations

  • N-Version Programming is a kind of Redundancy (engineering) Domain-specific

    Independently designed software versions intentionally duplicate a required function so selected failures need not defeat it.

Hierarchy paths (12) — routes to 8 parentless roots

Neighborhood in Abstraction Space

N-Version Programming sits in a sparse region of the domain-specific corpus (66th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Software & Systems Architecture (33 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Algirdas Avizienis, “The N-Version Approach to Fault-Tolerant Software”, IEEE Transactions on Software Engineering 11(12) (1985), 1491–1501, especially §§II–IV. registry ↩a ↩b ↩c ↩d ↩e ↩f

[2] John C. Knight and Nancy G. Leveson, “An Experimental Evaluation of the Assumption of Independence in Multi-Version Programming”, original author paper / University of Virginia Technical Report TR-85-11 (1985), abstract and §§1–2, 8; journal version in IEEE Transactions on Software Engineering SE-12(1) (1986), 96–109. registry ↩a ↩b ↩c ↩d ↩e