Questions tagged [trees]
For questions about tree graphs, or about tree data structures.
13 questions with no upvoted or accepted answers
8
votes
0
answers
260
views
Improving label collisions for Tree/Graph?
Historically, MMA has never handled label collisions well, but recently they added some improvements here via things like Callout. I want to fix ImageSize but still ...
4
votes
0
answers
3k
views
Semantic tableaux generator
I would like to use Mathematica to automatically generate a semantic tableaux (truth tree) from a formula in propositional logic).
Here is an example formula:
$$(a \lor\lnot b )\land b$$
Here is ...
4
votes
0
answers
282
views
Tree graph showing the orbits under the Collatz map?
ReverseCollatzPaths is a nice demonstration of a radial tree graph showing the orbits under the Collatz map. However, Jason Davies gives, I think, a nicer visulalization using Python, with a ...
3
votes
0
answers
146
views
How to "program in binary trees" with Mathematica?
I want to do the following:
f[x_] := If[OddQ[x[[1]]], Nothing, x/2 // Simplify]
A = Table[2 (n + k), {k, 0, 4}]/2
n = 2 n1;
f /@ A
n = 2 n1 + 1;
f /@ A
This ...
2
votes
0
answers
94
views
Make Tree output wider?
I use Tree and what I have in the nodes is somewhat larger output (horizontally). That means the nodes are displayed with a lot of overlap. Is there a way to make the "outgoing" edges to the ...
2
votes
0
answers
164
views
Visualizing site map using a Tree
I've been trying to visualize a sitemap for analysis purposes. So far, using Leonid Shifrin's makeTreeRojo function, I've been able to build a somehow decent visualization.
First, I fetch and format ...
1
vote
0
answers
41
views
Why does SetOptions[Tree,ImageSize->Tiny] fail for Tree[]
It works for Plot but not for Tree
...
1
vote
0
answers
30
views
TreePosition with multiple (not just node data) conditions
Given a Tree object, TreePosition takes patterns only on the "data" of the node plus a level spec.
...
1
vote
0
answers
76
views
How to find all the tree leaves of an expression?
I'd like to better understand what mathematica is doing during simplification, so I tried expression //TreeForm //TreeLeaves to see what it's picking up on.
Except ...
1
vote
0
answers
149
views
How does pattern matching in expression work?
I have been trying to understand how mathematica does pattern matching:
{Sin[x] + 1} /. Sin -> Cos
returns
Cos[x] + 1
...
0
votes
0
answers
42
views
0
votes
0
answers
178
views
Is a tree structure possible in Mathematica?
Let's say I have a vector,
vector={1,2,3,4,5,6,7};
and I want to use its items as leaf nodes in a tree datasctructure, then work with them as such, adding new ...
0
votes
1
answer
69
views
How to find all functions that accept level specifications as an argument?
How can I find a list of every function that takes a level specification as an argument?