# tcs: an introduction to theoretical computer science, still in draft

> The tcs repository holds the sources of a book being written for an introductory undergraduate computer science course, published on the web in HTML and PDF and built from markdown with Pandoc. Two chapters are still missing, and the licence forbids derivatives, which is unusual for a free textbook.

**boazbk/tcs** — Book in preparation: introduction to theoretical computer science

- Repository: https://github.com/boazbk/tcs
- Website: http://introtcs.org
- Stars: 1,080 · Forks: 210
- Language: TeX
- License: NOASSERTION
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/boazbk-tcs

## A textbook that declares itself unfinished

The tcs repository is the source of a book in preparation for an introductory undergraduate course on computer science. The book is posted on the web in both HTML and PDF at introtcs.org, and the README is frank about the state of the work: two chapters are still missing, space bounded computation and proofs, and programs.

That framing matters for how you read it. A draft textbook differs from a finished one in that its chapters change under you, and the topic that is still missing, space-bounded computation, is not a minor leftover. It is where the complexity story turns from time to memory, and a reader following the narrative will notice the gap rather than feel it.

The author also asks for the kind of feedback that a live text attracts. Issues and pull requests are the channels for suggestions, comments and typo fixes, which makes the repository a working document rather than a released artefact. Anyone considering the book for a course should read it with that in mind, and check the issue tracker to see what is currently being rewritten.

## The lecture files are the book, in numbered order

The top-level listing is the table of contents, because each lecture is one markdown file with a numbered name. The sequence starts with lec_00_0_preface.md and lec_00_1_math_background.md, the latter covering the mathematics the rest of the book assumes. From there the path runs through lec_01_introduction.md, lec_02_representation.md, lec_03_computation.md with lec_03a_computing_every_function.md, and lec_04_code_and_data.md.

The middle of the book is where theoretical computer science proper starts: lec_05_infinite.md and lec_06_loops.md, then lec_07_other_models.md and lec_08_uncomputability.md with lec_08a_restricted_models.md, followed by lec_09_godel.md. Efficiency and complexity take over with lec_10_efficient_alg.md, lec_11_running_time.md, lec_12_NP.md, lec_13_Cook_Levin.md and lec_14_PvsNP.md, with lec_14a_space_complexity.md in between, which is the space-complexity material the README says is still missing.

The later chapters open outward: lec_15_probability.md, lec_16_randomized_alg.md, lec_17_model_rand.md, lec_19_cryptography.md, lec_20_alg_society.md, lec_24_proofs.md and lec_26_quantum_computing.md. The numbering has gaps, which suggests where material was cut or reserved, and the file lec_19_cryptography.md sitting between randomness and society shows how the book mixes proof content with context chapters. Supporting files complete the picture: index.md, introtcs.bib for references, macros.tex, metadata.yaml and msword.md.

## Markdown in, HTML and PDF out, with Pandoc in between

The production chain is described in the README and worth understanding, because it explains why the repository is readable as plain text. The author produces the book from a markdown source using Pandoc. The templates for the LaTeX and HTML versions are derived from Tufte LaTeX, Gitbook and Bookdown, and the related panbook repository holds some of those templates, the scripts, and the panflute filter that is used in the process.

The result is that a chapter in the repository is source, not output. A reader who wants the formatted book goes to introtcs.org, where the HTML and PDF versions are posted, and a reader who wants to fix a sentence or read a chapter in a plain text editor works in the markdown. The same panflute filter mechanism that lets a template reach into the document is what makes it possible to generate both a typeset PDF and a browsable HTML from one source.

There is a practical consequence for contributors. Editing a chapter means editing markdown, and the effect of that edit on the rendered book is not visible until the Pandoc run happens. Contributors should read CONTRIBUTING.md, which sits at the top of the repository, before opening a pull request, since the tooling and the branch conventions are set out there.

## The code lives in a separate repository

Supplemental code for the book is not in tcs. The README points to a separate repository, boazbk/tcscode, for it.

This split is the normal pattern for a book with a toolchain, and it has a cost worth naming. A reader who works through a chapter and then wants to run the example programs has to clone a second repository, and the code is versioned separately from the text that explains it, so a chapter may describe a program that has since changed. The README's instruction for the programs themselves is the tcscode link.

Acknowledgements are also kept as a file rather than buried in a chapter, with acknowledgements.md at the top level. For a text that spans mathematics, computability, complexity, cryptography and quantum computing, the record of who helped with which part is worth reading before you rely on any single chapter, and it is one of the first things the repository makes easy to find.

## A licence that forbids derivatives

The text is under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The README states it, and LICENSE.md sits at the repository root with the same terms.

