All Questions
Tagged with recursion procedural-programming
10
questions
1
vote
2
answers
118
views
RecurrenceTable vs For loop : they do not give the same results. Why?
I have a second-order recurrence equation that I want to plot.
I've used two different methods.
The first uses RecurrenceTable, the second uses a traditional ...
5
votes
2
answers
177
views
How to implement If criteria for the NestList-Function
I have a function which bisects a list in two parts recursively. Unfortunately I have to select a number of iterations for the NesList-function which is just an ...
0
votes
3
answers
596
views
Python recursive bisection algorithm to Mathematica
I've been sitting on this problem for a while and i am kind of stuck. I am pretty new to Mathematica and have been trying to implement a recusive Algorithm, which splits/bisects a list of items in ...
0
votes
1
answer
119
views
Use of ParallelDo with an iterative or recursive calculation
Is it possible to use ParallelDo (or any similar parallelization method) to speed up the calculation of an iterative calculation, which takes a previous calculation ...
2
votes
3
answers
241
views
Re-writing code chunk using While loop
I can't seem to wrap my head around the syntax for how to rewrite this chunk of code I have using a while loop, and would appreciate some help. I'm going through a list and am grouping the values into ...
3
votes
1
answer
94
views
Looping routine to evaluate a recursively defined function
I'd like to do a calculation which is basically a looping routine to evaluate a recursively defined function. For example:
...
1
vote
1
answer
329
views
Why are there local variable conflicts in my recursive function definition?
Sorry to post a long piece of code. There are two places in here where I Print[] 'path2' when the count == 984, because for some reason, that list is getting ...
0
votes
1
answer
158
views
successive iteration
I hope you can help with a problem I am having. I want to solve this equation
$$\left( n^2 \Theta^2 + 2\alpha n\Theta -1\right)R_n = \frac{1}{R_0^2}\left( 2 \sum_{m=1}^\infty R_{n+m}R_m + \sum_{m=1}^...
0
votes
1
answer
439
views
Recursion limit reached in a list of recursive functions
Here is a fragment of the code I was working on the other day, that is constructed from a recursive function with Memorization, whose input is prepared in a For loop and then modified as a boundary ...
14
votes
3
answers
700
views
Mimic a procedural, recursive clustering algorithm for site percolation using functional programming
Sorry in advance for my logorrhea: I just want to make sure all of the information is here.
Context and Question
I am investigating site percolation on a square lattice. I have a working, depth-...