<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_acyclic_graph(self):
 """ Generates an acyclic graph for the given words. Adds the graph, and a list of edge-word associations to the object. """


        # Maximum length of each table, respectively.
        # Hardcoded n = cm, where c = 3
        # There might be a good way to choose an appropriate C,
        # but [1] suggests the average amount of iterations needed
        # to generate an acyclic graph is sqrt(3).
        self.n = 3 * len(self.words)

        max_tries = len(self.words) ** 2
        for trial in range(max_tries):
            try:
                self.generate_or_fail()
            except forest.InvariantError:
                continue
            else:
                # Generated successfully!
                self.trials_taken = trial + 1
                return

        raise RuntimeError("Could not generate graph in "
                           "{} tries".format(max_tries))