What is the english description for this DFA? - finite-automata

Practicing some DFAs and NFAs and came across this one. Not sure how to give an English description let alone a regular expression.

That would be "even number of both 0's and 1's". Top right state is "odd # of 0's", bottom left is "odd # of 1's", bottom right is "both odd".

Related

Can you help me with this simple RobotC exercise?

I mean 2. Second Length found here
I think I found all mistakes but still, I can't seem to get the right answer.
On line 8 it should be wait1Msec(3000); instead of wait1Msec(4000);
Swing turn to the right should be written as 100 power for C and 0 power for B. I also tried -100 for B and even exchanged letters just in case I misunderstood which of the motors is left and which is right, but I still got the wrong answer (according to the website).
There are mistakes in the comments as well, but that shouldn't be a problem since they're just comments! Still, I corrected them just in case. Replaced 4 with 3 and replaced right with left, still not correct.
Do they expect me to right some specific text in the comments? Or am I missing something?
It seems that you should write the code for your second length after the comment
//END OF FIRST LENGTH
So, your code should be a code for the first length and the second length. I hope that helps.

What is this DFA means?

There is a DFA.
But I don't know this DFA means.
I want to know this DFA's Regular expression and description
(Description like 'this automata accept suffix is 011)
Blue state is start state and red states are accept states.
see the link below....it will tell about DFA.
http://en.wikipedia.org/wiki/Deterministic_finite_automaton

Get proper Numbering field for figures in Microsoft Word 2010

I have .docx document with multilevel list for my chapters and TOC is:
1. Chapter One
2. Chapter Two
2.1. Chapter Two, Sub-chapter One
...
5. Chapter Five
5.1. Chapter Five, Sub-chapter One
5.1.1. Chapter Five, Sub-chapter One, Sub-sub-chapter One
etc.
I had inserted figure in my sub-chapter 5.1.1. and I used "Insert Caption..." to put some text below the image:
Figure 5.1.1.1 Some image caption
What I would like to have is caption format where only Chapter number, but no sub-chapters numbering is included, like this:
Figure 5.1 Some image caption
where 5 is my Chapter number and .1 is sequential of Figure in this Chapter.
Now my field code looks like this:
Figure { STYLEREF 1 \s }.{ SEQ Figure \* ARABIC \s 1 }
How can that be done?
In Word2007, all you have to do is be careful to start the sub-chapters with a different heading style. Then use the chapter heading style for numbering your figures. Word then ignores your sub-chapters when it numbers your figures, tables, and equations. Oh, and you have to have the entire document set up as a multi-level list, but it sounds like you've already done that.
p.s. Although this is a great question, and I learned something answering it, it doesn't really belong on StackOverflow since it isn't a programming question. Someone will suggest a better StackExchange site for it. (Super User?) Don't get mad! It is very easy to open accounts on other StackExchange sites. Your logon credentials are the same (unless you make them different). Your reputation doesn't carry over to different sites, but your rep here is only 23 at the moment, so no big deal there. ;-) If you move it to Super User, leave a comment here to that effect, and I'll come answer it over there. Then you can select my answer, and I won't be a 6 there anymore. LOL! And maybe you can answer my one question over there.
Ok, I have found temporary solution to my problem.
Inside every chapter (denoted by Heading1 style) I have change the Caption code from this:
Figure { STYLEREF 1 \s }.{ SEQ Figure \* ARABIC \s 1 }
to this:
Figure 5.{ SEQ Figure \* ARABIC \s 1 }
where 5 is number of my top-level chapter. Then, if I insert new figure, I Copy-Paste above code under it and all figure numbers properly change to new, i.e. sequence number.
This way, I do not have problems, when executing "Update field" on whole document, where Table of Figures is affected.

Is it necessary to translate the direction character in a latitude/longitude?

Possibly a subjective question this (although I hope not). I am translating an application into European Spanish. This application provides on-screen latitude and longitude display.
When displaying the direction of a given longitude in English, an example might be:
10° W 10' 2.42"
However, the word West in Spanish translates to Oeste. Is it convention to leave the character in the longitude in English or translate it to Spanish, like so:
10° O 10' 2.42"
Personally I feel that as a maritime standard it needs no translations, but if anyone can point me to an example where this is not true that would be much appreciated.
Thanks
Most languages do translate them – that's the case with Finnish, Swedish and German, at least. I'd still keep their English names if it was really a maritime software, since most people on special fields are most accustomed to see the English characters denoting the hemispheres. Actually, some translations might also cause confusion if presented to an unfamiliar user, eg. "south" in Finnish would be shortened as E, which would be shortened version for east in the original version.
Other option worth considering would be using signed numbers, ie. -10° for 10° W. That's quite widely used and very unambiguous. If you aren't running out of space, I'd use the real names of the hemispheres instead of abbreviations, to stay on the safe side.

Give state diagrams of DFAs recognizing the following languages. In all parts the alphabet is {0,1 }

Im trying to get the hang of drawing DFAs. I have the following problem to do with my following attempt, was wondering if anyone could tell me if im correct, or if incorrect what im doing wrong. Thanks! Also, if anyone has a good resource to learn more about how to do these, it would be greatly appreciated.
Give state diagrams of DFAs recognizing the following languages. In all parts the alphabet is {0,1 }
{w | the length of w is at most 5}
Here are some clues.
"At most 5": this implies you must do some counting. In state machines, counting is accomplished by the context of each node. In other words, you will require a number of nodes, each with a special meaning, and that meaning will be your "counter value."
"At most 5": This means you must accept words of length 0, 1, 2, 3, 4, and 5. (All of which have unique values, hint hint.)
Your alphabet is {0,1}, but there are no requirements of the language of the frequency, ordering, or anything related to 0 and 1. This means every time there is a transition for 0, the same transition must be available to 1, and vice versa. (Or some equivalent relation that reduces to this rule - but this is in parentheses because it's not something you need to think about.)
Here are your errors:
You have no marked start state.
The strings "0", "" (the empty string), "1" are rejected, but are within the prescribed language. In other words, you are accepting only words that are exactly length 5, not all words that are length 5 and less.
Since the alphabet is {0, 1}, you must specify at EACH state what happens when either a 0 or a 1 is encountered. If you encounter an input character whose edge is NOT specified, by convention you are going to the dead state, a state that always returns to itself and is never accepted, but is left undrawn. This is why your right-most state is unnecessary, but your left states are incomplete.
Final, big hint: You can have more than one "Accept" or "Final" state.
I think the DFA shown above is wrong. It will accept strings up to length 5 so you should make all the first six states to be final states. You are accepting only '1's but it should also accept '0's......so attach 0 with all 1's.