COMPLEMENTS AND TRANSITIVE CLOSURES

Knuth教授近期在自己的个人主页上强烈呼吁大家要更正对弱连通分量的定义,不要用大部分教材里三心二意的定义,而是要用上个世纪70年代一篇关于离散数学的论文里的定义。Knuth教授的呼吁在此:https://www-cs-faculty.stanford.edu/~knuth/news22.html#weakcomps,部分引用如下:

Let’s all agree as soon as possible to use the easily understood term undirected components, or (as suggested by Doug West) underlying components, for what many people have unfortunately been calling weak components, and to celebrate the properties of directed graphs whose weak components are defined in a truly useful way.

本文研究学习上个世纪70年代一篇离散数学的话题,它有一个很好的关于图(Graph)的弱连通分量的定义。论文信息如下:

Continue reading

快速排序性能分析——Analytical Combinatorics方法

多键值排序是把快速排序(Quick Sort)和基数排序(Radix Sort)结合起来的算法。论文为 Fast Algorithms for Sorting and Searching Strings (J. Bentley, R. Sedgewick) 。Greenplum 6里面有实现,本文是我自己按论文搜索资料,一步一步复习、学习、整理的记录。

教授的讲座资料:

Continue reading

离散无噪声信道信道容量——Analytical Combinatorics方法

背景

前两天有同事分享看到信息熵的公式觉得非常巧妙,一下子把我的回忆带回到了15年的前本科时代,那时候学习过一门很有意思的课程信息论。信息论基本上就是祖师爷Claude Shannon一篇无比经典的论文A Mathematical Theory of Communication 安排的明明白白。本科时候我准备尝试去看这个论文,结果卡在第一处后就不了了之了,至今记忆犹新。

Continue reading

The HashSubplan implementation for NOT-IN Sublink in Postgres

NOT-IN expressions with subquery in SQL are notorious but very common. Not only do programmers write such kinds of SQLs but also many BI applications generate the kinds of SQLs. With NULL values, things get much more complex and even much much more complex for MPP databases. In this blog, we focus on single-node Postgres to understand the data structures, semantics, and algorithms of this topic.

I will talk more about GPDB’s LASJ implementation of NOT-IN later.

Continue reading

往事可追:从约瑟夫环问题到FFT算法重排

过河拜码头,上岸数人马。能走(苟)多远走(苟)多远,送死的人来了。

《好家伙》主题曲

从2023的国庆节到现在都龙年春节了,过去几个月,一言难尽。偶尔翻出来了上学期间写的一个小blog,看着那时候中二的文字,也是难以启齿。但也算乐于思考。往事可追,这里回顾这两个很有趣的算法,作为2024年思考的开始。

Continue reading