Author: ixi
Design and Analysis of Algorithms
Course Features
- Video lectures
- Subtitles/transcript
- Lecture notes
- Assignments and solutions
- Exams and solutions
- Recitation videos
- Instructor insights
- This Course at MIT
Course Description
This is an intermediate algorithms course with an emphasis on teaching techniques for the design and analysis of efficient algorithms, emphasizing methods of application. Topics include divide-and-conquer, randomization, dynamic programming, greedy algorithms, incremental improvement, complexity, and cryptography.
Note on Previous Versions:
The Spring 2015 version of 6.046 contains substantially different content than the Spring 2005 version. The 2005 version was an introductory algorithms course assuming minimal previous experience, while the 2015 version is an intermediate course requiring a semester of introductory material found in 6.006.
Other OCW Versions
OCW has published multiple versions of this subject.
dancing links
In computer science, dancing links is the technique suggested by Donald Knuth to efficiently implement his Algorithm X.[1] Algorithm X is a recursive, nondeterministic, depth-first, backtracking algorithm that finds all solutions to the exact cover problem. Some of the better-known exact cover problems include tiling, the n queens problem, and Sudoku.
The name dancing links stems from the way the algorithm works, as iterations of the algorithm cause the links to “dance” with partner links so as to resemble an “exquisitely choreographed dance.” Knuth credits Hiroshi Hitotsumatsu and Kōhei Noshita with having invented the idea in 1979,[2] but it is his paper which has popularized it.
“Algorithm X” is the name Donald Knuth used in his paper “Dancing Links” to refer to “the most obvious trial-and-error approach” for finding all solutions to the exact coverproblem.[1] Technically, Algorithm X is a recursive, nondeterministic, depth-first, backtracking algorithm. While Algorithm X is generally useful as a succinct explanation of how theexact cover problem may be solved, Knuth’s intent in presenting it was merely to demonstrate the utility of the dancing links technique via an efficient implementation he called DLX.[1]
The exact cover problem is represented in Algorithm X using a matrix A consisting of 0s and 1s. The goal is to select a subset of the rows so that the digit 1 appears in each column exactly once.
Algorithm X functions as follows:
-
- If the matrix A has no columns, the current partial solution is a valid solution; terminate successfully.
- Otherwise choose a column c (deterministically).
- Choose a row r such that Ar, c = 1 (nondeterministically).
- Include row r in the partial solution.
- For each column j such that Ar, j = 1,
- for each row i such that Ai, j = 1,
- delete row i from matrix A.
- delete column j from matrix A.
- for each row i such that Ai, j = 1,
- Repeat this algorithm recursively on the reduced matrix A.
The nondeterministic choice of r means that the algorithm essentially clones itself into independent subalgorithms; each subalgorithm inherits the current matrix A, but reduces it with respect to a different row r. If column c is entirely zero, there are no subalgorithms and the process terminates unsuccessfully.
The subalgorithms form a search tree in a natural way, with the original problem at the root and with level k containing each subalgorithm that corresponds to k chosen rows. Backtracking is the process of traversing the tree in preorder, depth first.
Any systematic rule for choosing column c in this procedure will find all solutions, but some rules work much better than others. To reduce the number of iterations, Knuthsuggests that the column choosing algorithm select a column with the lowest number of 1s in it.
WordPress white screen of death
Then follow these steps to find the plugin causing the white screen of death:
Navigate to the directory where your WordPress files are located.
Open the wp-content folder.
Inside the wp-content folder, locate the plugins folder.
Rename the plugins folder. …
Log in to your WordPress Dashboard.
VoltDB updates database with Web links
Responding to a growing user base of online service providers, VoltDB has outfitted its namesake in-memory database management system with additional tools to communicate with other technologies usually found in a Web applications stack.
Responding to a growing user base of online service providers, VoltDB has outfitted its namesake in-memory database management system with additional tools to communicate with other technologies usually found in a Web applications stack.
Data science
IT service management
Is your TV or smartphone spying on you right now?
Published on Dec 2, 2015
Is your TV or smartphone spying on you right now?