viewof numPaths = Inputs.range([1, 10], {
value: 3,
step: 1,
label: "Number of alternative paths:"
})
viewof linkReliability = Inputs.range([0.5, 0.99], {
value: 0.9,
step: 0.01,
label: "Individual link reliability:"
})
circuitFailure = 1 - linkReliability
packetFailure = Math.pow(1 - linkReliability, numPaths)
packetSuccess = 1 - packetFailure
improvement = packetSuccess / linkReliability
html`<div style="background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #3498DB; margin: 20px 0;">
<h4 style="margin: 0 0 15px 0; color: #2C3E50;">Packet Switching Reliability (Baran's Insight)</h4>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px;">
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0;">
<div style="font-size: 0.9em; color: #7F8C8D; margin-bottom: 5px;">Circuit Switching (AT&T)</div>
<div style="font-size: 1.8em; font-weight: 600; color: #E67E22;">${(linkReliability * 100).toFixed(1)}%</div>
<div style="font-size: 0.85em; color: #7F8C8D; margin-top: 5px;">Single path reliability</div>
<div style="font-size: 0.85em; color: #7F8C8D; margin-top: 8px;">If link fails, entire call drops</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0;">
<div style="font-size: 0.9em; color: #7F8C8D; margin-bottom: 5px;">Packet Switching (Baran)</div>
<div style="font-size: 1.8em; font-weight: 600; color: #16A085;">${(packetSuccess * 100).toFixed(2)}%</div>
<div style="font-size: 0.85em; color: #7F8C8D; margin-top: 5px;">${numPaths} alternative paths</div>
<div style="font-size: 0.85em; color: #7F8C8D; margin-top: 8px;">All paths must fail to lose message</div>
</div>
</div>
<div style="font-size: 0.9em; color: #2C3E50; background: #e3f2fd; padding: 12px; border-radius: 6px;">
<strong>Reliability improvement:</strong> ${improvement.toFixed(2)}× more reliable than circuit switching<br>
<strong>Message delivery:</strong> ${(packetSuccess * 100).toFixed(2)}% vs ${(linkReliability * 100).toFixed(1)}%<br>
<strong>Why AT&T was wrong:</strong> Multiple unreliable paths can be MORE reliable than one "perfect" circuit
</div>
</div>`Packet Switching Reliability (Baran’s Insight)
Packet Switching Reliability (Baran’s Insight)
animation
fundamentals
networking