Homework Statement
I need to implement a recursive code for generating the Gray code for a given number of bits. For example, if the input bit is 1 it generates Gray code for 1 bit number i.e 0 and 1. Given 2, it generates Gray code for 2 bit numbers i.e 00 and 01 and so on. I don't...
Hi, everybody.
I really need your help with this question that giving me no sleep at nights. :( no loops and no pointers, and No STATIC can be used.
Write a recursive function that fills the given character
array with all possible given-size subsets of characters in
given word, separated by...
Hi there!
I wonder if there's an explicit solution to a recursion relation of the form
\alpha_{n+2} = A \alpha_{n+1} + B \alpha_n + C^n .
The solution of this recursion relation without C^n can easily be computed. I haven't found anything on the net.
Thanks!
where can i find a tutorial on binary tree recursion
i searched in google:
http://www.google.co.il/search?hl=iw&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=binary+tree+recursion&spell=1
and there is no tutorials for this kind of stuff
??
how to find a mathematical formula for this recursion??
i got this recursion
int b(int n,int count) {
int i;
count =a(n,count);
for(i=0;i<n;i++)
count =b(i,count);
return count;
b(0,0)=1
b(1,0)=3
b(1,1)=4
b(2,0)=8
the formula for function "a" is a(n,c)=2^n + c
what is...
i tried to trace this recurtion for small numbers
but i don't know how to write down
in an organized way
int a(int n,int count){
int i;
for(i=0;i<n;i++)
count =a(i,count);
return count+1;
}
a(0,0) is easy its 1
a(1,0) a little harder it returns 2
but when i get...
As this is concerning signal processing i guess this is the right place to post the question. I am Trying to learn how to use kalman filters. I've reached some form of verry basic understanding of the state-space model but I am still kindof confused. What I am trying to do now is to understand...
From J.J. Zakurai page no.222-225:
We know that Clebsch-Gordan coefficients vanish unless m=m1+m2. Then,
(1) why is that the terms in recursion relation doesn't vanish? since m1+m2=m+1 or m1+m2=m-1 in eqn.(3.7.49).
(2) why is again in the example shown in eqn.(3.7.54), m1+m2=m?
I...
This seemed to be the most appropriate forum for this.
I've been doing a bit of self-study of Kreyszig's Advance Engineering Mathematics (which I think is an excellent book). Doing out one of the problems (Chapter 5, 14 (d), pg 181 in the 9th International Edition) I've come across Bonnet's...
I just finished writing a little recursive function in C++ and when my stopping condition is reached, I need it to do nothing. So the if statement looks funny:
if (the condition is met)
{
//do nothing
}
else
{
call yourself with smaller arguments
}
It works fine, but I feel uneasy...
Can you write the recursion formula for this series?'
a (then little n) = 1/2^n
*the 2 is to the nth power, not the one
*for the first half, it is written a then a little n to the bottom right.
I don't understand how to even go about this. Any help would be great thanks.
Hi,
I am playing around with doing stuff recursively, just to practice, and I have a problem I can't work out. I want to write a recursive function that will sum the digits of a number, take the result, sum those digits, etc. until I reach a single digit number. Then I want to return that...
Hi, I'm trying to solve a differential equation and I'm supposed to obtain a recursion formula for the coefficients of the power series solution of the following equation:
w'' + (1/(1+z^2)) w = 0.
The term 1/(1+z^2) I recognize as a geometric series and can be expressed as sum of 0 to...
Look at this code :
27: unsigned int factorial(unsigned int a)
28: {
29: if (a == 1)
30: return 1;
31: else
32: {
33: a *= factorial(a-1);
34: return a;
35: }
36: }
The code evaluates fcatorial of "a". The only point I don't get is the return in line 30. When the function is called...
I know this is nothing new to most people here, but my question is really more about the notation than the mathematics. And since this question is really about notation, and it’s my first use of the LaTex equation formatter, I get to experiment with something new. That’s always fun.
But...
Okay, my first attempt at LaTex was terrible, and the post originally made in this space was undecipherable. I requestd this thread be deleted, and I'll be posting a proper (I hope) version in a separate thread.
Thanks for your patience.
Bob