Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
The Art of Computer Programming
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Books about algorithms by Donald Knuth}} {{Distinguish|The Art of Unix Programming}} {{Use mdy dates|date=October 2022|cs1-dates=y}} {{Infobox book | name = The Art of Computer Programming | image = ArtOfComputerProgramming.svg | caption = ''The Art of Computer Programming, Volume 1: Fundamental Algorithms'' | border = yes | author = [[Donald Knuth]] | country = United States | language = English | dewey = 519 | congress = QA76.75 | genre = [[Non-fiction]]<br /> [[Monograph]] | publisher = [[Addison-Wesley]] | pub_date = 1968– (the book is still incomplete) | media_type = Print ([[Hardcover]]) | isbn = 0-201-03801-3 }} '''''The Art of Computer Programming''''' ('''''TAOCP''''') is a comprehensive multi-volume [[monograph]] written by the computer scientist [[Donald Knuth]] presenting [[Computer programming|programming]] [[algorithm]]s and [[analysis of algorithms|their analysis]]. {{As of|2025}} it consists of published volumes 1, 2, 3, 4A, and 4B, with more expected to be released in the future. The Volumes 1–5 are intended to represent the central core of computer programming for sequential machines; the subjects of Volumes 6 and 7 are important but more specialized.<ref>{{cite web |url=https://www-cs-faculty.stanford.edu/~knuth/taocp.html#future |title=Kuth's note about his books |access-date=2025-03-28 |archive-date=2025-03-01 |archive-url=https://web.archive.org/web/20250301062919/https://www-cs-faculty.stanford.edu/~knuth/taocp.html#future |url-status=live }}</ref> When Knuth began the project in 1962, he originally conceived of it as a single book with twelve chapters. The first three volumes of what was then expected to be a seven-volume set were published in 1968, 1969, and 1973. Work began in earnest on Volume 4 in 1973, but was suspended in 1977 for work on [[TeX|typesetting]] prompted by the second edition of Volume 2. Writing of the final copy of Volume 4A began in longhand in 2001, and the first online pre-fascicle, 2A, appeared later in 2001.<ref>{{cite web |url=https://oac.cdlib.org/findaid/ark:/13030/kt2k4035s1/entire_text |title=note for box 3, folder 1 |access-date=2019-12-03 |archive-date=2019-12-03 |archive-url=https://web.archive.org/web/20191203042158/https://oac.cdlib.org/findaid/ark:/13030/kt2k4035s1/entire_text/ |url-status=live }}</ref> The first published installment of Volume 4 appeared in paperback as [[Fascicle (book)|Fascicle]] 2 in 2005. The hardback Volume 4A, combining Volume 4, Fascicles 0–4, was published in 2011. Volume 4, Fascicle 6 ("Satisfiability") was released in December 2015; Volume 4, Fascicle 5 ("Mathematical Preliminaries Redux; Backtracking; Dancing Links") was released in November 2019. Volume 4B consists of material evolved from Fascicles 5 and 6.<ref>{{cite book |url=https://www.informit.com/store/art-of-computer-programming-volume-4b-combinatorial-9780201038064 |title=Pearson InformIT webpage book Content tab |date=September 28, 2022 |publisher=Addison-Wesley Professional. |isbn=9780201038064 |access-date=2022-07-19 |archive-date=2022-07-19 |archive-url=https://web.archive.org/web/20220719173226/https://www.informit.com/store/art-of-computer-programming-volume-4b-combinatorial-9780201038064 |url-status=live }}</ref> The manuscript was sent to the publisher on August 1, 2022, and the volume was published in September 2022.<ref>{{cite book |url=https://www.informit.com/store/art-of-computer-programming-volume-4b-combinatorial-9780201038064 |title=Pearson InformIT webpage |date=September 28, 2022 |publisher=Addison-Wesley Professional. |isbn=9780201038064 |access-date=2022-07-19 |archive-date=2022-07-19 |archive-url=https://web.archive.org/web/20220719173226/https://www.informit.com/store/art-of-computer-programming-volume-4b-combinatorial-9780201038064 |url-status=live }}</ref> Fascicle 7 ("Constraint Satisfaction"), planned for Volume 4C, was the subject of Knuth's talk on August 3, 2022<ref>{{cite web |url=https://cp2022.a4cp.org/invited.html |title=CP 2022 All Questions Answered, July 31–August 5, 2022, Haifa, Israel |access-date=2022-07-22 |archive-date=2022-07-22 |archive-url=https://web.archive.org/web/20220722163902/https://cp2022.a4cp.org/invited.html |url-status=live }}</ref> and was published on February 5, 2025.<ref>{{cite book |url=https://www.informit.com/store/art-of-computer-programming-volume-4-fascicle-7-constraint-9780135328248 |title=Pearson InformIT webpage |date=February 5, 2025 |publisher=Addison-Wesley Professional. |isbn=9780135328248 |access-date=2025-02-18 |archive-date=2025-02-18 |archive-url=https://web.archive.org/web/20250218090228/https://www.informit.com/store/art-of-computer-programming-volume-4-fascicle-7-constraint-9780135328248 |url-status=live }}</ref> ==History== [[File:KnuthAtOpenContentAlliance.jpg|right|thumb|200px|Donald Knuth in 2005]] After winning a [[Regeneron Science Talent Search|Westinghouse Talent Search]] scholarship, Knuth enrolled at the Case Institute of Technology (now [[Case Western Reserve University]]), where his performance was so outstanding that the faculty voted to award him a [[Master of Science|master of science]] upon his completion of the [[bachelor's degree]]. During his summer vacations, Knuth was hired by the [[Burroughs Corporation]] to write [[compiler]]s, earning more in his summer months than full professors did for an entire year.<ref>{{cite web |url=https://conservancy.umn.edu/handle/11299/107413 |hdl=11299/107413 |title=An Interview with Donald E. Knuth |author-first=Philip L. |author-last=Frana |date=2001-11-08 |access-date=2018-06-20 |archive-date=2018-06-20 |archive-url=https://web.archive.org/web/20180620181207/https://conservancy.umn.edu/handle/11299/107413 |url-status=live }}</ref> Such exploits made Knuth a topic of discussion among the mathematics department, which included [[Richard S. Varga]]. In January 1962, when he was a graduate student in the mathematics department at Caltech, Knuth was approached by [[Addison-Wesley]] to write a book about compiler design, and he proposed a larger scope. He came up with a list of twelve chapter titles the same day. In the summer of 1962 he worked on a [[Fortran|FORTRAN]] compiler for [[UNIVAC]], considering that he had "sold my soul to the devil" to develop a FORTRAN compiler<ref name="Feigenbaum 2007">{{cite web |last1=Feigenbaum |first1=Edward |author-link1=Edward Feigenbaum |title=Oral History of Donald Knuth |url=https://archive.computerhistory.org/resources/text/Oral_History/Knuth_Don_1/Knuth_Don.oral_history.2007.102658053_all.pdf |url-status=live |website=Computer History Museum |access-date=2024-11-26 |date=2007 |archive-date=2008-12-09 |archive-url=https://web.archive.org/web/20081209120854/http://archive.computerhistory.org/resources/text/Oral_History/Knuth_Don_1/Knuth_Don.oral_history.2007.102658053_all.pdf }}</ref>{{rp|15}} after [[ALGOL]] developments with Burroughs. He remained as a consultant to Burroughs over the period 1960 to 1968 while writing Volume 1 "Fundamental Algorithms". During this time, he also developed a mathematical analysis of [[linear probing]], which convinced him to present the material with a quantitative approach. After receiving his Ph.D. in June 1963, he began working on his manuscript, of which he finished his first draft in June 1965, at {{val|3000}} hand-written pages.<ref>{{cite web |author-first=Donald E. |author-last=Knuth |author-link=Donald Ervin Knuth |url=https://garfield.library.upenn.edu/classics1993/A1993LQ46300001.pdf |title=This Week's Citation Classic |work=Current Contents |number=34 |date=1993-08-23 |page=8 |access-date=2024-11-26 |archive-date=2024-01-05 |archive-url=https://web.archive.org/web/20240105142743/https://garfield.library.upenn.edu/classics1993/A1993LQ46300001.pdf |url-status=live }}</ref> He had assumed that about five hand-written pages would translate into one printed page, but his publisher said instead that about {{frac|1|1|2}} hand-written pages translated to one printed page. This meant he had approximately {{val|2000}} printed pages of material, which closely matches the size of the first three published volumes. The first volume of "The Art of Computer Programming", "Fundamental Algorithms", took five years to complete between 1963 and 1968 while working at both Caltech and Burroughs. Knuth's dedication in Volume 1 reads: <blockquote>This series of books is affectionately dedicated<br>to the [[IBM 650|Type 650 computer]] once installed at<br>[[Case Institute of Technology]],<br>in remembrance of many pleasant evenings.<ref group="lower-alpha">The dedication was worded slightly differently in the first edition.</ref></blockquote> In the preface, he thanks first his wife Jill, then Burroughs for the use of B220 and B5500 computers in testing most of the programs, and Caltech, the National Science Foundation, and the Office of Naval Research.<ref name=TAOCP-FA>{{Cite web |last=Knuth |first=Donald Ervin |title=The Art of Computer Programming (TAOCP) 2nd Edition, 1973 |url=https://cs.stanford.edu/~knuth/taocp.html |date=2019-08-03 |access-date=2024-11-26 |archive-date=2019-08-03 |archive-url=https://web.archive.org/web/20190803223145/https://cs.stanford.edu/~knuth/taocp.html |url-status=live }}</ref>{{rp|xii}} Section 2.5 of "Fundamental Algorithms" is on [[Dynamic memory allocation|Dynamic Storage Allocation]]. Parts of this are used in the Burroughs approach to memory management. Knuth claims credit for “The “boundary-tag” method, introduced in Section 2.5, was designed by the author in 1962 for use in a control program for the B5000 computer.”{{r|TAOCP-FA|p=460}} Knuth received support from Richard S. Varga, who was the scientific adviser to the publisher. Varga was visiting [[Olga Taussky-Todd]] and [[John Todd (computer scientist)|John Todd]] at [[Caltech]]. With Varga's enthusiastic endorsement, the publisher accepted Knuth's expanded plans. In its expanded version, the book would be published in seven volumes, each with just one or two chapters.<ref> {{Cite book |chapter=Donald Knuth |author-first=Donald J. |author-last=Albers |title=Mathematical People: Profiles and Interviews |publisher=[[A. K. Peters]] |edition=2 |date=2008 |isbn=978-1-56881-340-0 |editor-first1=Donald J. |editor-last1=Albers |editor-first2=Gerald L. |editor-last2=Alexanderson |editor-link2=Gerald L. Alexanderson}}</ref> Due to the growth in Chapter 7, which was fewer than 100 pages of the 1965 manuscript, per Vol. 4A p. vi, the plan for Volume 4 has since expanded to include Volumes 4A, 4B, 4C, 4D, and possibly more. In 1976, Knuth prepared a second edition of Volume 2, requiring it to be [[typesetting|typeset]] again, but the style of type used in the first edition (called [[Hot metal typesetting|hot type]]) was no longer available. In 1977, he decided to spend some time creating something more suitable. Eight years later, he returned with [[TeX|T<sub>E</sub>X]], which is currently used for all volumes. Another characteristic of the volumes is the variation in the difficulty of the exercises including a numerical rating varying from 0 to 50, where 0 is trivial, and 50 is an open question in contemporary research. ==Bounty for finding errors== The offer of a so-called [[Knuth reward check]] worth "one hexadecimal dollar" (100<sub>[[Hexadecimal|HEX]]</sub> [[hexadecimal|base 16]] cents, in [[decimal]], is $2.56) for any errors found, and the correction of these errors in subsequent printings, has contributed to the highly polished and still-authoritative nature of the work, long after its first publication. ==Assembly language in the book== All examples in the books use a hypothetical language called "[[MIX (abstract machine)|MIX]] assembly language" (MIXAL), which runs on "a mythical computer called MIX". Currently,{{when|date=October 2022}} the MIX computer is being replaced by the [[MMIX]] computer, which is a [[RISC]] version. The conversion from MIX to MMIX was a large ongoing project for which Knuth solicited volunteers for help. Software such as [[GNU MDK]]<ref>{{Cite web |title=GNU MDK - GNU Project - Free Software Foundation |url=https://www.gnu.org/software/mdk/mdk.html |access-date=2022-10-23 |website=www.gnu.org |archive-date=2022-10-23 |archive-url=https://web.archive.org/web/20221023050959/https://www.gnu.org/software/mdk/mdk.html |url-status=live }}</ref> exists to provide [[Emulator|emulation]] of the MIX architecture. Knuth considers the use of [[assembly language]] necessary for the speed and memory usage of algorithms to be judged. MIX was much like any computer then in existence, but nicer. The name ‘MIX’ is 1009 in Roman numerals and this is given by a formula involving series numbers of several computers of the time: (360 + 650 + 709 + U3 + SS80 + 1107 + 1604 + G2- + B220 + S2000 + 920 + 601 + H800 + PDP-4 + 11)/16 = 1009 or MIX. The name MMIX is 2009 in Roman numerals and Knuth claims MMIX is even nicer than MIX. ==Critical response== Knuth was awarded the 1974 [[Turing Award]] "for his major contributions to the [[analysis of algorithms]] […], and in particular for his contributions to the 'art of computer programming' through his well-known books in a continuous series by this title."<ref>{{cite web |url=https://amturing.acm.org/award_winners/knuth_1013846.cfm |title=Donald E. Knuth – A. M. Turing Award Winner |website=AM Turing |access-date=2017-01-25 |archive-date=2019-10-17 |archive-url=https://web.archive.org/web/20191017231352/http://amturing.acm.org/award_winners/knuth_1013846.cfm |url-status=live }}</ref> ''[[American Scientist]]'' has included this work among "100 or so Books that shaped a Century of Science", referring to the twentieth century.<ref>{{Cite journal |author-first1=Philip |author-last1=Morrison |author-link1=Philip Morrison |author-first2=Phylis |author-last2=Morrison |url=https://www.americanscientist.org/article/100-or-so-books-that-shaped-a-century-of-science |url-status=live |archive-url=https://web.archive.org/web/20170617002919/http://www.americanscientist.org/bookshelf/pub/100-or-so-books-that-shaped-a-century-of-science |archive-date=2017-06-17 |title=100 or so Books that shaped a Century of Science |volume=87 |issue=6 |journal=American Scientist |date=November–December 1999 |publisher=Sigma Xi, The Scientific Research Society |access-date=2024-11-26}}</ref> Covers of the third edition of Volume 1 quote [[Bill Gates]] as saying, "If you think you're a really good programmer… read (Knuth's) ''Art of Computer Programming''… You should definitely send me a résumé if you can read the whole thing."<ref>{{cite web |url=https://www.businessinsider.com/bill-gates-loves-donald-knuth-the-art-of-computer-programming-2016-4 |title=Bill Gates once said 'definitely send me a résumé' if you finish this fiendishly difficult book |author-first=Matt |author-last=Weinberger |website=Business Insider |access-date=2024-11-25 |archive-date=2023-07-12 |archive-url=https://web.archive.org/web/20230712010034/https://www.businessinsider.com/bill-gates-loves-donald-knuth-the-art-of-computer-programming-2016-4 |url-status=live }}</ref><!-- <ref group="nb">According to [[folklore.org]], [[Steve Jobs]] actually made the incredible claim. [https://folklore.org/Close_Encounters_of_the_Steve_Kind.html]</ref> comment out – the reference only says that Steve Jobs read the books, not that he said the quote about the resume. --> ''[[The New York Times]]'' referred to it as "the profession's defining treatise".<ref name="lohr">{{cite news |author-last=Lohr |author-first=Steve |title=Frances E. Holberton, 84, Early Computer Programmer |work=The New York Times |date=2001-12-17 |url=https://www.nytimes.com/2001/12/17/business/frances-e-holberton-84-early-computer-programmer.html |access-date=2024-11-26 |archive-date=2014-12-16 |archive-url=https://web.archive.org/web/20141216015437/http://www.nytimes.com/2001/12/17/business/frances-e-holberton-84-early-computer-programmer.html |url-status=live }}</ref> ==Volumes== ===Completed=== * Volume 1 – Fundamental algorithms ** Chapter 1 – Basic concepts ** Chapter 2 – Information [[data structure|structures]] * Volume 2 – Seminumerical algorithms ** Chapter 3 – [[Statistical randomness|Random numbers]] ** Chapter 4 – [[Arithmetic]] * Volume 3 – [[Sorting algorithm|Sorting]] and [[Search algorithm|searching]] ** Chapter 5 – [[Sorting algorithm|Sorting]] ** Chapter 6 – [[Search algorithm|Searching]] * Volume 4A – [[combinatorics|Combinatorial]] algorithms ** Chapter 7 – Combinatorial searching (part 1) * Volume 4B – [[combinatorics|Combinatorial]] algorithms ** Chapter 7 – Combinatorial searching (part 2) ===Planned=== * Volume 4C, 4D, ... Combinatorial algorithms (chapters 7 & 8 released in several subvolumes) ** Chapter 7 – Combinatorial searching (continued) ** Chapter 8 – [[Recursion]] * Volume 5 – Syntactic algorithms ** Chapter 9 – [[Lexical analysis|Lexical scanning]] (also includes [[String searching algorithm|string search]] and [[data compression]]) ** Chapter 10 – [[Parsing]] techniques * Volume 6 – The Theory of [[context-free language]]s ** Chapter 11 – [[Mathematical linguistics]] * Volume 7 – [[Compiler]] techniques ** Chapter 12 – Programming language translation ==Chapter outlines== ===Completed=== ====Volume 1 – Fundamental algorithms==== * Chapter 1 – Basic concepts ** 1.1. [[Algorithm]]s ** 1.2. Mathematical preliminaries *** 1.2.1. [[Mathematical induction]] *** 1.2.2. Numbers, powers, and [[logarithm]]s *** 1.2.3. Sums and products *** 1.2.4. Integer functions and elementary [[number theory]] *** 1.2.5. [[Permutation]]s and [[factorial]]s *** 1.2.6. [[Binomial coefficient]]s *** 1.2.7. [[Harmonic number]]s *** 1.2.8. [[Fibonacci number]]s *** 1.2.9. [[Generating function]]s *** 1.2.10. Analysis of an algorithm *** 1.2.11. [[Asymptotic analysis|Asymptotic representations]] **** 1.2.11.1. The [[Big O notation|O-notation]] **** 1.2.11.2. [[Euler's summation formula]] **** 1.2.11.3. Some asymptotic calculations ** 1.3 [[MIX (abstract machine)|MIX]] (Updated with [[MMIX]]<ref>{{cite web |url=https://www-cs-faculty.stanford.edu/~knuth/taocp.html#future |title=Kuth's future editions Volumes 1-3 |access-date=2025-04-25 |archive-date=2025-04-23 |archive-url=https://web.archive.org/web/20250423130634/https://www-cs-faculty.stanford.edu/~knuth/taocp.html#future |url-status=live }}</ref> in Volume 1 fascicle 1) *** 1.3.1. Description of MIX *** 1.3.2. The MIX assembly language *** 1.3.3. Applications to [[permutation]]s ** 1.4. Some fundamental programming techniques *** 1.4.1. [[Function (computer programming)|Subroutines]] *** 1.4.2. [[Coroutine]]s *** 1.4.3. Interpretive routines **** 1.4.3.1. A MIX simulator **** 1.4.3.2. Trace routines *** 1.4.4. [[Input/output|Input and output]] *** 1.4.5. History and bibliography * Chapter 2 – Information structures ** 2.1. Introduction ** 2.2. [[List (abstract data type)|Linear lists]] *** 2.2.1. [[Stack (abstract data type)|Stacks]], [[Queue (abstract data type)|queues]], and [[Double-ended queue|deques]] *** 2.2.2. Sequential allocation *** 2.2.3. Linked allocation ([[topological sorting]]) *** 2.2.4. Circular lists *** 2.2.5. Doubly linked lists *** 2.2.6. [[Array (data structure)|Arrays]] and orthogonal lists ** 2.3. [[Tree (data structure)|Trees]] *** 2.3.1. Traversing [[binary tree]]s *** 2.3.2. Binary tree representation of trees *** 2.3.3. Other representations of trees *** 2.3.4. Basic mathematical properties of trees **** 2.3.4.1. Free trees **** 2.3.4.2. [[Polytree|Oriented trees]] **** 2.3.4.3. [[Kőnig's lemma|The "infinity lemma"]] **** 2.3.4.4. Enumeration of trees **** 2.3.4.5. Path length **** 2.3.4.6. History and bibliography *** 2.3.5. Lists and [[Garbage collection (computer science)|garbage collection]] ** 2.4. Multilinked structures ** 2.5. [[Dynamic memory allocation|Dynamic storage allocation]] ** 2.6. History and bibliography ====Volume 2 – Seminumerical algorithms==== * Chapter 3 – [[Random number]]s ** 3.1. Introduction ** 3.2. [[Pseudo-random number generator|Generating uniform random numbers]] *** 3.2.1. The [[Linear congruential generator|linear congruential]] method **** 3.2.1.1. Choice of modulus **** 3.2.1.2. Choice of multiplier **** 3.2.1.3. Potency *** 3.2.2. Other methods ** 3.3. Statistical tests *** 3.3.1. General test procedures for studying random data *** 3.3.2. Empirical tests *** 3.3.3. Theoretical tests *** 3.3.4. The spectral test ** 3.4. [[Pseudo-random number sampling|Other types of random quantities]] *** 3.4.1. Numerical distributions *** 3.4.2. Random sampling and [[Fisher–Yates shuffle|shuffling]] ** 3.5. What Is a [[Random Sequence|random sequence]]? ** 3.6. Summary * Chapter 4 – Arithmetic ** 4.1. [[Positional notation|Positional number systems]] ** 4.2. [[Floating point]] arithmetic *** 4.2.1. Single-precision calculations *** 4.2.2. Accuracy of floating point arithmetic *** 4.2.3. Double-precision calculations *** 4.2.4. Distribution of floating point numbers ** 4.3. [[Arbitrary-precision arithmetic|Multiple precision arithmetic]] *** 4.3.1. The classical algorithms *** 4.3.2. Modular arithmetic *** 4.3.3. How fast can we multiply? ** 4.4. [[Radix]] conversion ** 4.5. [[Rational number|Rational]] arithmetic *** 4.5.1. Fractions *** 4.5.2. The greatest common divisor *** 4.5.3. Analysis of [[Euclidean algorithm|Euclid's algorithm]] *** 4.5.4. Factoring into primes ** 4.6. [[Polynomial]] arithmetic *** 4.6.1. Division of polynomials *** 4.6.2. Factorization of polynomials *** 4.6.3. Evaluation of powers ([[addition-chain exponentiation]]) *** 4.6.4. Evaluation of polynomials ** 4.7. Manipulation of [[Power Series|power series]] ====Volume 3 – Sorting and searching==== * Chapter 5 – [[Sorting algorithm|Sorting]] ** 5.1. Combinatorial properties of [[permutation]]s *** 5.1.1. Inversions *** 5.1.2. Permutations of a multiset *** 5.1.3. Runs *** 5.1.4. Tableaux and involutions ** 5.2. [[Internal sort]]ing *** 5.2.1. Sorting by insertion *** 5.2.2. Sorting by exchanging *** 5.2.3. Sorting by selection *** 5.2.4. Sorting by merging *** 5.2.5. Sorting by distribution ** 5.3. Optimum sorting *** 5.3.1. Minimum-comparison sorting *** 5.3.2. Minimum-comparison merging *** 5.3.3. Minimum-comparison selection *** 5.3.4. Networks for sorting ** 5.4. [[External Sorting|External sorting]] *** 5.4.1. Multiway merging and replacement selection *** 5.4.2. The polyphase merge *** 5.4.3. The cascade merge *** 5.4.4. Reading tape backwards *** 5.4.5. The oscillating sort *** 5.4.6. Practical considerations for tape merging *** 5.4.7. External radix sorting *** 5.4.8. Two-tape sorting *** 5.4.9. Disks and drums ** 5.5. Summary, history, and bibliography * Chapter 6 – [[Search algorithm|Searching]] ** 6.1. Sequential searching ** 6.2. Searching by comparison of [[Unique key|keys]] *** 6.2.1. Searching an ordered table *** 6.2.2. Binary tree searching *** 6.2.3. Balanced trees *** 6.2.4. Multiway trees ** 6.3. Digital searching ** 6.4. [[Hash table|Hashing]] ** 6.5. Retrieval on secondary keys ====Volume 4A – Combinatorial algorithms, Part 1==== * Chapter 7 – Combinatorial searching ** 7.1. [[Binary numeral system|Zeros and ones]] *** 7.1.1. [[Two-element Boolean algebra|Boolean]] basics *** 7.1.2. Boolean evaluation *** 7.1.3. [[Bitwise operation|Bitwise]] tricks and techniques *** 7.1.4. [[Binary decision diagram]]s ** 7.2. Generating all possibilities *** 7.2.1. Generating basic combinatorial patterns **** 7.2.1.1. Generating all ''n''-[[tuple]]s **** 7.2.1.2. Generating all [[permutation]]s **** 7.2.1.3. Generating all [[combination]]s **** 7.2.1.4. Generating all [[integer partition]]s **** 7.2.1.5. Generating all [[Partition of a set|set partitions]] **** 7.2.1.6. Generating all [[tree (graph theory)|trees]] **** 7.2.1.7. History and further references ====Volume 4B – Combinatorial algorithms, Part 2==== * Chapter 7 – Combinatorial searching (continued) ** 7.2. Generating all possibilities (continued) *** 7.2.2. [[Backtracking|Backtrack programming]] **** 7.2.2.1. [[Dancing links]] (includes discussion of [[exact cover]]) **** 7.2.2.2. [[Satisfiability]] ===Planned=== ====Volumes 4C, 4D, 4E, 4F – Combinatorial algorithms<ref>{{cite web |last1=D'Agostino |first1=Susan |title=The Computer Scientist Who Can't Stop Telling Stories |url=https://www.quantamagazine.org/computer-scientist-donald-knuth-cant-stop-telling-stories-20200416 |website=Quanta Magazine |access-date=2024-11-26 |date=2020-04-16 |quote="Now 82, he’s hard at work on part B of volume 4, and he anticipates that the book will have at least parts A through F." |archive-date=2024-11-27 |archive-url=https://web.archive.org/web/20241127003657/https://www.quantamagazine.org/computer-scientist-donald-knuth-cant-stop-telling-stories-20200416/ |url-status=live }}</ref>==== * Chapter 7 – Combinatorial searching (continued) ** 7.2. Generating all possibilities (continued) *** 7.2.2. [[Backtracking|Backtrack programming]] (continued) **** 7.2.2.3. [[Constraint Satisfaction Problem|Constraint satisfaction]] (released as Pre-Fascicle 7A) **** 7.2.2.4. [[Hamiltonian path problem|Hamiltonian paths]] and cycles **** 7.2.2.5. [[Clique problem|Cliques]] **** 7.2.2.6. Covers ([[vertex cover]], [[set cover problem]], [[exact cover]], [[clique cover]]) **** 7.2.2.7. Squares **** 7.2.2.8. A potpourri of puzzles (includes [[perfect digital invariant]]) **** 7.2.2.9. Estimating backtrack costs (chapter 6 of "Selected Papers on Analysis of Algorithms", and Fascicle 5, pp. 44−47, under the heading "Running time estimates") *** 7.2.3. Generating inequivalent patterns (includes discussion of [[Pólya enumeration theorem]]) (see "Techniques for Isomorph Rejection", chapter 4 of "Classification Algorithms for Codes and Designs" by Kaski and Östergård) ** 7.3. [[Shortest path problem|Shortest paths]] ** 7.4. [[Graph algorithms]] *** 7.4.1. Components and traversal **** 7.4.1.1. [[Union-find algorithm]]s **** 7.4.1.2. [[Depth-first search]] **** 7.4.1.3. Vertex and edge connectivity *** 7.4.2. Special classes of graphs *** 7.4.3. [[Expander graph]]s *** 7.4.4. [[Random graph]]s ** 7.5. Graphs and optimization *** 7.5.1. Bipartite matching (including [[Maximum cardinality matching|maximum-cardinality matching]], [[stable marriage problem]], [https://cs.stanford.edu/~knuth/ms.html mariages stables]) *** 7.5.2. [[Assignment problem|The assignment problem]] *** 7.5.3. [[Network flow problem|Network flows]] *** 7.5.4. Optimum subtrees *** 7.5.5. Optimum matching *** 7.5.6. Optimum orderings ** 7.6. Independence theory *** 7.6.1. Independence structures *** 7.6.2. Efficient [[matroid]] algorithms ** 7.7. Discrete [[dynamic programming]] (see also [[Transfer-matrix method (statistical mechanics)|transfer-matrix method]]) ** 7.8. [[Branch-and-bound]] techniques ** 7.9. Herculean tasks (aka [[NP-hard]] problems) ** 7.10. [[Approximation algorithm|Near-optimization]] * Chapter 8 – [[Recursion]] (chapter 22 of "Selected Papers on Analysis of Algorithms") ====Volume 5 – Syntactic algorithms==== * Chapter 9 – [[Lexical analysis|Lexical scanning]] (includes also [[Knuth–Morris–Pratt algorithm|string search]] and data compression) * Chapter 10 – [[Parsing]] techniques ====Volume 6 – The theory of context-free languages<ref>{{cite web |url=https://cs.stanford.edu/~knuth/taocp.html#future |title=TAOCP – Future plans |access-date=2018-06-20 |archive-date=2019-08-03 |archive-url=https://web.archive.org/web/20190803223145/https://cs.stanford.edu/~knuth/taocp.html#future |url-status=live }}</ref>==== * Chapter 11 – [[Mathematical linguistics]]<ref name="brochure">{{cite web |url=https://cs.stanford.edu/~knuth/brochure.pdf |title=TAOCP – Brochure |access-date=2024-11-26 |archive-date=2024-09-26 |archive-url=https://web.archive.org/web/20240926010938/https://cs.stanford.edu/~knuth/brochure.pdf |url-status=live }}</ref> ====Volume 7 – Compiler techniques==== * Chapter 12 – [[Programming language translation]]<ref name="brochure" /> ==English editions== ===Current editions=== These are the current editions in order by volume number: * ''The Art of Computer Programming, Volumes 1-4B Boxed Set''. (Reading, Massachusetts: Addison-Wesley, 2023), 3904pp. {{ISBN|978-0-13-793510-9|0-13-793510-2}} ** ''Volume 1: Fundamental Algorithms''. Third Edition (Reading, Massachusetts: Addison-Wesley, 1997), xx+650pp. {{ISBN|978-0-201-89683-1|0-201-89683-4}}. Errata: [https://cs.stanford.edu/~knuth/all1-pre.ps.gz] (from 2011-01-08), [https://cs.stanford.edu/~knuth/all1.ps.gz] (from 2022, 49th [[printing run|printing]]). Addenda: [https://cs.stanford.edu/~knuth/1-appc.ps.gz] (2011). ** ''Volume 2: Seminumerical Algorithms''. Third Edition (Reading, Massachusetts: Addison-Wesley, 1997), xiv+762pp. {{ISBN|978-0-201-89684-8|0-201-89684-2}}. Errata: [https://cs.stanford.edu/~knuth/all2-pre.ps.gz] (from 2011-01-08), [https://cs.stanford.edu/~knuth/all2.ps.gz] (from 2022, 45th printing). Addenda: [https://cs.stanford.edu/~knuth/2-appc.ps.gz] (2011). ** ''Volume 3: Sorting and Searching''. Second Edition (Reading, Massachusetts: Addison-Wesley, 1998), xiv+780pp.+foldout. {{ISBN|978-0-201-89685-5|0-201-89685-0}}. Errata: [https://cs.stanford.edu/~knuth/all3-pre.ps.gz] (from 2011-01-08), [https://cs.stanford.edu/~knuth/all3.ps.gz] (from 2022, 45th printing). Addenda: [https://cs.stanford.edu/~knuth/3-appc.ps.gz] (2011). ** ''Volume 4A: Combinatorial Algorithms, Part 1''. First Edition (Upper Saddle River, New Jersey: Addison-Wesley, 2011, 24th printing), xv+883pp. {{ISBN|978-0-201-03804-0|0-201-03804-8}}. Errata: [https://cs.stanford.edu/~knuth/all4a-pre.ps.gz] (from 2011), [https://cs.stanford.edu/~knuth/all4a.ps.gz] (from 2022, 20th printing). ** ''Volume 4B: Combinatorial Algorithms, Part 2''. First Edition (Upper Saddle River, New Jersey: Addison-Wesley, 2023, 2nd printing), xviii+714pp. {{ISBN|978-0-201-03806-4|0-201-03806-4}}. Errata: [https://cs.stanford.edu/~knuth/all4b.ps.gz] (from 2023, 1st printing). * ''Volume 1, Fascicle 1: MMIX – A RISC Computer for the New Millennium''. (Addison-Wesley, 2005-02-14), 144pp. {{ISBN|0-201-85392-2}}. Errata: [https://cs.stanford.edu/~knuth/all1f1.ps.gz] (from 2005, 1st printing) (will be in the fourth edition of volume 1) * ''The MMIX Supplement'' by Martin Ruckert. (Addison-Wesley), 193pp. {{ISBN|0-13-399231-4}}. A conversion of the MIX problems/programs in volumes 1, 2 & 3 to MMIX. * ''Volume 4, Fascicle 7: Constraint Satisfaction''. (Addison-Wesley, 2025-02-05), xiv+281pp. {{ISBN|978-0-13-532824-8}}. ===Previous editions=== ====Complete volumes==== These volumes were superseded by newer editions and are in order by date. * ''Volume 1: Fundamental Algorithms''. First edition, 1968, xxi+634pp, {{ISBN|0-201-03801-3}}.<ref name="WellsReview">{{cite journal |author-last=Wells |author-first=Mark B. |title=Review: ''The Art of Computer Programming, Volume 1. Fundamental Algorithms'' and ''Volume 2. Seminumerical Algorithms'' by Donald E. Knuth |journal=Bulletin of the American Mathematical Society |date=1973 |volume=79 |issue=3 |pages=501–509 |url=https://www.ams.org/journals/bull/1973-79-03/S0002-9904-1973-13173-8/S0002-9904-1973-13173-8.pdf |doi=10.1090/s0002-9904-1973-13173-8 |doi-access=free |access-date=2018-06-20 |archive-date=2016-10-20 |archive-url=https://web.archive.org/web/20161020162321/http://www.ams.org/journals/bull/1973-79-03/S0002-9904-1973-13173-8/S0002-9904-1973-13173-8.pdf |url-status=live }}</ref> * ''Volume 2: Seminumerical Algorithms''. First edition, 1969, xi+624pp, {{ISBN|0-201-03802-1}}.<ref name="WellsReview"/> * ''Volume 3: Sorting and Searching''. First edition, 1973, xi+723pp+foldout, {{ISBN|0-201-03803-X}}. Errata: [https://cs.stanford.edu/~knuth/err3-1e.ps.gz]. * ''Volume 1: Fundamental Algorithms''. Second edition, 1973, xxi+634pp, {{ISBN|0-201-03809-9}}. Errata: [https://cs.stanford.edu/~knuth/err1-2e.ps.gz]. * ''Volume 2: Seminumerical Algorithms''. Second edition, 1981, xiii+ 688pp, {{ISBN|0-201-03822-6}}. Errata: [https://cs.stanford.edu/~knuth/err2-2e.ps.gz]. * ''The Art of Computer Programming, Volumes 1-3 Boxed Set''. Second Edition (Reading, Massachusetts: Addison-Wesley, 1998), pp. {{ISBN|978-0-201-48541-7|0-201-48541-9}} * ''The Art of Computer Programming, Volumes 1-4A Boxed Set''. Third Edition (Reading, Massachusetts: Addison-Wesley, 2011), 3168pp. {{ISBN|978-0-321-75104-1|0-321-75104-3}} ====Fascicles==== Volume 4, [[fascicle (book)|Fascicles]] 0–4 were revised and published as Volume 4A. * ''Volume 4, Fascicle 0: Introduction to Combinatorial Algorithms and Boolean Functions''. (Addison-Wesley Professional, 2008-04-28) vi+240pp, {{ISBN|0-321-53496-4}}. Errata: [https://cs.stanford.edu/~knuth/all4f0.ps.gz] (2011-01-01). * ''Volume 4, Fascicle 1: Bitwise Tricks & Techniques; Binary Decision Diagrams''. (Addison-Wesley Professional, 2009-03-27) viii+260pp, {{ISBN|0-321-58050-8}}. Errata: [https://cs.stanford.edu/~knuth/all4f1.ps.gz] (2011-01-01). * ''Volume 4, Fascicle 2: Generating All Tuples and Permutations''. (Addison-Wesley, 2005-02-14) v+127pp, {{ISBN|0-201-85393-0}}. Errata: [https://cs.stanford.edu/~knuth/all4f2.ps.gz] (2011-01-01). * ''Volume 4, Fascicle 3: Generating All Combinations and Partitions''. (Addison-Wesley, 2005-07-26) vi+150pp, {{ISBN|0-201-85394-9}}. Errata: [https://cs.stanford.edu/~knuth/all4f3.ps.gz] (2011-01-01). * ''Volume 4, Fascicle 4: Generating All Trees; History of Combinatorial Generation''. (Addison-Wesley, 2006-02-06) vi+120pp, {{ISBN|0-321-33570-8}}. Errata: [https://cs.stanford.edu/~knuth/all4f4.ps.gz] (2011-01-01). Volume 4, Fascicles 5–6 were revised and published as Volume 4B. * ''Volume 4, Fascicle 5: Mathematical Preliminaries Redux; Backtracking; Dancing Links''. (Addison-Wesley, 2019-11-22) xiii+382pp, {{ISBN|978-0-13-467179-6}}. Errata: [https://cs.stanford.edu/~knuth/all4f5.ps.gz] (2020-03-27) * ''Volume 4, Fascicle 6: Satisfiability''. (Addison-Wesley, 2015-12-08) xiii+310pp, {{ISBN|978-0-13-439760-3}}. Errata: [https://cs.stanford.edu/~knuth/all4f6.ps.gz] (2020-03-26) ====Pre-fascicles==== Volume 1 * Pre-fascicle [https://cs.stanford.edu/~knuth/fasc1.ps.gz 1] was revised and published as Volume 1, fascicle 1. Volume 4 * [[Pre-fascicle]]s [https://cs.stanford.edu/~knuth/fasc0a.ps.gz 0A], [https://cs.stanford.edu/~knuth/fasc0b.ps.gz 0B], and [https://cs.stanford.edu/~knuth/fasc0c.ps.gz 0C] were revised and published as Volume 4, fascicle 0. * Pre-fascicles [https://cs.stanford.edu/~knuth/fasc1a.ps.gz 1A] and [https://cs.stanford.edu/~knuth/fasc1b.ps.gz 1B] were revised and published as Volume 4, fascicle 1. * Pre-fascicles [https://cs.stanford.edu/~knuth/fasc2a.ps.gz 2A] and [https://cs.stanford.edu/~knuth/fasc2b.ps.gz 2B] were revised and published as Volume 4, fascicle 2. * Pre-fascicles [https://cs.stanford.edu/~knuth/fasc3a.ps.gz 3A] and [https://cs.stanford.edu/~knuth/fasc3b.ps.gz 3B] were revised and published as Volume 4, fascicle 3. * Pre-fascicles [https://cs.stanford.edu/~knuth/fasc4a.ps.gz 4A] and [https://cs.stanford.edu/~knuth/fasc4b.ps.gz 4B] were revised and published as Volume 4, fascicle 4. * Pre-fascicles [https://cs.stanford.edu/~knuth/fasc5a.ps.gz 5A], [https://cs.stanford.edu/~knuth/fasc5b.ps.gz 5B], and [https://cs.stanford.edu/~knuth/fasc5c.ps.gz 5C] were revised and published as Volume 4, fascicle 5. * Pre-fascicle [https://cs.stanford.edu/~knuth/fasc6a.ps.gz 6A] was revised and published as Volume 4, fascicle 6. * Pre-fascicle [https://cs.stanford.edu/~knuth/fasc7a.ps.gz 7A] was revised and published as Volume 4, fascicle 7. The remaining pre-fascicles contain draft material that is set to appear in future fascicles and volumes. * ''[https://cs.stanford.edu/~knuth/fasc8a.ps.gz Volume 4, Pre-fascicle 8A: Hamiltonian Paths and Cycles]'' * ''[https://cs.stanford.edu/~knuth/fasc8b.ps.gz Volume 4, Pre-fascicle 8B: Cliques]'' * ''[https://cs.stanford.edu/~knuth/fasc9b.ps.gz Volume 4, Pre-fascicle 9B: A Potpourri of Puzzles]'' * ''[https://cs.stanford.edu/~knuth/fasc9c.ps.gz Volume 4, Pre-fascicle 9C: Estimating Backtrack Costs]'' * ''[https://cs.stanford.edu/~knuth/fasc12a.ps.gz Volume 4, Pre-fascicle 12A: Components and Traversal] [https://cs.stanford.edu/~knuth/fasc12a+.pdf (PDF Version) ]'' * ''[https://cs.stanford.edu/~knuth/fasc14a.ps.gz Volume 4, Pre-fascicle 14A: Bipartite Matching]'' * ''[https://cs.stanford.edu/~knuth/fasc16a.ps.gz Volume 4, Pre-fascicle 16A: Introduction to Recursion]'' ==See also== * ''[[Introduction to Algorithms]]'' ==References== '''Notes''' {{Notelist}} '''Citations''' {{Reflist}} '''Sources''' {{Refbegin}} * {{cite book |title=Portraits in Silicon |author-first=Robert |author-last=Slater |date=1987 |publisher=MIT Press |url=https://books.google.com/books?id=aWTtMyYmKhUC |isbn=0-262-19262-4}} * {{cite book |title=Out of Their Minds: The Lives and Discoveries of 15 Great Computer Scientists |author-first1=Dennis |author-last1=Shasha |author-link1=Dennis Shasha |author-first2=Cathy |author-last2=Lazere |date=1995 |publisher=Copernicus |isbn=0-387-97992-1 |url-access=registration |url=https://archive.org/details/isbn_9780387979922 }} {{Refend}} ==External links== * [https://cs.stanford.edu/~knuth/taocp.html Overview of topics] (Knuth's personal homepage) * [https://cs.stanford.edu/~knuth/brochure.pdf Announcement of Volume 1 of 'The Art of Computer Programming'] * [https://conservancy.umn.edu/items/9cb164e9-c9df-4e5e-9796-42198627fae5 Oral history interview with Donald E. Knuth] at [[Charles Babbage Institute]], University of Minnesota, Minneapolis, 2001. Knuth discusses software patenting, [[structured programming]], collaboration and his development of [[TeX]]. The oral history discusses the writing of ''The Art of Computer Programming''. * [https://amturing.acm.org/p3-knuth.pdf "Robert W Floyd, In Memoriam", by Donald E. Knuth], 2003 - (on the influence of [[Robert W. Floyd|Bob Floyd]]) * [https://softpanorama.org/People/Knuth/taocp.shtml ''TAoCP'' and its Influence of Computer Science (Softpanorama)] {{Donald Knuth navbox}} {{DEFAULTSORT:Art Of Computer Programming, The}} [[Category:1968 non-fiction books]] [[Category:1969 non-fiction books]] [[Category:1973 non-fiction books]] [[Category:1981 non-fiction books]] [[Category:2011 non-fiction books]] [[Category:Addison-Wesley books]] [[Category:American non-fiction books]] [[Category:Analysis of algorithms]] [[Category:Books by Donald Knuth]] [[Category:Computer arithmetic algorithms]] [[Category:Computer programming books]] [[Category:Computer science books]] [[Category:English-language non-fiction books]] [[Category:Monographs]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:As of
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:Distinguish
(
edit
)
Template:Donald Knuth navbox
(
edit
)
Template:Frac
(
edit
)
Template:ISBN
(
edit
)
Template:Infobox book
(
edit
)
Template:Notelist
(
edit
)
Template:R
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:Short description
(
edit
)
Template:Use mdy dates
(
edit
)
Template:Val
(
edit
)
Template:When
(
edit
)