A method and an apparatus for determining variable dependency are
disclosed. In the present invention, a variable dependency is determined
in advance arbitrarily; partial variables are selected from the current
variable dependency, and a legitimate superior variable set is
re-selected for each of the partial variables, and the new variable
dependency is stored only if it meets the criterion of acceptance; when
the termination criterion for establishing variable dependency is met,
the optimal variable dependency is determined from all variable
dependencies. Because the existing variable dependency is not taken as a
reference when the new variable dependency is created, the new variable
dependency is not misled by the existing variable dependency, and the
time for finding the globally optimal variable dependency can be
shortened.