Skip to main content

Dijkstra's preferred interval notation

Daniel Farlow
Software Engineer

Dijkstra's argument that numbering should start at zero begins with an analysis of a subsequence of natural numbers, namely 2,3,,122, 3, \ldots, 12, and what interval notation should be preferred most to denote this sequence. Exploring his argument in more detail allows for greater understanding as to why the half-interval notation [a,b)[a, b) is to be preferred in a variety of programming contexts (e.g., implementing sliding windows).

Asymptotic notation and analysis, recurrence relations, and random background math topics (with attitude)

Daniel Farlow
Software Engineer

This post explores asymptotic notation and analysis, namely big-OO notation and a variety of related properties. This sets the stage for discussing recurrence relations and ultimately the Master Theorem for analyzing the time complexity of recurrence relations. Finally, we take a look at a few isolated math topics that will proof fruitful for future analyses.

Learning Tarjan's algorithm

Daniel Farlow
Software Engineer

Learning Tarjan's algorithm for finding the strongly connected components (SCCs) of a directed graph can be rather difficult at first. Many learning materials sketch out the concepts and may even provide pseudocode, but few materials provide fully worked out examples along with working code. This blog post seeks to change that. Example graphs are taken from other quality learning sources (with attribution), but, importantly, working code is provided (in Python) to test Tarjan's algorithm to see the results for yourself.

Iterative DFS with stack-based graph traversal

Daniel Farlow
Software Engineer

Depth-first search (DFS) on a graph (binary tree or otherwise) is most often implemented recursively, but there are occasions where it may be desirable to consider an iterative approach instead. Such as when we may be worried about overflowing the call stack. In such cases it makes sense to rely on implementing DFS with our own stack instead of relying on our program's implicit call stack. But doing so can lead to some problems if we are not careful.

Working with arbitrary bases

Daniel Farlow
Software Engineer

This post details how to work with arbitrary bases in a positional numeral system (e.g., decimal, binary, etc.). Specifically, this post details how to convert numbers from base 10 to base bb in such a way that not only is the whole number portion converted but also the fractional/radix portion as well.