Skip to main content

All Questions

Tagged with
1 vote
1 answer
122 views

Recursive relationship too slow

Writing: ...
πρόσεχε's user avatar
1 vote
2 answers
97 views

Mistake in recursive algorithm

I am new to Wolfram, and I am trying to make a recursive Archimedes algorithm in Wolfram. I read documentation and I tried to run this code ...
Хранитель Рощи's user avatar
1 vote
0 answers
322 views

Solving a rod cutting problem with recursion

I'm trying to use Mathematica 10.0. to solve a rod cutting problem with naive recursion. The problem is taken from Introduction to Algorithm, 3rd edition. The length price for rod is defined in the ...
nwdsl's user avatar
  • 111
3 votes
0 answers
145 views

Converting a Recursive algorithm to Iterative?

I have a recursive algorithm and I want to make it iterative I found this command RecurrenceTable[eqns, expr, {n, n_max]}] but I don't know how I make my recurrence relation because there is ...
OAMAZF's user avatar
  • 105
5 votes
1 answer
331 views

Find random $n$ combinations of values with a given sum

This problem is described in the related StackOverflow question: Find all combinations of coins when given some dollar value. I would like generate a list of $n$ combinations of values that sum up to ...
shrx's user avatar
  • 7,827
13 votes
5 answers
7k views

How to deal with recursion formula in Mathematica?

In engineering problems, I am always seeing many recursion formula. For instance, In the book "The NURBS book", I discovered many recursion formula Fibonacci $$f(...
xyz's user avatar
  • 635
3 votes
2 answers
1k views

A problem about recursion formula of de Casteljau algorithm

I use Mathematica to implement the de Casteljau algorithm $$\vec{P}_{k,i}(u_0)=(1-u_0)\vec{P}_{k-1,i}(u_0)+u_0\vec{P}_{k-1,i+1}(u_0)$$ The graphics that de Casteljau algorithm generated as follows: ...
xyz's user avatar
  • 635
3 votes
0 answers
954 views

Solving recursion relations using Mathematica

I want to solve the recursion relation given in equation 2.7(a/b) on page $6$ of this paper. (..the initial seed is $F_1 = G_1 = 1$ and the functions $\alpha$ and $\beta$ are defined on page $5$ in ...
user6818's user avatar
  • 1,191
16 votes
1 answer
2k views

Efficient backtracking with Mathematica

Backtracking is a general algorithm for finding all (or some) solutions to some computational problem, that incrementally builds candidates to the solutions, and abandons each partial candidate c ("...
a06e's user avatar
  • 11.4k
30 votes
7 answers
1k views

Alternative ways to implement a triangular recursion

Triangular recursions are a class of algorithms that frequently turn up in computational mathematics. These recursions are expressible in the general form $$T_k^{(n)}=f(T_{k-1}^{(n)},T_{k-1}^{(n+1)})$...
J. M.'s missing motivation's user avatar