2023-01-03更新:
第一题我后来想到可以用Symbolic Method求解,参考后来写的英文blog: Symbolic Method to solve a probability problem.
刷知乎刷到一个问题
https://www.zhihu.com/question/419625606

咱看了看一时间想试试看。
Continue reading
2023-01-03更新:
第一题我后来想到可以用Symbolic Method求解,参考后来写的英文blog: Symbolic Method to solve a probability problem.
刷知乎刷到一个问题
https://www.zhihu.com/question/419625606

咱看了看一时间想试试看。
Continue reading足下涉西河,虏魏王,禽夏说,引兵下井陉,诛成安君,徇赵,胁燕,定齐,南摧楚人之兵二十万,东杀龙且,西向以报,此所谓功无二于天下,而略不世出者也。
——《史记 · 淮阴侯列传》
This is Chapter 8 of the book PAIP. It still uses pattern-match and rules to design several simple algorithms to do symbolic math simplification. I just go through the ideas in the book, and design my own program to pass all the cases in the book. The code is in https://github.com/kainwen/paip/tree/master/sym_math2/.
Continue reading千锤万凿出深山,烈火焚烧若等闲。
《石灰吟》于谦
粉骨碎身浑不怕,要留清白在人间。
This is Chapter 5 of the book PAIP. It implemented an early-day algorithm to dialog with a machine. It had the appearance of AI, but actually it was just another interpreter: programmer designs some rules at first, and then eval the user’s input. The main topic is pattern-match programming.
Pattern-match is really my favorite language feature. Erlang and many functional programming languages (Oz, ML, …) support it quite well. C language offers switch statement which can only match constant expression in each clause. Different languages may have different scopes for pattern variables.
GPS is the acronym for General Problem Solver. The book Norvig, Peter. Paradigms of artificial intelligence programming: case studies in Common LISP. Morgan Kaufmann, 1992 spent the whole Chapter 4 to show how you can program a GPS using common lisp and pointed out several “bugs” that you should pay attention to. This is a great book that I highly recommend it.
Since EOPL, I am convinced that Erlang is a very good language to implement other language or write AI paradigm program. My several projects are:
More details on Common Lisp implementation can be found in the open-source repo: https://github.com/norvig/paip-lisp.
Continue readingThe problems are from the Book Jaynes, Edwin T. Probability theory: The logic of science. Cambridge university press, 2003. Chapter 3 of the book is on the topic of Elementary sampling theory. These problems can be easily solved using the symbolic method of analytical combinatorics.
Continue readingGreenplum is MPP database. The SQL query’s planning and executing model is a distributed computing model. Greenplum introduces the concept of locus to model a path’s data distribution.
For more details, please refer to one of my talk Greenplum 查询优化器关键技术介绍.
Continue readingThis month, my most spare time has been spent on the problem Cardinality Estimate. When I finished the analysis of hyperloglog (see the blog A Tour of Understanding Hyperloglog), I just remember a recent paper of SIGMOD2019: Approximate Distinct Counts for Billions of Datasets. Its idea is to combine CountMin and Hyperloglog. Before diving into that paper, I decide to study CountMin. Another paper on cardinality estimate survey is VLDB2017’s Cardinality Estimation: An Experimental Survey mentioned a method called MinCount.
CM sketch was introduced by the paper: An Improved Data Stream Summary: The Count-Min Sketch and its Applications. I do not want to dive into that paper, but just reword the proof here (maybe in a better way).
Continue reading