1
Terminator
·2009-02-28 22:57:20
Philip all the best da for tommorow....[1][1][1][1][1]....have u got any tension for the chemistry exam??......
3
iitimcomin
·2009-03-02 04:04:35
I THINK KUMAR DESERVES A PINK .... CUZ HE WAS THE FIRST 1 TO ANS. IT CORRECTLY!!!!
21
tapanmast Vora
·2009-03-01 06:55:18
bahut zyada GUSSA aata hain tumhe mere dost!!!
CapitoLs or NO capitols dusnt make a diff 2 me!!!
BUT YA ur pt. regardin p and q is taken.... u hav got a point ther....
p,q shudnt be equal!!!
but ya how do u prove that this assumption can b safely made??
1
Philip Calvert
·2009-03-01 06:13:06
very strange kind of person you are tapan.........
jus see again have you put the value of f(x) correctly
and anyways
f(n) = 2f(n-1) + 1
==>
f(n) = 2^n - 1
so p and q can't be same anyway and plz dont use capitals everywhere.......
21
tapanmast Vora
·2009-03-01 05:46:20
NO PHILIP!!!!
THOSE P's CAN VERY MUCH BE THE SAME.... RATHER IT WUD B A CASE OF ADJUSTIN IF U TAKE P AND Q DIFF. WHICH IS IS WRONG...........
f(n) = 3*f(n-1) + p;
f(x) = 3^x + p;
3^3 + p = 3*3^2 + p;
THE ABOVE EXPRESSION WUD NOT HOLD IF P AND Q WER DIFF!!! [12]
HOPE U GOT MY POINT!!!
1
Philip Calvert
·2009-03-01 05:32:20
tapan first of all be careful abt wat you are posting....
if f(n) = k*f(n-1) + p;
f(x) = k^x + p ???????
those "Ps" have to be diffnt...
if f(n) = k*f(n-1) + p;
then f(x) = k^x + q (assume)
so we have..
k^x + q = k(k^(x-1) +q) + p
so
k^x + q = k^x + kq+p
so kq + p = q..... knowing k and p we get q [1]
this is looking tidy....and can be done !![1][1] (unless k =1 which is a much easier case )
21
tapanmast Vora
·2009-03-01 03:07:15
akand :
DUDE, c properly,
my statement says :
f(n) = k*f(n-1) + p;
f(x) = k^x + p
which wud imply if ur k=3;
f(x) = 3^x + p;
3^3 + p = 3*3^2 + p;
I guess u hav misinterpreted my statement!!!
1
Akand
·2009-03-01 01:44:55
Bhaiyya plzzz dont complete it..........dont answer plzzzz.I dont want d world 2 end....
I WANNA LIVE......waaaaahhh atleast till April 12th.....
1
Akand
·2009-03-01 01:15:45
well tapan i dont think so............coz lets take an example.....
let f(x)=x2 and let n=2 , k=3 and p=1....just imagine..
so f(n)=f(2)=4=k(f(n-1) +p
=kx1+p
= 3+1=4
but kn+p=k2+p=9+1=10 which is not 4........
hope this helps
21
tapanmast Vora
·2009-02-28 23:09:41
GENERAL DOUBT :
WENEVER WE GET SUMTHING LIKE THIS :
f(n) = k*f(n-1) + p;
f(n) = k^n + p ??????? [7]
can we assume this or cud it b disastrous at times?
1
Philip Calvert
·2009-02-28 23:01:45
ok i'll give something else.......
to move n discs from source to dest......
move n-1(from top) to intermediate ....
then move the nth one to the dest........
and finally top that one with the n-1 discs from intermediate to dest..
that is what i and kumar have done.........
1
Terminator
·2009-02-28 22:59:48
Philip all the best da for tommorow....[1][1][1][1][1]....have u got any tension for the chemistry exam??......
1
Philip Calvert
·2009-02-28 22:58:57
now i see Kumar has already done that...bhaiyya isn't that correct.
2n-1
1
chemistry organic
·2009-02-28 22:57:41
first we need to break it into two parts......one part will b the base and rest is other part..
.....then recursing in this way gives ultimately the pair with only 2 discs which is esy to solve.......hope this is useful
1
Philip Calvert
·2009-02-28 22:56:52
btw a better question would be when one more peg is added ...
after all i havent as yet been able to that one...!!
1
Philip Calvert
·2009-02-28 22:55:52
let f(n) give the no. of moves reqd to shift n discs from the source peg to destination peg.....
then f(1) = 1
f(n) = f(n-1) + 1 + f(n-1)
or f(n) = 2f(n-1) + 1
this should be it...
now i think someone else who is not struggling with his boards like me has to take it from here....
sorry if the question is not what i think it is bcoz i haven't gone thru the whole of what bhaiyya has written i only saw"towers of hanoi and started typing [1]
21
tapanmast Vora
·2009-02-28 21:34:44
Sir, I had don this as my std 10 project!!!
the formula for total moves was sumthing like 2^n blah blah... dont remember exactly!!!1
But ya I dont know how 2 provwe dat formula apart frm observation!!!
Do u expect us 2 work out the proof.... then i'll giv it a shot
62
Lokesh Verma
·2009-02-28 21:24:53
hey no one proved this yet... why!!?
It is not as tough as it looks ;)
33
Abhishek Priyam
·2008-10-24 05:34:08
A c++ source code:
it shows stack status after every move...........
http://sites.google.com/site/priyamspage/Home/files
1
Kumar Saurabh
·2008-10-24 02:10:46
I think it is like this
T(n) = T(n-1) +1 + T(n-1)
T(n) = 1 + 2.T(n-1)
Now T(1) = 1 = 2-1
So T(2) = 2 + 1 = 4 -1
T(3) = 6 + 1 = 8 - 1
.......
.......
......
62
Lokesh Verma
·2008-10-23 01:38:07
yes this is the same thing.. it is called both The tower of Hanoi and the Tower of Brahma.. And even I did it in C++ :D
1
skygirl
·2008-10-21 19:50:55
@nishant,
hey this is sumthing i studied once in C++... with sum other name... sumthing like tower of hanoi or sumthing like that... (!)
62
Lokesh Verma
·2008-10-21 12:22:21
now, with the changes above?
62
Lokesh Verma
·2008-10-19 00:09:19
The Image as a an example in 4 disc case!

1
arjita
·2008-10-18 00:06:23
i m not able to understand the second condition of moving disk