Automata Theory Part 1

Automata theory is actually the study of abstract machines and problems which they are able to solve. Automata theory is closely related to formal language theory as the automata are often classified by the class of formal languages they are able to recognize.

An automaton is a mathematical model for a finite state machine (FSM). An FSM is a machine that, given an input of symbols, "jumps", or transitions, through a series of states according to a transition function (which can be expressed as a table).

The input is read symbol by symbol, until it is consumed completely. Once the input is depleted, the automaton is said to have stopped.

Depending on the state in which the automaton stops, the automaton either accepts or rejects the input (Final state or Dead state). If it landed in an accept state, then the automaton accepts the word. If, on the other hand, it lands on a reject state, the word is rejected. The set of all the words accepted by an automaton is called the language accepted by the automaton.

Automata play a major role in compiler design and parsing.

Vocabulary:
Symbol
An arbitrary datum which has some meaning to or effect on the machine.
Word
A finite string formed by the concatenation of a number of symbols.
Alphabet
A finite set of symbols. An alphabet is frequently denoted by Σ, which is the set of letters in an alphabet.
Language
A set of words, formed by symbols in a given alphabet. May or may not be infinite.

An automaton is represented by the 5-tuple , where:
* Q is a set of states.
* ∑ is a finite set of symbols, that we will call the alphabet of the language the automaton accepts.
* δ is the transition function, that is

δ:Q X ∑ -> Q.

(For non-deterministic automata, the empty string is an allowed input).

* q0 is the start state, that is, the state in which the automaton is when no input has been processed yet, where q0 is an element of Q.
* F is a set of states of Q (i.e. F is an imporper subset Q) called accept states.


Read More ..

How to View Total and Free Memory in JAVA

This code snippet allows you to view the total memory and free memory in your console at runtime.

public class MemoryViewing {

public static void main(String[] args) {

System.out.println("Total Memory: " + Runtime.getRuntime().totalMemory());

System.out.println("Free Memory: " + Runtime.getRuntime().freeMemory());

}
}


Runtime is a singleton.

Read More ..

Genesis

Greetings!


I'll be posting in this blog about things you basically need to know about programming and computers. For simplicity I'll be using Java for OOP and C for other things.

I hope this helps and that you'll enjoy your visit.

Read More ..