The NoDerivatives and NonCommercial clauses are what separate this from the usual open textbook. You may read it, share it with attribution, and translate nothing. You may not publish a modified version, and you may not use it in a paid course, a commercial publication or a derivative ebook, and the NoDerivatives term is generally read as also covering translations for the same reason. This is a common arrangement for a book whose author is considering a printed edition, and the README says exactly that: the text will remain freely and publicly available, but a printed book version might be created in the future.

Contributions carry their own terms, and they are unusual. By making any contribution, such as a typo fix or any other suggestion or edit, the contributor assigns the author the rights to use that contribution in the online version or any other version of the work. Combined with the NoDerivatives licence, the message to a reader is that the work can be corrected and republished by its author, but not forked into a variant by somebody else. Anyone planning to reuse chapters in a corporate training programme should take their own advice on that point rather than assume the free-to-read status grants more.

## Where a work in preparation is the wrong source

The first wrong-tool case is a syllabus that needs a fixed text. A course that hands out readings by chapter number needs stable chapter numbering, and this book is explicitly still in preparation, with missing chapters and a contributor workflow that rewrites existing material as it goes. Teaching from a draft means re-checking the assignments each term.

The second is any reuse that the licence forbids. A translated edition, a revised textbook, a commercially published course or a set of derived notes all fall outside the terms, and the fix is not technical. If your organisation needs that, you have to ask the author rather than work around the licence.

The third is a reader who wants reference material rather than a course. The book is organised as a sequence with a mathematical background chapter and a preface at the start, which is the right shape for learning and the wrong shape for looking up a theorem. It also has no index in the repository listing, and the reference list is a bibliography file rather than a set of worked examples. If you want to check one definition quickly, this is the wrong place to look, and a proper reference work is the better instrument.

## v0.95 tagged in 2023, with commits continuing into 2026

The release tags tell an unusual story for a book. The listed releases are v0.95 from 2023-07-24, described as the Fall 2023 release, v0.94 from 2022-08-21 for the Fall 2022 release, and 0.93 from 2021-08-09 for the Fall 2021 release. The version numbers and the release cadence follow the academic year, which is what you would expect from a text written for a course that runs each September.

Between those tags the repository keeps moving. The last push was on 2026-10-06, well after the most recent tag, which tells you the work continues on the master branch without a new version being cut each time. The primary language is TeX, reflecting the LaTeX half of the production chain even though the sources are markdown, and there is a small stray artefact, __latexindent_temp.tex, left at the root, which is the kind of debris a long-lived TeX workflow leaves behind.

The two missing chapters are the clearest signal about what to expect. Space-bounded computation and proofs, and programs, are exactly the parts a reader who wants a complete course in computability will want most, and they are the parts not yet written.

## Conclusion

Adopt tcs as a reading course if you want a single self-contained path through computability, complexity and randomness, and if you are willing to read a draft that is still being revised. Do not adopt it as the base for a derivative textbook, a translated edition or a commercial course, because the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 licence forbids those uses, and do not use it as the sole source for a syllabus while two chapters remain unwritten. Before you rely on it, check the introtcs.org page for the current text, read the acknowledgements.md and CONTRIBUTING.md files, and expect the text to change as the missing chapters on space-bounded computation and on programs arrive.

## FAQ

### What is the tcs book and where can I read it?

It is a book in preparation for an introductory undergraduate computer science course, published on the web in HTML and PDF at introtcs.org. The repository holds the markdown sources for the same book.

### Is the tcs textbook finished?

No. The README states that two chapters are still missing, space bounded computation and proofs, and programs. The repository is the git repository for a book in preparation, with issues and pull requests used for suggestions and typo fixes.

### Can I translate or modify the tcs textbook?

The text is under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits reading and sharing with attribution but forbids derivative and commercial versions. Contributing an edit assigns the author the rights to use that contribution in any version of the work.

### Where do I find the example code for the tcs book?

The supplemental code is in a separate repository, boazbk/tcscode, linked from the README. It is versioned separately from the book sources, so an example may have changed since a chapter was written.

### What tools are used to build the tcs book?

The author produces the book from a markdown source using Pandoc, with templates for the LaTeX and HTML versions derived from Tufte LaTeX, Gitbook and Bookdown. The related panbook repository holds some templates, scripts and the panflute filter used in the process.

## Sources

- [boazbk/tcs on GitHub](https://github.com/boazbk/tcs)
- [Issues](https://github.com/boazbk/tcs/issues)
- [Project website](http://introtcs.org)
- [README](https://github.com/boazbk/tcs/blob/master/README.md)
- [Releases](https://github.com/boazbk/tcs/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/boazbk-tcs
