Tag Info

New answers tagged

0

code examples for n x n triangularMatrix Clear@"`*" upperTriangularMatrix[n_][f_] := SparseArray[{i_, j_} /; i <= j -> f[i, j], {n, n}] lowerTriangularMatrix[n_][f_] := SparseArray[{i_, j_} /; i >= j -> f[i, j], {n, n}] (* examples *) upperTriangularMatrix[10][1 &] // MatrixForm lowerTriangularMatrix[10][1 &] // MatrixForm ...


1

Bill s already gave an answer as a comment. An explicit proof of the conjecture can be obtained by noting that $$(A^3)_{il}=A_{ij}A_{jk}A_{kl}=\sum_{j=1}^N\sum_{k=1}^N\text{Boole}[i\leq j]\text{Boole}[j\leq k]\text{Boole}[k\leq l]\\ =\sum_{j=1}^N\text{Boole}[i\leq j]\sum_{k=1}^N\text{Boole}[j\leq k]\text{Boole}[k\leq l]\\ =\sum_{j=1}^N\text{Boole}[i\leq ...


0

The following function splits m=Binomial[n,k] into one or two parts whose product is m. The parts satisfy the conditions you specified, to the best of my understanding. UVfactors[n_, k_] := With[{f = FactorInteger[Binomial[n, k]]}, Print[Binomial[n, k]]; Print[f]; Apply[Times, Map[#[[All,1]]^#[[All,2]]&, SplitBy[f, ...


3

@asad the comments are all appropriate and (if I understand your aim), I present a way to implement to perhaps kickstart your own approach. However, I suggest in future you post an attempt, however imperfect. Further, it is helpful to post a small example so people can be clear about what you mean. Finally, if I misunderstand your aim then comment, otherwise ...



Top 50 recent answers are included