Function Repository Resource:

WolframModelRuleForm

Source Notebook

Represent a Wolfram model in x, y, … letter form

Contributed by: Stephen Wolfram

ResourceFunction["WolframModelRuleForm"][rule]

converts a Wolfram model specification to x, y, … letter form.

Details and Options

A heuristic is used to label the nodes canonically.
If the rule contains numbers greater than 50, the representation is kept in a numeric form.

Examples

Basic Examples (1) 

Some Wolfram models represented in rule form:

In[1]:=
ResourceFunction[
 "WolframModelRuleForm"][{{1, 2}, {1, 3}, {1, 4}} -> {{2, 4}, {3, 4}, {3, 2}}]
Out[1]=
In[2]:=
ResourceFunction[
 "WolframModelRuleForm"][{{1, 2, 8}, {1, 3}, {1, 4}} -> {{2, 4}, {3, 4}, {3, 2}}]
Out[2]=

Scope (2) 

Greek letters are used when the numbers in the rule are more than 26:

In[3]:=
ResourceFunction[
 "WolframModelRuleForm"][{{32, 18}, {32, 18}, {31, 10}} -> {{35, 23}, {36, 4}, {26, 2}, {29, 22}, {17, 11}}]
Out[3]=

When the numbers in the rule exceed 50, the rule is kept in numeric form:

In[4]:=
ResourceFunction[
 "WolframModelRuleForm"][{{9, 17}, {22, 42}, {33, 26}, {42, 21}, {26, 46}} -> {{11, 6}, {21, 44}, {6, 6}, {35, 22}, {48, 51}, {18, 13}, {25, 14}, {36, 44}, {41, 40}}]
Out[4]=

Version History

  • 2.0.0 – 24 March 2020
  • 1.0.0 – 16 March 2020

Related Resources

License Information