Boat Drinks  

Go Back   Boat Drinks > General > General Disruption

Reply
 
Thread Tools Display Modes
Old 22-08-2009, 12:20   #1
Greenlizard0
Vodka Martini
 
Greenlizard0's Avatar
 
Join Date: Jun 2008
Posts: 717
Default FAO Comp Sci students/people

Allo, am running through my notes on Automata theory and languages. I'm unsure of a few things, possibly because more than one answer is possible.

Q)Consider the language that consists of all words over the alphabet {a,b,c}, that either begin with the letter a, or begin with b and contain exactly three c's.

a) draw a diagram of a deterministic finite automaton that accepts the language
b) Write a regular expression for the language, and explain briefly how our regular expression corresponds with the language


I get :

States 1,2,3,4,5,6. States 1 to 2 with an arrow labelled a. States 1 to 3 with an arrow labelled b. States 3,4,5,6 loop themselves with an arrow each, labelled a,b. States 1 to 3, 3 to 4, 4 to 5 and 5 to 6 have arrows with c above them. State 5 is an accepting state.

How do I pull out a regular expression for part b) ? I understand that an RE uses U, concat and Keene*.

Similarly for this question, how do I get a regular expression please?

Q)Consider the following NFA A=(Q,A,PHI,i,T) where :

alphabet A ={a,b}
states Q={i,r,s,t}
accepting states T={s,t}
transition function PHI is :

PHI(i,a)=r PHI(r,b)=s PHI(s,a)={r,t} PHI(t,b)=t


Again, the question asks to create a regular expression.

Any help would be appreciated, preferably in prose rather than formally please.
__________________
Greenlizard0 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:35.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.