21
$\begingroup$

Taking an introduction to algorithms course, one encounters quicksort, minimal spanning tree, Dijkstra, Ford–Fulkerson algorithm etc. There are also several relatively standard data structures, such as hash maps or prefix-trees, etc. which are not super complicated but not trivial either.

Question: what are some examples of recent (say later than 1990) data structures and/or algorithms which are general enough and useful enough to be included in a modern Introduction to algorithms course?

There are some examples of algorithmic breakthroughs which almost fit here that I know of (I am mainly a mathematician). First one is the algorithm that in polynomial time determines if a number is prime or not. The second one is the graph isomorphism problem, which is shown to be not NP-complete by exhibiting a faster algorithm. Both of these, I kind of disqualify since they are too advanced from a math point of view. I am more looking for examples which naturally fits among the ones listed above (which are hard to come up with yourself, but easy to understand when they're explained).

Or, did our academical ancestors in the 1950s already discover all the 'classics'?

$\endgroup$
5
  • 3
    $\begingroup$ Graph isomorphism was not shown to be not NP-complete. It was shown to be in QP. And no one knows if QP=NP or not (or even NP=P). $\endgroup$
    – Lamine
    Aug 5, 2023 at 23:02
  • 2
    $\begingroup$ @Lamine ok fair point $\endgroup$ Aug 6, 2023 at 10:32
  • 3
    $\begingroup$ @Lamine: Graph isomorphism was not shown to be in QP (unless I've missed something) but in pseudopolynomial time, which means that under the (weak) exponential time hypothesis, it's not NP-complete. $\endgroup$ Aug 8, 2023 at 14:48
  • 1
    $\begingroup$ @PeterShor You're right. I had a wrong definition of QP. $\endgroup$
    – Lamine
    Aug 8, 2023 at 17:04
  • 3
    $\begingroup$ @PeterShor According to the Complexity Zoo, QP means quasipolynomial time, and the title of Babai's paper is "Graph isomorphism in quasipolynomial time". $\endgroup$
    – Laakeri
    Aug 10, 2023 at 12:35

10 Answers 10

11
$\begingroup$

More attention has been given recently to sketching and streaming data structures, such as Bloom Filters, Count Min Sketch, HyperLogLog.

Related, and also gaining popularity, are linear-algebra-based data-summarization type algorithms: compressed sensing; the Johnson-Lindenstrauss transform; principal component analysis via the singular value decomposition.

$\endgroup$
4
  • 2
    $\begingroup$ Bloom filters date from 1970 so they don't qualify. $\endgroup$ Aug 7, 2023 at 14:23
  • 2
    $\begingroup$ (I was going to suggest finger trees, but apparently they go back to 1977.) $\endgroup$ Aug 7, 2023 at 14:26
  • 4
    $\begingroup$ Yeah, I should have clarified that the idea original is from 1970, but there was much more attention, development, generalization, and application since 2000. And if you are teaching these other new randomized data structures, you would teach Bloom filters too. $\endgroup$
    – usul
    Aug 7, 2023 at 19:00
  • $\begingroup$ More modern replacements to Bloom filters (cuckoo filters, XOR filters) might fit the bill here as “modern.” $\endgroup$ Aug 8, 2023 at 4:08
11
$\begingroup$

Suffix arrays, with linear time construction. There are various algorithms, they're relatively approachable, and applications are plenty. SA-IS dates to 2009.

Soft heaps, they're not that complex, and have some neat applications. Dates to 2000, some newer tricks are more recent.

For off-line lowest-common-ancestor, Tarjans union-find based algorithm gets all the attention. It's not bad, but Schieber&Vishkins bit-manipulation based algorithm is also neat. Dates to 1988, which is before 1990, but apparently that's recent enough that it remains largely unknown.

Asymmetric numeral systems have largely replaced Huffman as the "default entropy coding algorithm" in the past decade or so. IDK if that deserves to be in introduction to algorithms, but Huffman coding sometimes shows up too

$\endgroup$
10
$\begingroup$

Quantum algorithms would fit this, if one has time to introduce the model -- specifically, Grover search and possibly Shor's algorithm.

$\endgroup$
8
$\begingroup$

You could look at the multiplicative weights update method. Specific instances of this technique have been known since the 1950s, but it's only been recognized as a very useful general algorithmic technique in the last decade or two.

$\endgroup$
6
$\begingroup$

I think we could include submodular optimization. Many common optimization problems can be framed as maximizing or minimizing submodular functions subject to natural constraints. Examples include max cut and min vertex cover. Research in the area dates to the late 1970s, but submodular optimization and applications have received much more study and attention since 2000.

$\endgroup$
6
$\begingroup$

Perhaps Markov Chain Monte Carlo. Like most other answers, it can be traced farther back, but rose to much more prominence since the mid-90s. In general, Markov chains and (random) walks on graphs are good topics for early algorithms classes, as they're useful later both in applications and theory.

$\endgroup$
5
$\begingroup$

I guess it depends on what constitutes "too advanced from a math point of view." It is natural that modern algorithmic ideas will involve more modern mathematics.

The theory of Linear Programs (LPs) was a huge breakthrough (from the 40's) and many modern algorithms and algorithmic ideas are based on the theory of LPs or solving an LP. One modern example is Primal-Dual methods. These are algorithms that use the theory of LP duality to find a solution but don't actually need to solve any linear programs (LPs). Actually, Kruskal's minimum spanning tree algorithm, Dijkstra's shortest path algorithm, and some other classical network algorithms can be viewed as primal-dual algorithms.

However, understanding the theory of LPs would probably take too much time to be included in an intro to algorithms course. It also requires knowing a little linear algebra, so it might not be what you are looking for.

An idea that might fit better is that of randomized algorithms. Karger's contraction algorithm for finding minimum cuts is a good introduction that can be understood and analyzed with very little math.

$\endgroup$
0
4
$\begingroup$

Montgomery's ladder and a whole host of other algorithms developed to mitigate side-channel attacks only appeared in the 1980-1990s. They're conceptually quite simple to understand, and the rationale behind them could be explained in a couple of sentences to a layperson. https://www.jstor.org/stable/2007888

$\endgroup$
0
$\begingroup$

Some search based algorithms such for finding(or enumerating) Maximal Cliques have been around for a while, eg Bron-Kerbosch from the 70s. Related to such maximal clique finding algorithms could be that of the MaxCliqueDyn algorithm from the 2000s. Its application can be widespread in computational chemistry, or communications.

Possibly related to algorithms for submodular functions as mentioned in an earlier answer could be those algorithms solving matroid partitioning. Many advances have been made since Edmonds or Cunningham(1980s). See more recent reference for more about matroid partitioning. With Oracle techniques, or efficient use of binary search new algorithmic techniques could be introduced. Although the treatment may be considered mathematical.

$\endgroup$
0
$\begingroup$

I would suggest maximal entropy random walk - there are lots of algorithms based on random walk, and the naive choice (uniform probability among outgoing edges) often turns out suboptimal.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.