Ask Your Question

Frank Zenter's profile - activity

2020-09-01 18:01:44 +0200 received badge  Notable Question (source)
2019-07-01 17:25:23 +0200 received badge  Enthusiast
2019-06-25 15:55:24 +0200 asked a question 3-d bezier-path made thick

I want to draw a $3$-dimensional bezier path with thickness=5 instead of the default value 2, using the code

[[(0,0,0),(1,0,0),(0,1,0),(0,1,1)]]}

curve = bezier3d(path, thickness=5, color='blue')}

recommended in the manual. It seems however, that the thickness does not change.

What do you suggest?

2018-06-06 23:40:18 +0200 received badge  Nice Question (source)
2018-06-06 20:46:18 +0200 received badge  Popular Question (source)
2018-06-06 16:12:15 +0200 asked a question More problems with general power of a matrix

Even though in version 8.2 the code for the general power of a matrix has been improved (c.f. question 41622), it still doesn't work in some cases, as i.e. this singular, diagonalizable matrix

A=matrix(QQbar,3,3,[[-2,-8,-12],[1,4,4],[0,0,1]])
k=var('k')
A**k

shows.

Concerning the remark in trac ticket 25520: Why not defining $0^x=1$ for $x\in {\bf N}$, which seems reasonable, since the number of functions $\emptyset \to \emptyset$ is 1?

2018-04-03 16:35:56 +0200 received badge  Nice Question (source)
2018-03-31 22:19:05 +0200 received badge  Organizer (source)
2018-03-31 21:56:45 +0200 received badge  Associate Editor (source)
2018-03-31 21:49:26 +0200 asked a question Combinatorial Species of Phylogenetic Trees

I would like to study the combinatorial class ${\cal H}$ of labelled phylogenetic trees, defined as rooted trees, whose internal nodes are unlabelled and are constrained to have outdegree $\geq 2$, while their leaves have labels attached to them.

According to Flajolet, Sedgewick: Analytic Combinatorics, p. 128, this class satisfies the recursive specification $${\cal H}={\cal Z}+\mbox{Set}_{\geq 2}({\cal H})$$ I defined their species $H$ by the code

Z=species.SingletonSpecies()

E2=species.SetSpecies(min=2)

G=CombinatorialSpecies()

H=CombinatorialSpecies()

G.define(E2(Z+G))

H=Z+G

The number of labelled structures is given by the integer sequence.

In particular I tried to calculate (for a small cardinal number)

  1. a list of such structures.
  2. a generating series of this structures.
  3. the number of such structures.
  4. isomorphism-types of such structures.
  5. a generating series of the isomorphism-types of such structures.
  6. a random such structure.
  7. automorphism-groups of of such structures.

using the following code:

1. H.structures([1,2,3]).list()
2. g = H.generating_series()
3. g.counts(3)
4. H.isotypes([1,2,3])
5. g=H.isotype_generating_series()
6. r=H.structures([1,2,3]).random_element()
7. r.automorphism_group()

Only 2. seems to work.

If my code ist correct, I wonder if some of these (i.e. composition species) are not implemented and when (whether) they will be.

2018-03-23 11:13:12 +0200 received badge  Scholar (source)
2018-03-23 11:13:08 +0200 received badge  Supporter (source)
2018-03-23 11:05:42 +0200 received badge  Student (source)
2018-03-22 22:43:07 +0200 edited question Bug in general power of a matrix

The code to question 35658 gives a wrong answer i.e. for the matrix

A=matrix([[4,1,2],[0,2,-4],[0,1,6]])

Where can I find an improvement?

For $k\in {\bf N}$ the $k$-th power of a matrix $A\in {\bf R}^{n\times n}$ satisfies by definition the recursion $A^{k+1}=A*A^k$ and the initial condition $A^0=I$. Substitution of $k=0$ and $k=1$ should therefore give the identity matrix $I$ resp. the matrix $A$. The following live code does (currently) not give the expected answer.

Btw: One of the M-programs gives the correct answer.