Questions tagged [knuth]

Donald E. Knuth is a computer scientist, best known as the author of the series of books on algorithms The Art of Computer Programming and the creator of the TeX typesetting system.

91 questions
3
votes
2 answers

knuthBendix algorithm cannot be parallelized by Control.Parallel?

I am trying to apply knuthBendix to large sets of rewriting rules. Thus, I try to let it work on different sets in parallel. As en example, I try to run: import Control.Parallel import Control.Parallel.Strategies import…
2
votes
1 answer

Define contraints for specific exact cover problem

I have a specific problem in mind, that I want to solve using Knuth's Algorithm X. However, I struggle to translate my problem into suitable contraints, that make up the incidence matrix for Algorithm X to operate on. For my sports club summer…
2
votes
3 answers

Word frequency elegantly in Powershell

Donald Knuth once got the task to write a literate program computing the word frequency of a file. Read a file of text, determine the n most frequently used words, and print out a sorted list of those words along with their frequencies. Doug…
qznc
  • 1,113
  • 2
  • 12
  • 25
2
votes
1 answer

Trying to find the Knuth discussion of quotient and remainder

I seem to recall once reading in one of the tAOCP fascicles Knuth's discussion of calculating the integer quotient and remainder. My memory is that he claims it is not possible to calculate one without the other, and that he believed the results…
Jim Newton
  • 594
  • 3
  • 16
2
votes
1 answer

Knuth Dancing Links with Secondary Columns

I have implemented Knuth's "Dancing Links" algorithm to explore the generalized exact cover problem (i.e., with secondary columns). The code works as expected for an exact cover (i.e., all columns are primary columns) and so for a simple sparse…
slaw
  • 6,591
  • 16
  • 56
  • 109
2
votes
2 answers

Where can I find the graph of TeX's error log?

In Donald Knuth's Literate Programming, there was if I remember correctly a graph showing the evolution of TeX's number of bugs over time. This graph has remained flat for the past decade or so, suggesting that TeX might now be bug-free. I would…
lindelof
  • 34,556
  • 31
  • 99
  • 140
2
votes
1 answer

Donald Knuth Dancing Links special pointer implementation

Right now I am working on my implementation of the D.Kuth DLX algorithm/data structure. I know what is exact cover and how Dancing links works. But I have a question on his paper: On page 5, he describes the implementation of the algorithm. And…
Soul Bruteflow
  • 115
  • 2
  • 8
2
votes
1 answer

MIX DIV operator, and Conversion of packed bytes number

I'm working through Knuth's The Art of Computer Programming, and I have a question about the MIX assembly language, particularly the DIV operator. On page 133, he gives an example of how the DIV operator affects the Accumulator and Extension…
2
votes
1 answer

Purpose to set to 0 least significant bits in MMIX assembly with memory operations?

In the documentation to MMIX machine mmix-doc page 3 paragraph 4: We use the notation to stand for a number consisting of consecutive bytes starting at location . (The notation means that the least significant t bits of k are set to 0,…
2
votes
2 answers

What do the numbers in square brackets mean beside the TAoCP exercises?

Here is an example: [00] The binary form of 2009... [05] Which of the letters... [10] Four-bit quantities -- half-bytes, or hexadecimal digits... [15] A kilobyte... [M13] If x is any string of 0s and 1s... [M20] Prove or disprove... What do the…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
2
votes
2 answers

Is there any practical use, like certain algorithms, of Knuth's up-arrow notation?

Recently, I have read something about Ackermann function and Knuth's up-arrow notation. I know that notation is used to denote vary large number. However, I can't find any practical use - the notation is applied in certain algorithms or programs -…
MarsPlus
  • 321
  • 4
  • 7
2
votes
2 answers

C++ sorting algorithm

Thanks for looking at this question in advance. I am trying to order the following list of…
wilcode
  • 633
  • 2
  • 10
  • 25
2
votes
0 answers

Donald Knuth algorithm for Mastermind

I'm working onto the Donald Knuth 1977 algorithm for Mastermind (here). I've implemented some steps, but I don't know how to calculate the number of possibilites that would be eliminated for each possible score. Integer Bulls <- 0 WHILE Bulls <= 4 …
md5
  • 23,373
  • 3
  • 44
  • 93
1
vote
0 answers

MMIX: questions on dynamic trap

I have some questions on MMIX's interrupt. The definition of the special register rK is "interrupt mask register". But it seems it treat different event differently. for I/O bits(let's call ** bit: This is a normal case. When an external…
wuxb
  • 2,572
  • 1
  • 21
  • 30
1
vote
4 answers

Unable to combine English words from letters by Ruby

I need to find all English words which can be formed from the letters in a string sentence="Ziegler's Giant Bar" I can make an array of letters by sentence.split(//) How can I make more than 4500 English words from the sentence in…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697