Here, I provide C++ implementation of a table-based Deterministic Finite Automaton. A DFA is a finite state machine that accepts/rejects finite strings of symbols and has a unique transition from each state on each input symbol.

# Monthly Archives: April 2013

# Evaluating infix arithmetic expressions with two stacks C++ implementation

Here, I provide a C++ implementation of a console – based calculator. Basically, it reads in infix arithmetic expressions and produces the result of their evaluation.

# My favorite TED talks

TED is a non-profit organization devoted to Ideas Worth Spreading. It started out (in 1984) as a conference bringing together people from three worlds: Technology, Entertainment, Design. Since then its scope has become ever broader.

# FIRST set of each variable in a CFG C++ implementation

Here I provide a C++ implementation for finding the FIRST set of each variable in a Context-Free Grammar. This is useful in the parsing phase of compilers.

# CS Jokes 101

Since the title of this blog is “Everything Under The Sun”, I didn’t want it to be entirely academic so I thought I would share a few CS jokes.

# NFA to DFA conversion C++ implementation

I needed a C++ implementation of NFA to DFA conversion for my compilers class and could not find a simple implementation on the web so I thought I would provide one.

# Median of a dynamic list

Here, I discuss the problem of maintaining the running median of a list when numbers are added and removed from the list. The straightforward solution of keeping the list sorted takes constant time per median calculation but linear time per addition/deletion. It would be too slow for our purpose.