Author |
Message |
bladeb2k
|
Posted: Wed Aug 15, 2007 8:52 am Post subject: Help Desperatly needed on These Questions!! |
|
|
If you know anyone that can help me with these two computer science questions i'll be sooo grateful.
1) The input to a program is to be a series of binary numbers seperated by commas e.g. 101, 111, 11011. The number zero is always written as 0 (i.e 0000 is not acceptable) however 01, 00101 and so on are acceptable for non-zero numbers.
Draw a deterministic finite state automaton which will accept the data described above.
2) The range of data to be accepted by the program has been extended to allow numbers to be grouped within parenthesis eg. 01,{01,0,{10,1,{0,1},{1}}},1
Design a Turing machine which will check for correctly formatted data. In this version the restriction of 0 being only represented by a single symbol need not be adhered to. The TM should check for correctly matched {and} but need not detect misplaced commas (as in, eg. {0,}).
You should assume:
i) the data is initially positioned on an otherwise blank tape (i.e. all spaces) with the TM's reading head above the first character.
ii) All commas are legally placed but {and} may not be
iii) the TM will end in one of the following states:
VALID DATA
TOO MANY '}'
TOO MANY '{'
with the obvious interpretation. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Nick
|
Posted: Wed Aug 15, 2007 8:55 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
u already posted this question... anyway by binary do u mean 01001100=76? or just the process of 0's and 1's in general? |
|
|
|
|
|
bladeb2k
|
Posted: Wed Aug 15, 2007 9:00 am Post subject: Re: Help Desperatly needed on These Questions!! |
|
|
By binary it means actual 01001100=76 etc. |
|
|
|
|
|
Nick
|
Posted: Wed Aug 15, 2007 9:01 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
so would u then convert the number ur receiving into ASCII to create characters? |
|
|
|
|
|
Aziz
|
Posted: Wed Aug 15, 2007 9:11 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
Post in the other thread in Turing forums. |
|
|
|
|
|
PaulButler
|
Posted: Wed Aug 15, 2007 9:17 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
momop, he needs to design a finite state automation, not a program. The binary to decimal conversion is irrelevant.
Look again at the problem. It simplifies to this:
- Reject the series if it contains only 0s
- Accept the series otherwise
But if you don't understand deterministic finite state automations, that won't help you much. You must have a textbook or something? |
|
|
|
|
|
bladeb2k
|
Posted: Wed Aug 15, 2007 9:22 am Post subject: Re: Help Desperatly needed on These Questions!! |
|
|
I have a textbook but it's all jargon - it doesn't make sense. Does anyone know another forum or something where anyone would be able to help me |
|
|
|
|
|
Nick
|
Posted: Wed Aug 15, 2007 9:27 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
when is this due? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Aziz
|
Posted: Wed Aug 15, 2007 9:31 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
Probably tomorrow - rofl. If the textbook is all jargon, it seems that you've missed more than just one class. Like I said, do some google searches and wikipedia reading. |
|
|
|
|
|
bladeb2k
|
Posted: Wed Aug 15, 2007 9:33 am Post subject: Re: Help Desperatly needed on These Questions!! |
|
|
it's due on monday, i'll try some searches now. |
|
|
|
|
|
Nick
|
Posted: Wed Aug 15, 2007 9:41 am Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
well atleast u got time well i have no clue so good luck! |
|
|
|
|
|
Dan
|
Posted: Wed Aug 15, 2007 2:21 pm Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
Moved to General Programming. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
CodeMonkey2000
|
Posted: Wed Aug 15, 2007 4:31 pm Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
What language are you doing this in? This doesn't sound that hard, as I've said before, it's just a simple string manipulation problem. |
|
|
|
|
|
Cervantes
|
Posted: Wed Aug 15, 2007 5:47 pm Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
What should be the output if the input is "}{"? There aren't too many "{" and nor are there too many "}", but they are formatted incorrectly. |
|
|
|
|
|
Aziz
|
Posted: Wed Aug 15, 2007 10:14 pm Post subject: RE:Help Desperatly needed on These Questions!! |
|
|
Read his post in Turing Help. He's not programming ... |
|
|
|
|
|
|