Re-send:
The correct answer is
Sum of C(2n-i,n)*C(n,i) over 0<=i<=n
1: 3
2: 13
3: 63
4: 321
5: 1683
6: 8989
7: 48639
8: 265729
9: 1462563
10: 8097453
On May 8, 3:59 am, PopUp <[EMAIL PROTECTED]> wrote:
> Hi,
> Consider the chess as a two dimensional array. How will I find the
> number of ways i
I wrote the below code and tested with n =2 and n=3.
The idea is given a position (i,j) queen has three possibilities (i,j
+1),(i+1,,j+1) (i+1,,j) (Off Course not always since bounds needs to
be checked)
int numOfPath = 0;
int n = 3;
void FollowPath(int i,int j)
{
if (i >= n || j >=n)
{
Hi,
Can someone explain in terms of pseudocode and algorithm?
Thanks
On May 9, 11:43 am, "Phanisekhar B V" <[EMAIL PROTECTED]> wrote:
> Basically assume the three steps to be l (left), d (diagonal), u(up). U cant
> have down and right.
>
> Now assume its a 3X3 board.
> Then u have (a single d r
Basically assume the three steps to be l (left), d (diagonal), u(up). U cant
have down and right.
Now assume its a 3X3 board.
Then u have (a single d replaces one u and one l)
uuulll, uudll, uddl, ddd.
The total number of permutaions of all the above will give u the result.
The same impl
Sorry that not for queen
On 5/9/07, Phanisekhar B V <[EMAIL PROTECTED]> wrote:
>
> Oops, (2n)!/((n!)^2)
>
> On 5/9/07, Phanisekhar B V <[EMAIL PROTECTED]> wrote:
> >
> > (2n)!/(n!*2)
> >
> >
> > On 5/8/07, PopUp < [EMAIL PROTECTED] > wrote:
> > >
> > >
> > > Hi,
> > > Consider the chess as a two d
Oops, (2n)!/((n!)^2)
On 5/9/07, Phanisekhar B V <[EMAIL PROTECTED]> wrote:
>
> (2n)!/(n!*2)
>
>
> On 5/8/07, PopUp <[EMAIL PROTECTED] > wrote:
> >
> >
> > Hi,
> > Consider the chess as a two dimensional array. How will I find the
> > number of ways in which queen can reach (n,n) from (0,0). Only
>
(2n)!/(n!*2)
On 5/8/07, PopUp <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
> Consider the chess as a two dimensional array. How will I find the
> number of ways in which queen can reach (n,n) from (0,0). Only
> up,down,diagonal moves are allowed(obviously no back moves).
>
> PopUp
>
>
> >
>
--~--~--