Skip to main content

Questions tagged [recursive-algorithms]

Questions dealing with recursive algorithms. Their analysis often involves recurrence relations, which have their own tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
104 views

Motivation While I was looking at the method of sections to find the forces in the members of a truss in engineering mechanics, I had a question about the minimum amount of calculation required to ...
Arjun Ghosh's user avatar
1 vote
0 answers
36 views

Recently I realized that I've coded a custom-made function for recursive output error method which differs a bit from the traditional algorithm and would like to know the perception of my peers. ...
Jean-Fr's user avatar
  • 141
2 votes
0 answers
105 views

Let $B_n$ be the $n$-th Bernoulli number. $T(n,k)$ be an integer coefficients such that $T(n,k) = \nu_k$ where we start with vector $\nu$ of a fixed length $n$ with elements $\nu_1=1$, $\nu_i=0$ for $...
user avatar
6 votes
1 answer
234 views

Let $a(n)$ be A375540, i.e., an integer sequence such that $$ a(n) = 2^n n! [x^n] (1/2 - \exp(-x))^n. $$ Start with vector $\nu$ of fixed length $m$ with elements $\nu_i = 1$ (that is, $\nu = \{1,1,\...
user avatar
0 votes
0 answers
15 views

I think that I have a proof for the following claim, but I am looking both for a feedback and suggestions how to make it better, for example how to make it a top-down rather than a bottom-up type of ...
Wasradin's user avatar
  • 1,673
1 vote
0 answers
42 views

I was reading a paper on a certain reducibilities in Polynomial classes. And I stumbled across this definition: For sets $A,B$ computable in polynomial time, we write $A \leq^{\#} B$ via a polynomial $...
saddysaw's user avatar
  • 303
0 votes
1 answer
94 views

I have trouble understanding this proof for quicksort: The goal is to bound the overall number of comparisons performed by the algorithm. Consider an array $A$ with elements $z_1, z_2, ..., z_n$ with $...
DanxAG's user avatar
  • 3
0 votes
0 answers
133 views

I know that this has been posted at least once, but the accepted solution doesn't use the substitution method laid out in Introduction to Algorithms by Thomas Cormen. What I've tried so far is this: $...
jojusuar's user avatar
2 votes
0 answers
58 views

Imagine a function where you know how to get from $f(n)$ to $f(n-1)$ and from $f(2n)$ to $f(n)$. How many steps would it take to get to $f(1)$? I am not talking about the optimal route but rather if $...
Stefan Dempf's user avatar
0 votes
1 answer
175 views

For the code here, the analysis for the order-of-time complexity is as follows: For the purpose of finding the time-complexity of the above program; the program statements of concern are: ...
jiten's user avatar
  • 4,972
0 votes
1 answer
77 views

I'm currently facing the following problem: I want to write an algorithm that, given as input a list of points (representing a path/stroke/curve), and a target $distance$ it creates a new stroke that ...
Baffo rasta's user avatar
2 votes
2 answers
106 views

I have been researching decoding methods for Reed–Muller codes and am currently reviewing a recursive decoding approach proposed by Ilya Dumer in his paper “Recursive Decoding and Its Performance for ...
andres florian's user avatar
0 votes
1 answer
81 views

Suppose you have an expression like: $$ (a + b + c + d)(e + f + g)(h + i) $$ Is there a method to expand this expression that does not involve multiplying only two groups at a time? Some way to ...
silian-rail's user avatar
0 votes
1 answer
94 views

A similar question has been asked before but I haven't seen an answer to this specific one after looking for so long. I have a recursive function where: $P(2) = 1$ For $n ≥ 3$, $P(n) = (n-2)P(n-1) + ...
cpresto's user avatar
  • 69
0 votes
0 answers
61 views

I need your help with the following problem: I’m supposed to find a simple function $ g(n) $ for the recurrence relation $ T(n) = 9 \cdot T\left( \lceil \frac{n}{4} \rceil \right) + 3^n $ with the ...
alex1888's user avatar
0 votes
0 answers
87 views

I have a doubt concerning recursive system identification. I have seen that in many occasions we have a data set $u(t)=[u(1)\, u(2) \, \dots]$. When the first couple of data $y(t)$ and $u(t)$ arrives,...
Jean-Fr's user avatar
  • 141
0 votes
0 answers
21 views

I have two systems $$ A \vec{x} = f(\vec{x}, \vec{y}), \:\:\: A \vec{y} = g(\vec{x}, \vec{y}) $$ Both have same constant, square matrix $A$. I implemented an iterative algorithm with an initial value ...
Redsbefall's user avatar
  • 5,409
3 votes
2 answers
140 views

For the study of a termination speed of a recursive algorithm of mine, I would like to have more precise result on the following sequence: $$0< a_0 = a< 4 \qquad \text{and} \qquad a_{k+1} = \...
julio_es_sui_glace's user avatar
0 votes
0 answers
48 views

Hi I need help to prove the correctness of a recursive algorithm. It works like this, it takes an input array A with the size of the array being a power of 4. The algorithm is defined like this: sort(...
mindre gringo's user avatar
1 vote
1 answer
200 views

I am trying to understand how to find this formula, which seems straight forward, but I am missing something. In page 20 of this paper (or thesis): https://egrove.olemiss.edu/cgi/viewcontent.cgi?...
NotaChoice's user avatar
  • 1,112
0 votes
0 answers
45 views

Given the recurrence $$T(n) = (2k - 1)T(\frac{n}{k})+2^kn$$ I need to show (or disprove) that for every $\epsilon>0$ there exists a $k$ such that $T(n)=o(n^{1+\epsilon})$. So far, I've been able to ...
natitati's user avatar
  • 459
0 votes
1 answer
61 views

I have the following formula for a vector $v_n= \ ^t(a_n, b_n)\in \mathbb R^2$ : $v_n= Av_{n-1}+ Bv_{n-2}$ for two given matrices $A$ and $B$ in $M_2(\mathbb R)$, and we are given $v_1$ and $v_2$ of ...
NotaChoice's user avatar
  • 1,112
1 vote
0 answers
67 views

In my work I've come across the following problem. For $Y_k\sim\text{Binomial}(X_k,p)$ and $X_0=1$, compute the probability distribution for the following recursion, $$X_k=X_{k-1}+Y_{k-1}$$ This ...
Set's user avatar
  • 8,345
0 votes
1 answer
73 views

What would be the solution, expressed in big-O notation, to the recurrence equation $$T(x,y) = T(x-1,y) + T(x,y-1) + O(1)$$ with base case being either or both $$T(x,0) \text{ for any x}$$ $$T(0,y) \...
jam's user avatar
  • 137
0 votes
0 answers
73 views

Conjecture: For any given $\alpha\in\mathbb{R},$ Any given bijective continuous function $f:D \rightarrow \mathbb{R_{\ge\alpha}},$ And any given $\mu_\alpha:D\rightarrow \mathbb{R}$, where $D\subset\...
Mr. W's user avatar
  • 765
1 vote
1 answer
75 views

I recently stumbled on an algorithm while trying to write a program to estimate a median without sorting, a randomized group of non-repeating numbers with a known number of elements. Performance is ...
user1451865's user avatar
0 votes
1 answer
110 views

Given $p_{A}, p_{B}, p_{C}$ so that $p_{A}+ p_{B}+ p_{C}= 1$, and the transition matrix equation $\begin{bmatrix} a+ m & -b & -s\\ -a & b+ d & 0\\ -m & -d & s\\ \end{bmatrix}\...
Dang Dang's user avatar
  • 288
1 vote
2 answers
220 views

I came across the following problem: We would like to generate a prefix-free binary code with $n$ codewords, such that we pay $4$ units for each 1-bit and $1$ unit ...
squancy's user avatar
  • 53
1 vote
4 answers
238 views

Hy all I want to try to find the solution for the recurrence $a_n=a_{n-1}+3a_{n-3}$. If i take the equation associate to it, then i have $x^3-x^2+3=0$. But in this case, i have just one real root and ...
weymar andres's user avatar
0 votes
1 answer
157 views

Find the chromatic polynomial of the following graph. The graph in question is the one on top and I am doing deletion and contraction recursively as the picture shows. This is what I get and I have ...
Need_MathHelp's user avatar
2 votes
1 answer
92 views

I attempted this using an recursive idea. I noticed that as long as $1$ does not appear on the first position and it appears on the $k$-th position, then there are exactly $n$ choose $k$ number of ...
Rui Peng's user avatar
0 votes
0 answers
58 views

Could you please explain the solutions of the exercises? The definition of $\mu$- recursive finctions is clear to me, but I want to know the way of thinking to solve the exercises. Thank you.
soso sos's user avatar
  • 359
0 votes
1 answer
58 views

I was wondering if anyone could provide a proof that the following algorithm to merge $2$ sorted arrays into a combined sorted array works: \begin{array}{l} \texttt{function merge($x[1 \ldots k], y[1 \...
Princess Mia's user avatar
  • 3,152
0 votes
1 answer
80 views

In the matrix chain multiplication (MCM) problem each time we apply a decision of parentizing an expresion $e=(e_1)(e_2)$ we have two subproblems to solve but they are not overlapping. Indeed, solving ...
edamondo's user avatar
  • 1,813
2 votes
1 answer
563 views

I have been pondering the Collatz conjecture recently as a mental exercise, and have run into a problem that has to do with proving that an iteratively growing tree of odd positive integers will ...
Jookos's user avatar
  • 55
-2 votes
1 answer
82 views

So I have this specific problem that I couldn't figure out. I want to create a set $F_n$ containing all bitstrings that has 3 consecutive 1s, but not those that are already contained in all the ...
Juan's user avatar
  • 723
0 votes
1 answer
78 views

The most famous (and simplest non-trivial) recurrence is the Fibonacci recurrence $F(n)=F(n-1)+F(n-2)$ with $F(0)=0, F(1)=1$. What if we consider instead division based recurrences, the simplest non-...
D.R.'s user avatar
  • 11k
0 votes
1 answer
144 views

I have a question about the standard rules for computing p.r. terms (see below). It seems pretty clear that these rules could be used to define a p.r. operation that evaluates any p.r. term of the ...
nontology's user avatar
0 votes
1 answer
155 views

$\newcommand{\brstbasis}[2]{b^{#1}_{#2}}$ $\newcommand{\posintset}{\mathbb{Z}^{+}}$ $\newcommand{\intset}{\mathbb{Z}}$ $\newcommand{\realset}{\mathbb{R}}$ $\newcommand{\domain}[1]{\operatorname{dom}\...
Ziqi Fan's user avatar
  • 1,960
0 votes
0 answers
55 views

I have a toy electrostatics simulation that consists of some number of 2D point particles that each have a real-valued "charge" $q_i$, which then exert forces on each other proportional to $...
redroid's user avatar
  • 738
1 vote
1 answer
1k views

I've been playing a game similar to Bulls and Cows, but it goes like this: one player has to pick a random $4$ digit number. Digits can repeat, any digit between $0$ to $9$ and, you only get the ...
nex's user avatar
  • 13
0 votes
2 answers
47 views

I want to find a formula to find the lower limit part of this recursive or geometric series $$ x_{n} = \left( x_{n-1} + p \right) \times \left( 1 - \frac{t}{100} \right) $$ I was just wondering what ...
MrShoe's user avatar
  • 13
0 votes
4 answers
127 views

Prove that $x_{n+1} = \frac{1}{3}(2x_n + \frac{a}{x_n^2})$ is decreasing where $x_1$ $> 0$. I have been asked the above question and the working out given to me skipped some steps in between. It ...
Oofy2000's user avatar
  • 621
0 votes
1 answer
45 views

This is similar to a problem called forbidden sequence where you must find a recurrence relation for the number of ways of creating an n-length sequence using 0, 1, and 2 without the occurrence of the ...
sor3n's user avatar
  • 15
1 vote
1 answer
48 views

I have a question regarding the proof of Lemma 6.2. in this paper: https://www.cs.princeton.edu/courses/archive/fall03/cs528/handouts/scaling%20algorithm%20for%20the%20shortest.pdf. The simplified ...
Botanicus's user avatar
  • 112
2 votes
1 answer
129 views

This is a natural follow-up question of this previous question of mine. Let $x_0 = 3.$ Let $\ x_{n+1} = 3x_n\ $ if $\ \frac{x_n}{2}<1;\quad x_{n+1} = \frac{x_n}{2}\ $ if $\ \frac{x_n}{2}>1.\quad ...
Adam Rubinson's user avatar
3 votes
2 answers
345 views

Starting from a vertex of an unknown, finite, strongly connected directed graph, we want to 'get out' (reach the vertex of the labyrinth called 'end'). Each vertex has two exits (edge which goes from ...
user555076's user avatar
0 votes
0 answers
83 views

I recently came across a problem when trying to deal with a set of numbers with n elements. The problem is as follows: Starting with a set of n distinct elements, how would one generalize a unique ...
You Know Who's user avatar
0 votes
0 answers
61 views

Subset Product- Given $N$ and a list of positive divisors $S$, decide if there is a product combination equal to $N$ We will sort $S$ in numerical order from smallest to largest in order to find out ...
The T's user avatar
  • 191
7 votes
1 answer
244 views

I had posted an answer on the Code Golf SE yesterday. Although the answer on that site remain valid if no counterexample can be find. I'm interesting in its correctness. So I want to find a prove or ...
tsh's user avatar
  • 182

1
2 3 4 5
28