You are on page 1of 7

JSS MAHAVIDYAPEETHA

JSS ACADEMY OF TECHNICAL EDUCATION


Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

Automata Theory and Computability

Subject Code: 18CS54

Exploring Finite State Automata with Junun Robots

Name USN
Amrit Baranwal 1JS20CS026

Course Faculty: Pradeep H K


JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

1. Abstract
A case study in computability theory is presented on teaching finite state automata with
mobile robots. Junun Mark III robots were used in several coding assignments on finite state
machines and a final coding project in an upper-level undergraduate course in computability
theory. Software and hardware choices are discussed with respect to the robotic platform and
the laboratory environment. Several guidelines are presented for integrating robots in theory
of computation classes to reinforce and enhance students’ understanding of finite state
machines through practical applications of finite state control mechanisms.

2. Introduction
Computability theory, also known as theory of computation (TOC), remains one of the most
challenging Computer Science (CS) courses both for professors and students. Professors,
who teach computability courses, face lack of motivation on the part of the students as well
as inadequate mathematical maturity and problem solving skills [1]. Students, who enroll in
TOC courses, especially when such courses are required, believe that the covered topics are
marginally relevant to having successful IT careers or, even when relevant, the topics are not
well motivated in the course materials. Although many students later realize the fundamental
and transcendental nature of concepts covered in TOC courses, they frequently fail to realize
it as they are actually taking the course due to abundant technical notation, complicated
terminology, and the tendency of some professors to over formalize intuitively straightforward
concepts.

Another problem faced by CS undergraduates is that they typically take TOC courses in their
senior year when they are almost finished with the undergraduate curriculum. The first author
of this paper has been teaching an undergraduate TOC class at Utah State University (USU)
for the past seven years and has heard many CS majors telling him how much easier the
advanced courses on compiler construction, game development, and programming
languages would have been, had they taken a TOC class earlier in their undergraduate
curriculum.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

3. Literature survey
In an introductory lecture, a finite state automaton (FSA) was informally described as a
directed graph whose nodes are states and whose edges are transitions on specific symbols.
We pointed out to the students that input symbols processed by the FSA can be as simple
as 0 and 1 or as complex as robot action sequences. Figure 2 shows a finite control for the
two-block domain. The control consists of three states Q0, Q1, and Q2. Each state is a set
of predicates that describe a state of the world. In state Q0, both blocks are on the table. In
state Q1, A is on B. In state Q2, B is on A. The camera-arm unit can start in any of the three
states.

We can define finite state automata for which there can be more than one sequence of legal
states to accept the same input. Such automata are called non-deterministic finite automata
(NFA). An NFA accepts an input so long as there is one legal sequence of states that begins
at the start state and ends in a final state. Formally, an NFA M is a 5-tuple where all symbols
are defined exactly as they are in the case of DFA except for the transition function which
maps pairs of states and symbols into the power set of Q.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

4. Methods and Images:


Junun Mark III robots can be programmed in 16f84a Assembler, which is possible but not
that easy. JAL is a higher level alternative available for the platform. The JAL compiler is
freely available from jal.sourceforge.net under GPL. The compiler converts the Jal source
code into hexadecimal files that can run directly on the robot. JAL is a higher-level language
for a number of PIC microcontrollers such as 16c84 and 16f84. The JAL compiler is available
on Linux, Mac OS X, and Windows.

JAL is a straightforward language to learn for anyone who has had some programming
experience with imperative programming languages. The only variable type is byte. The
language has loops and return statements. The students were given several examples of JAL
programs, e.g., an implementation of the Fibonacci numbers, and had a chance to compile
them with the JAL compiler installed on a Windows machine in the laboratory.

