Image for post
Image for post
Photo by Markus Spiske on Unsplash

Introduction

In a previous article, I explained how to convert a regular expression to postfix notation by using the Shunting-Yard algorithm. This is the first step you must do before converting a given regular expression to an NFA. The purpose for using postfix notation is to rearrange the symbols and operations in such a way that the expression can be read from left to right, maintain the order of operations for regular expressions, and not have to handle parsing parentheses.

In the last article, we used the regular expression a(a+b)*b , which returns all strings that begin with the letter a and end in the letter b. After we run this expression through the Shunting-Yard algorithm, the postfix result is aab+*?b? (remember the ? symbol represents concatenation). I will now illustrate how to apply Thompson’s Construction Algorithm to convert this expression into its respective NFA. …


Introduction

My latest coding project involved converting a regular expression to a nondeterministic finite automata (NFA) diagram (you can learn more about NFAs by reading one of my latest articles on my blog). My program would take in a regular expression as an input, such as a(a+b)*b and output an NFA diagram with states and transitions that would represent the given regular expression.

Early on into the coding, I ran into an issue. I needed to figure out a way to properly read in the regular expression so that my program would be able to build the NFA piece by piece. I had to ask myself, what would my program do when it runs into parentheses? How would it know which NFAs to combine? …


Image for post
Image for post
Photo by Nigel Tadyanehondo on Unsplash

What is Ray Tracing?

Ray tracing is a graphics technique for generating realistic-looking images by using vectors to trace pixels in an image plane and rendering the effect each ray’s encounter with other parameters such as objects, lights, shadows, and reflections.

Generating Rays

The first step in any ray tracer is ray generation. A ray is a line in 3D space that begins at one endpoint and extends infinitely in one direction. The first rays a ray tracer makes are called viewing rays. These rays generate from the viewer’s eye (sometimes called the “camera”) and extend outward towards the viewing plane. …


Before you continue reading, I would recommend reading my “Introduction to Deterministic Finite Automata (DFA)” article before reading this one, as this is a continuation of that article.

Introduction to Deterministic Finite Automata (DFA) → https://medium.com/@gregorycernera/introduction-to-deterministic-finite-automata-dfa-40aac64b9895

Image for post
Image for post
Photo by Green Chameleon on Unsplash

What is an NFA?

Similar to a DFA, an NFA is a state machine consisting of states and transitions that can either accept or reject a finite string. And like a DFA, we must use circles to represent states, and directed arrows to represent transitions. But, what’s the difference?

Essentially, NFAs have less restrictions than DFAs, and can therefore make complicated automata easier to understand and depict in a diagram. …


DFA explanation and example

What is a DFA?

A DFA is a state machine consisting of states and transitions that can either accept or reject a finite string, which consists of a series of symbols, and compare it to a predefined language across a predetermined set of characters. We use circles to represent states, and directed arrows to represent transitions. Every state must have each symbol going outwards from the state, or else it will not be defined as a DFA.

Image for post
Image for post
Photo by Helloquence on Unsplash

Why do we use it?

DFAs allow for an easier use of certain projects and applications that switch between states of validity and invalidity.


Image for post
Image for post
Photo by Jehyun Sung on Unsplash

Leading a team is not easy. There are a million different methods to plan and execute a project. Some of these methods will be very successful, others not so much. Whether you are an effective or ineffective leader will ultimately determine whether or not your team will succeed.

This article focuses on a team building some sort of software application. However, these tips can apply to anyone looking for advice on helping guide their team.

I want to emphasize the term small team, because I don’t know what it’s like to manage an entire department of employees (yet). I don’t want to lie to you and pretend as if I know more than I actually do. My points in this article were gained from observations of my team leads and managers at IBM, and how I led software projects in college. …

About

Gregory Cernera

Software Engineer at IBM — more about me at https://cernera.me/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store