Friday, December 5, 2008

Problem solving.

The following problem was taken from A3, it is number 3 on the assignemnt.

The language defined by L(R), where R is a regular expression that does not include a Kleene star, is a finite language.

1. UNDERSTANDING THE PROBLEM

The problem is asking to prove that if the condition( R is a regular expression that does not include a kleen star) is true, then the language L(R) must be finite.


2. DEVISING A PLAN

Looking at this at first sight, it appears like it would be easily solved using structural induction, so I will right out the outline of the proof and solve it.


3. CARRYING OUT THE PLAN

Basis:
If R is a regular expression, by definition then either R = \phi or R = \empty string or R = a, for some a \in \Sigma.
L(\phi) = \phi (the empty language, consisting of no strings)
L(\epsilon) = \empty string (the language consisting of just the empty string)
For any a \in \Sigma, L(a) = {a} (the language consisting of the one-symbol string a)

Induction Step:
Suppose S and T are two regular expressions that do not contain
Kleene stars, and that they denote finite languages L(S) and L(T).
Then (S+T) denotes the union L(S) u L(T), and its length is no
longer than the length of L(S)+L(T),which is a finite number.
Also (ST) denotes the concatenation L(S)L(T), and is no longer than
the length of L(S) x L(T), again a finite number(a mutiple of finite numbers).

Thus, both (S+T) and (ST) denote finite languages and
all regular expressions
that do not include the Kleene star denote finite languages.
4. Looking Back

Looking back at my solution, I dont think there is any easier way to do this, and first looking at the problem I knew it must be true.

week 12+13

Today was my last day of 236, and I must say I enjoyed this course and I might even miss it ! The material for the last 2 weeks has continued to be interesting and this week we started context free grammar, which is also very interesting. I had my final test today and I think it went great, I was actually the first to finish the exam and I was surprised when I relized I still had around 25 minutes after I was done. I am pretty sure I did everything right so I am satisifed with my preformance. I have my finals next week and I really need to start studying.

My exam schedule is terrible, 4 exams in 4 days, but atleast 236 is the last one and I wont need much time to study for it as I believe im already well prepared for the final. I have to say this course was by far my favourite course, it was very well organized and the marking scheme was helpful, unlike my other courses in which one mistake could affect you greatly. Also in terms of material I really enjoyed this course and prof Danny was great in teaching this course, he passed his ideas to us in a clear way and still allowed us to develop our own thoughts in the course which, for me atleast, helped me a great deal to understand the material better .

Overall it was a great exprience, so I would like to thank prof Danny for this, and hopefully we will meet again !