Implementing NFAS in a spreadsheet

  • Authors:
  • T. V. Fossum

  • Affiliations:
  • University of Wisconson-Parkside, Kenosha, Wisconsin

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper describes a novel translation of a Nondeterministic Finite Automation (NFA) into a spreadsheet suitable for a program such as Microsoft Excel or Gnumeric. This translation can help students understand the structure of an NFA and provide a simple means to animate the NFA's actions to determine if it accepts an input string.A student can manually enter the spreadsheet cells corresponding to a particular NFA using only simple arithmetic expressions and formulas that involve the if function. For a complex NFA with many states and transitions, a manual entry process can be quite time-consuming and error-prone. We have written a Perl program that translates a NFA description given as an input text file into an output text file format that can be imported directly into commonly-available spreadsheet programs.The student can use the spreadsheet dynamically to "play" with the NFA: by giving it strings to accept/reject; by changing the set of accept states; and by changing the symbols that are associated with state transitions.