NFA -> DFA is done by mapping all subsets you can reach from any other subset, and keeping the map in order with the transitions (so if you can reach state 3 with an A followed by an epsilon transition from state 1, the transition from any set containing 1 to a set containing 3 HAS to have the transition A.
What you end up with is a DFA with the minimum amount of states needed to map the functionality of the NFA in question.
In your example it would be (assuming eps is an epsilon transition!) these groups you would have to map:
{1,2,4}, {2}, {4}, {3,6}, {5,6} and {6}.
Regular expressions are not suited for doing what you want, as you don't evaluate values with a regular expression.
You probably could do it, but it's certainly not a good idea.
If you just need a regex that only accepts {o,g} divisible by 2 or 3 you could construct a NFA and convert it to a GNFA.
You shouldn't do it based on the word length, but rather the number of o's or g's (and both) that can come before/after one another.
This post was edited by Klexmoo on Apr 7 2016 09:34am