---
title: "The Angels and Demons of Nondeterminism"
url: https://daily.dev/posts/the-angels-and-demons-of-nondeterminism-niz4tuhmx
source_url: https://buttondown.com/hillelwayne/archive/the-angels-and-demons-of-nondeterminism
type: article
source: "Computer Things"
published: 2026-06-17T11:26:15.715Z
updated: 2026-06-17T11:33:31.730Z
tags: ["algorithms"]
reading_time: 6
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Angels and Demons of Nondeterminism

**[Computer Things](https://daily.dev/sources/hillelwayne)** · 6 min read · 0 upvotes · 0 comments

## Summary

An exploration of two contrasting models of nondeterminism in computer science: demonic nondeterminism (worst-case path, used in formal methods and safety verification) and angelic nondeterminism (best-case path, foundational to complexity classes like NP and declarative language semantics). The piece explains how NP is defined via angelic nondeterminism, illustrates it with SAT and list membership examples, and connects it to declarative languages like SQL, regex, and logic programming. It also touches on why features that expose the underlying deterministic implementation are frustrating in declarative contexts, and briefly mentions probabilistic 'eldritch' nondeterminism beyond both models.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://buttondown.com/hillelwayne/archive/the-angels-and-demons-of-nondeterminism>

## Similar posts on daily.dev

- [Martin Fowler on Preparing for AI’s Nondeterministic Computing](https://daily.dev/posts/martin-fowler-on-preparing-for-ai-s-nondeterministic-computing-epfw1a1ms) · The New Stack · 4 upvotes · 0 comments
- [Nondeterminism's not the problem](https://daily.dev/posts/nondeterminism-s-not-the-problem-pvu9jlh8e) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#algorithms](https://daily.dev/tags/algorithms)

[View this post on daily.dev](https://daily.dev/posts/the-angels-and-demons-of-nondeterminism-niz4tuhmx)
