Message Boards Message Boards

Dependency Graph of formula collection

Posted 10 years ago
Hello,

I already look several times (basically using google) but never go successful.

Let’s say you have a huge collection of interdependent formulas, how can the dependencies of each equation be visualized in a network/graph fashion?
Is there a way to do this in mathematica, e.g. by having all the formulas functions etc. written in mathematica and then applying a function on it?

Kind regards,
Mathias
POSTED BY: Mathias Breuss
5 Replies
area[x_, y_] := x y

TotalArea[a1_, a2_] := a1 + a2

TotalArea[area[x1, y1], area[x1, y1]] // Hold // TreeForm


POSTED BY: Vitaliy Kaurov
An interesting and very broad question! I think you have found a PhD thesis topic  ;-)

I'd think you can go many ways with this, and Mathematica is ideal.  Here is a simple example that jumps to mind.  For a collection of formulae there are many ways to rewrite that formula.  For example if they are polynomials in a single variable they could be fully expanded and the coefficients could be focused on. Or they could be factored partially or completely, if possible over, say, the algebraic numbers.  Then these various forms, and the subexpressions contained in them could be organized to see what the commonalities are amongst the expressions.  Patern matching is ideal for this, though care needs to be taken to be sure that what appears as two visual patterns that look the same are the same in their InputForms.

So, the answer to your question is "yes."  The devil is in the details.  And it is not a one-liner.  But it's an interesting open-ended topic to explore....  and perhaps get tenure doing...
POSTED BY: David Reiss
Could you please elaborately discuss how such equations can be solved? Especially if the equations are stored in some notebook?
POSTED BY: ritu1909
Posted 10 years ago
Hey,

thanks for your interesting feedback.

I was thinking more about a less complex issue. In programming you have the possibility to create function graphs, e.g. in Visual Studio. These function graphs basically just tell you which function uses which function.

So lets say you have some equations in a mathematica notebook:
TotalArea = A1 + A2
A1 = a1 * b1
A2 = a2 * b2

then a graph might look like this:

TotalArea
  /  \
A1  A2

So it is nothing very scientific..

Of course there is a difference between notebook variables and equation and actual functions defined in mathematica.

I hope that clarifies what I am looking for emoticon

Kind regards,
Mathias
POSTED BY: Mathias Breuss
Posted 10 years ago
Hi Vitaliy,

Thank you. That looks about right. I am looking forward to try that out, still need to wait for some evaluation activiation keys.

I was wondering whether it is also possible to build a graph for a bunch of such functions (e.g. in a notepad document) which might be interedependant? This would be useful if you have a larger collection of functions.

Anyway, I will try it out asap.

Thanks for your help.
POSTED BY: Mathias Breuss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract