Wednesday, 5 December 2012

Conclusion about the Course:

This course is a great one to take, if you really want to test your mathematical abilities.
As you Progress, material builds on itself, so if you fail to understand something in the past, you will fact difficulties in the future part of this course, for sure.
Its like a Binary Tree Going Downwards.  Root of The tree is Induction, and From There It starts to grow down.
Danny is a Great Professor, explains things really well and out TA Lila is also very good, Explains Tutorial Questions in a very organized manner.
This course taught me the most than any other course ever has. Thums Up! for CSC 236.
A Great Experience.

Mathematical Problem:

Problem: Find a DFSA which accepts strings with multiple of 3 0s, and odd number of 1s.
and also Find an Equivalent Regular Expression for that?

Solution:
This is the solution I came up with.
State Elimination part was quite big, so I posted the Final Form in the end for State Elimination and the Regular Expression.



Monday, 3 December 2012

DFSA, NFSA and Equivalence to Regular Expressions.

DFSA stands for Deterministic Finite State Automata:
After Regular Expressions ---> Danny moved to this topic.
DFSA is basically a machine with different states inside it, some of the states are accepting and some of them are non-accepting states. A DFSA represents the language defined by regex. So, basically all the strings belonging to the language are supposed to end up in accepting states when given to DFSA, all other strings will end up in dead or non-accepting States.  Deterministic part of DFSA is what makes it distinct, because transition from one state to the other is purely determined by the Input and the current state.

NFSA :- Non -Determinsitic Finite State Automata.
if a DFSA exist for a regular Expression then a NFSA also exsists.
In NFSA State Transitions are non-deterministic, from one state we can have path to two different states for the same input. It is completely dependent on the machine which state it chooses to go to.
Same Way we can have epsilon transitions in NFSA.
The Idea of NFSA is difficult to grasp in he begining, but then as I worked through examples from course notes and Tutorials... the idea becomes clear... Eventually making NFSA is eaiser then DFSA.



Now, the Third paart of This Post...
For Every DFSA or NFSA there is an Regular Expression.

Assume that you have Implemented a DFSA...
You have the State Transition Diagram Let's Say with 3 states...

To find the equivalent regex.
We need to eliminate all the states between Initial state to accepting state.
Eliminating states can be delicate as you have to preserve the state transitions of eliminated state.

After State Elimination we will be left with two states, Initial and accpeting state,
From the resulting Diagram we can figure out the Regex.

This requires practice... Nothing is abstract about it!
Practice from course notes and online refrences from google is also a good option.

Sunday, 2 December 2012

Regular Expressions:

Last Segment of the course covered Regular Expressions
Regular Expressions are concise notations to describe languages.
From Regular Expressions we can form Infinite strings with finite characters, those finite characters belong to a generic set, and we say that Regular Expression is defined over that set.

Languages based on Regular Expressions are Defined using Structural Induction.

The Topic of Regular Expressions is the most Interesting and easiest part of the course I have experienced.

The whole idea of regular expressions is so simple and neat.
The Practical application which we did in java for CSC207,
Regular Expressions are used to match strings of text, such as particular characters, words, or patterns of characters.