As we have previously stated, there are many robotic platforms available to CS instructors.
We chose the Junun Mark III robot platform (http://www.junun.org) for its modularity,
hardware and software adaptability, and a low budget. We purchased a total of five
unassembled Mark III kits and assembled them in the laboratory. Each kit was approximately
ninety dollars.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

The main components of the Mark III robot hardware are the controller and the chassis,
shown in Figure, respectively. The controller board, shown in Figure (left), holds a
microcontroller, a power regulator, a serial interface, and connection points for the off-board
sensors. Most of the work to build Mark III robots went into assembling and soldering the
controller board.

5. Discussion
The first two authors conducted regular informal surveys of the students’ perception of the
material and their attitude to the integration of robots into the curriculum. The first author did
it as instructor while the second author did it as teaching assistant. The overall response of
the students was overwhelmingly positive. All students told us that implementing their
solutions and trying them on real robots helped them understand the formal definitions and
theorems discussed or proved in class.

First lesson is the importance of purchasing rechargeable batteries. All batteries we


purchased originally were not rechargeable, which caused logistical problems when the
students would come to the laboratory to test their code only to discover that the batteries on
all robots were drained by the students who had come before them.

The second lesson is a positive impact that the integration of mobile robots had on the class.
Although there were hardware problems and failures, the robots turned out to be an excellent
exploration and demonstration tool for the concepts of finite state automata.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

6. Conclusion
A finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), finite automaton, or
simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in
exactly one of a finite number of states at any given time. The FSM can change from one state to another
in response to some inputs; the change from one state to another is called a transition.[1] An FSM is defined
by a list of its states, its initial state, and the inputs that trigger each transition. Finite-state machines are
of two types—deterministic finite-state machines and non-deterministic finite-state machines. A
deterministic finite-state machine can be constructed equivalent to any non-deterministic one.

The behavior of state machines can be observed in many devices in modern society that perform a
predetermined sequence of actions depending on a sequence of events with which they are presented.
Simple examples are vending machines, which dispense products when the proper combination of coins
is deposited, elevators, whose sequence of stops is determined by the floors requested by riders, traffic
lights, which change sequence when cars are waiting, and combination locks, which require the input of a
sequence of numbers in the proper order.

7. Future scope
In scope of present paper, an algorithm is proposed and implemented for the construction of
DFA ending with suffix since there exist no well-defined algorithm which can help new
learners to implement the DFA using a program. This algorithm takes suffix and the alphabet
set as input and gives transition table corresponding to the DFA as output. Along with this,
discussions have also been made about the string processing, once transition table for DFA
is obtained. In future, time complexity of the proposed algorithm can be improved. Also,
algorithm covers only specific case of DFA ending with suffix. A more generalized algorithm
can be constructed which may cover other cases of DFA constructions as well.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, MECHANICAL, IEM, E & IE

8. References
• Surma, D. R. “Rolling the dice on theory: one department’s decision to strengthen the
theoretical computing aspect of their curriculum.” Journal of Computing Sciences in
Colleges, vol. 28 (1), pp. 74-80, 2012.
• Cielniak, G., Bellotto, N., and Duckett, T. “Integrating mobile robotics and vision with
undergraduate computer science.” IEEE Transactions on Education, vol. 56 (1), pp.
48 – 53, 2013.
• Maxwell, B.A. and Meeden, L.A. “Integrating robotics research with undergraduate
education,” IEEE Intell. Syst. Mag., vol. 15, no. 6, pp.22–27, Nov.–Dec. 2000.
• Kulyukin, V., Gharpure, C., and Coster, D. “Robot- assisted shopping for the visually
impaired: proof-ofconcept design and feasiblity evaluation.” Assistive Technology, vol.
20.2, pp. 86-98, Summer 2008.
• Challinger, J. “Efficient use of robots in the undergraduate curriculum.” ACM SIGCSE
Bulletin, 37(1), 436-440, 2005.
• Davis, M., Sigal, R., and Weyuker, E.J. Computability, Complexity, and Languages:
Fundamentals of Theoretical Computer Science, 2nd Edition. Academic Press, New
York, 1994.

You might also like