# algorithm help

Discussion in 'C++' started by sj, Oct 28, 2004.

1. ### sjGuest

Hi;

I am writing a c++ code to transform matrix, (a) to (b) using
divide-and-conquer method in four recurrence. I am having difficulty
to merge four submatrices to get the answer. could someone give me a
source code or explain to me how to do it. I am sorry if this is not a

Thanks
ks

(a)

| 1 1 2 2 |
| 1 1 2 2 |
| 3 3 3 3 | transform to
| 3 3 3 3 |

(b)

| 1 1 2 2 |
| 1 1 0 2 |
| 3 0 0 3 |
| 3 3 3 3 |

sj, Oct 28, 2004

2. ### Victor BazarovGuest

sj wrote:
> I am writing a c++ code to transform matrix, (a) to (b) using
> divide-and-conquer method in four recurrence. I am having difficulty
> to merge four submatrices to get the answer. could someone give me a
> source code or explain to me how to do it. I am sorry if this is not a

We can't give you the source code. But we can help you correct errors
in your own code. You are saying you have difficulty merging those
submatrices; post your code, we can definitely look at it and recommend
something.

> [...]

V

Victor Bazarov, Oct 28, 2004

3. ### JKopGuest

sj posted:

> Hi;
>
> I am writing a c++ code to transform matrix, (a) to (b) using
> divide-and-conquer method in four recurrence. I am having difficulty
> to merge four submatrices to get the answer. could someone give me a
> source code or explain to me how to do it. I am sorry if this is not a
>
> Thanks
> ks
>
> (a)
>
> | 1 1 2 2 |
> | 1 1 2 2 |
> | 3 3 3 3 | transform to 3 3 3 3 |
>
> (b)
>
> | 1 1 2 2 |
> | 1 1 0 2 |
> | 3 0 0 3 |
> | 3 3 3 3 |

You're neither offering:

A) Money

B) The opportunity to teach or mentor

If you'd like to opt for option B, I'd suggest posting an attempt at it.

-JKop

JKop, Oct 29, 2004
4. ### sjGuest

JKop <> wrote in message news:<%kngd.40345\$>...
> sj posted:
>
> > Hi;
> >
> > I am writing a c++ code to transform matrix, (a) to (b) using
> > divide-and-conquer method in four recurrence. I am having difficulty
> > to merge four submatrices to get the answer. could someone give me a
> > source code or explain to me how to do it. I am sorry if this is not a
> > right place to ask.
> >
> > Thanks
> > ks
> >
> > (a)
> >
> > | 1 1 2 2 |
> > | 1 1 2 2 |
> > | 3 3 3 3 | transform to 3 3 3 3 |
> >
> > (b)
> >
> > | 1 1 2 2 |
> > | 1 1 0 2 |
> > | 3 0 0 3 |
> > | 3 3 3 3 |

>
>
> You're neither offering:
>
> A) Money
>
> B) The opportunity to teach or mentor
>
>
> If you'd like to opt for option B, I'd suggest posting an attempt at it.
>
>
> -

No money to offer for this. Money is not everything. I am curious to
learn this. Many thanks go to the ones who teach me this.

sj, Oct 30, 2004