Kleene\'s algorithm can be used to compute the regular expression from a NFA, whose complexity is O(n^3). The following screenshot is from Handbook of Graph Theory.
I