Skip to main content

Questions tagged [trees]

For questions about tree graphs, or about tree data structures.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
M.R.'s user avatar
  • 31.8k
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 ...
Conor Cosnett's user avatar
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 ...
TheDoctor's user avatar
  • 2,918
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 ...
Red Banana's user avatar
  • 5,573
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 ...
Andreas Lauschke's user avatar
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 ...
Pragabhava's user avatar
  • 1,619
1 vote
0 answers
41 views

Why does SetOptions[Tree,ImageSize->Tiny] fail for Tree[]

It works for Plot but not for Tree ...
Tapiocaweasel's user avatar
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. ...
user5601's user avatar
  • 3,790
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 ...
ions me's user avatar
  • 1,095
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 ...
Arihant Parsoya's user avatar
0 votes
0 answers
42 views

FindSpanningTree not working properly on directed graph with negative weights

The code: ...
user3257842's user avatar
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 ...
Vojtevo's user avatar
  • 63
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?
Peter Burbery's user avatar