473,395 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

algorithm help

sj
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 |
Jul 22 '05 #1
2 989
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
right place to ask.
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
Jul 22 '05 #2
sj
JKop <NU**@NULL.NULL> wrote in message news:<%k*******************@news.indigo.ie>...
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.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jack Smith | last post by:
Hello, any help appreciated with following problem. I figured out the algorithm (I think), just having trouble proving it is optimal. Suppose we are given n tasks each of which takes 1 unit...
16
by: cody | last post by:
I have to write an algorithm with must ensure that objects are put in buckets (which are always 4 in size). The objects have two properties: A and B. It is not allowed that in a bucket are objects...
17
by: savesdeday | last post by:
In my beginnning computer science class we were asked to translate a simple interest problem. We are expected to write an algorithm that gets values for the starting account balance B, annual...
2
by: ben | last post by:
hello, i'm following an algorithm book and am stuck on an early excersise in it, not because of the c programming side of it or even the algorithm side of it, i don't think, but because of maths....
113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
6
by: Bernie Yaeger | last post by:
I need a little help with an algorithm. Let's say I have an array with 15 items. I want to find "Fern" where there are "Able", "Me Also", "Zimmerman", etc in no particular order. Forget about...
10
by: Nemok | last post by:
Hi, I am trying to write an additive encryption algorithm in C++ that will encrypt a text by adding a random numer to each character in a string. The code looks similar to this: for(int...
4
by: FBM | last post by:
Hi, I am working on a program that simulates one of the elements of ATM. The simulation stores events which occurs every some milliseconds for a certain amount of time. Every time that an event...
6
by: StephQ | last post by:
I need to implement an algorithm that takes as input a container and write some output in another container. The containers involved are usually vectors, but I would like not to rule out the...
1
by: almurph | last post by:
Hi everyone, Concerning the Needleman-Wunsch algorithm (cf. http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm) I have noticed a possible loop. Inside the algorithm there is an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.