Questions tagged [taocp]

The Art of Computer Programming (acronym: TAOCP) is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis.

Wikipedia -

The Art of Computer Programming (acronym: TAOCP) is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis.

Knuth began the project, originally conceived as a single book with twelve chapters, in 1962. The first three of what were then expected to be seven volumes were published in rapid succession in 1968, 1969, and 1973. The first installment of Volume 4 (a paperback fascicle) was published in 2005. The hardback volume 4A was published in 2010. Additional fascicle installments are planned for release approximately biannually.

37 questions
31
votes
4 answers

Is (pure) functional programming antagonistic with "algorithm classics"?

The classic algorithm books (TAOCP, CLR) (and not so classic ones, such as the fxtbook)are full of imperative algorithms. This is most obvious with algorithms whose implementation is heavily based on arrays, such as combinatorial generation…
zvrba
  • 24,186
  • 3
  • 55
  • 65
19
votes
3 answers

What Math Do You Need To Read The Art Of Computer Programming?

I came to a career in software development with a degree in English, rather than Computer Science or another science/engineering background. I have gone a long way on my self-taught basis, but after 10+ years of doing this, I want to go back and…
J Wynia
  • 10,464
  • 4
  • 40
  • 38
13
votes
5 answers

Art of Computer programming notation question

I'm just starting to read TAOCP Volume 1 and I'm having trouble understanding the style. Knuth mentions a computational method to be a quadruple (Q,I, Omega, f) -- but I am having trouble understanding what each of these is intended to be. I…
Hortitude
  • 13,638
  • 16
  • 58
  • 72
11
votes
3 answers

About an exercise appearing in TAOCP volume one's "Notes on the Exercises"

There is a question in TAOCP vol 1, in "Notes on Exercises" section, which goes something like: "Prove that 13^3 = 2197. Generalize your answer. (This is a horrible kind of problem that the author has tried to avoid)." Questions: How would you…
vshenoy
  • 1,153
  • 1
  • 8
  • 14
9
votes
3 answers

The Art of Computer Programming exercise question: Chapter 1, Question 8

I'm doing the exercises to TAOCP Volume 1 Edition 3 and have trouble understanding the syntax used in the answer to the following exercise. Chapter 1 Exercise 8 Computing the greatest common divisor of positive integers m & n by specifying…
Hortitude
  • 13,638
  • 16
  • 58
  • 72
9
votes
3 answers

How do the operations LDA, STA, SUB, ADD, MUL and DIV work in Knuth's machine language MIX?

I have been reading the Art of Computer Programming by Donald Knuth Volume 1. Now I finished the first part where all the mathematics were explained and it was quite a pleasure. Unfortunately, on p. 121 he starts explaining this fictional machine…
user2609980
  • 10,264
  • 15
  • 74
  • 143
8
votes
1 answer

How does division work in MIX?

Can someone explain to me how division in MIX (from TAOCP by Knuth) works on a byte-to-byte basis? rA = |-| . . . .0| rX = |+|1235|0|3|1| The memory location 1000 contains |-|0|0|0|2|0|. When you execute the operation DIV 1000 the registers…
Ruben Steins
  • 2,782
  • 4
  • 27
  • 48
8
votes
2 answers

Gaussian random number generator

I'm trying to implement a gaussian distributed random number generator in the interval [0,1]. float rand_gauss (void) { float v1,v2,s; do { v1 = 2.0 * ((float) rand()/RAND_MAX) - 1; v2 = 2.0 * ((float) rand()/RAND_MAX) - 1; s =…
user173973
6
votes
2 answers

How can I get started using Donald Knuth's MIX/MMIX assembler?

I'd like to be able to learn MIX/MMIX, but I don't know the toolchain that one would use to write it. I've used uVision in the past for ARM assembler related things, does such an equivalent exist for MIX/MMIX?
user916367
6
votes
2 answers

Knuth the art of computer programming ex 1.1.8

I can't figure out what Knuth meant in his instructions for an exercise 8 from Chapter 1.1. The task is to make an efficient gcd algorithm of two positive integers m and n using his notation theta[j], phi[j], b[j] and a[j] where theta and phi are…
5
votes
2 answers

MIX or MMIX - what is the best

Hi my first question … I start reading ‘The Art of Computer Programming’. I know it’s hard. First I decide to lean the language of book – I start with MIX. I made some exercises and I think I can manages with programs in the book. But the problem is…
next_for
  • 55
  • 1
  • 5
4
votes
1 answer

What is the meaning of "ENT1 *" in TAOCP MIX assembly language?

In the book The Art of Computer Programming Volume 1, third edition, I'm having some hard time understanding the meaning of the following MIX assembly language instruction: ENT1 *, which appears on page 189 of the book. (p.189) For example, if we…
nglee
  • 1,913
  • 9
  • 32
3
votes
1 answer

Algorithm analysis in TAOCP

OK, I'm stumped. TAOCP vol1, 3rd edition, section 1.3.2 "The MIX Assembly language" gives a simple assembly program for finding the maximum of an array. The program is given on page 145 together with the number of times each instruction is…
zvrba
  • 24,186
  • 3
  • 55
  • 65
3
votes
1 answer

TAOCP Vol 1: Overflowing multiple stacks proof

I am self-studying TAOCP and trying to make sense of the solution to the following problem from Chapter 2.2.2 Linear Lists: Sequential Allocation. [30] If σ is any sequence of insertions and deletions such as (12), let s0 (σ) be the number of…
Cam Miller
  • 61
  • 3
3
votes
2 answers

Printing a number contained in a register

I'm learning MMIX so I tried making a simple program to add one to itself and print the result. Unfortunately it doesn't print anything. Here is my program: n IS $4 y IS $3 t IS $255 LOC #100 Main SET n,1 %let n = 1 ADD y,n,1…
Robert
  • 51
  • 2
1
2 3