473,386 Members | 1,758 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,386 software developers and data experts.

divide and conquer

Hello,

I am working on the following problem. I need a divide and conquer
algorithm to solve the following problem. Any help is appreciated.

I have a set of coordinates (x,y) and each coordinate has an ID and
load factor. The load factor is a count of all the coordinates that
are northeast of a point (x,y) (i.e. all points (x_i,y_i) such that
x_i>=x and y_i>=y). Does anyone know a divide and conquer algorithm i
can use to compute the load factors for the set of coordinates?

Example:
If the user input the following coordinates, the program needs to
output the listed loadfactors:

ID coordinate load factor
12 (3,3) 1
10 (4,2) 1
13 (5,6) 0
7 (2,1) 3
Jul 17 '05 #1
4 5944
Jack Smith wrote:

< Jack's homework removed>


Jack, sooner or later you're going to have to try and do some of your
homework on your own. Your questions are all very interesting, but it is
not considered good form to post such questions on usenet, and if you do
insist on posting them then perhaps you should be more upfront and
honest about it.
Jul 17 '05 #2
And you should show that you have done some work yourself.
"Steve" <st***********@hotmail.com> wrote in message
news:3f***********************@lovejoy.zen.co.uk.. .
Jack Smith wrote:

< Jack's homework removed>


Jack, sooner or later you're going to have to try and do some of your
homework on your own. Your questions are all very interesting, but it is
not considered good form to post such questions on usenet, and if you do
insist on posting them then perhaps you should be more upfront and
honest about it.

Jul 17 '05 #3
st*******@yahoo.com (Jack Smith) wrote in message news:<20**************************@posting.google. com>...
Hello,

I am working on the following problem. I need a divide and conquer
algorithm to solve the following problem. Any help is appreciated.

I have a set of coordinates (x,y) and each coordinate has an ID and
load factor. The load factor is a count of all the coordinates that
are northeast of a point (x,y) (i.e. all points (x_i,y_i) such that
x_i>=x and y_i>=y). Does anyone know a divide and conquer algorithm i
can use to compute the load factors for the set of coordinates?

Example:
If the user input the following coordinates, the program needs to
output the listed loadfactors:

ID coordinate load factor
12 (3,3) 1
10 (4,2) 1
13 (5,6) 0
7 (2,1) 3


Okay,i will give you some not-direct hints:
please foget(!) about "divide and conquer" and "ID",
and try to find solution yourself.Maybe you will find D&C,maybe not .

It's take 2 or 5 minutes for me to find solution(algo)(heh,for some
money($100...) i will tell you how ;-).

I personally HATE tendency to name things
"find divide and conquer algorithm" instead of
"not slower than o(n*log n)".
Because
1: divide and conquer may work as o(n^m * log n) where m may be >2
("hint" 2 ;-)

2: while not proved that o(n*log n) is a fastest,faster is
"possible"(but here it's proved).
Dmytry Lavrov.

--
solutions:
http://DmytryLavrov.narod.ru
Jul 17 '05 #4
st*******@yahoo.com (Jack Smith) wrote in message news:<20**************************@posting.google. com>...
Hello,

I am working on the following problem. I need a divide and conquer
algorithm to solve the following problem. Any help is appreciated.

I have a set of coordinates (x,y) and each coordinate has an ID and
load factor. The load factor is a count of all the coordinates that
are northeast of a point (x,y) (i.e. all points (x_i,y_i) such that
x_i>=x and y_i>=y). Does anyone know a divide and conquer algorithm i
can use to compute the load factors for the set of coordinates?

Example:
If the user input the following coordinates, the program needs to
output the listed loadfactors:

ID coordinate load factor
12 (3,3) 1
10 (4,2) 1
13 (5,6) 0
7 (2,1) 3

oops,
after another 2 minutes (of waiting while photoshop loads) i found
another,elegant and simplest possible solution.
free hint:
you should completly foget about D&C,to find this divide and conquer
solution!

solution cost:
200$

my email here:
http://dmytrylavrov.narod.ru
Jul 17 '05 #5

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

Similar topics

6
by: Nobody | last post by:
I have some code that I am trying to optimize for speed... trying to squeeze every last CPU cycle out... I remembered an old trick where dividing & multiplying can be sped up by using bitshifts...
5
by: per.nordlow | last post by:
Hey there! I want to multiply/divide (shift) a float with variable containing a power-of-two value: 2, 4, 8, 16, .... Is there such a function in the C standard library or the glibc library...
1
by: urvi | last post by:
Hi... following is a problem i need to solve using divide and conquer method(recursive)..can anybody help me..? You are to organize a tournament involving n teams. Each team must play each...
4
by: shuisheng | last post by:
Dear all, Assume I have two big arrays A and B. And I want to element-wise divide A by B. When an element of B is zero, the results are also zero. Such as A = { 2, 4, 0, 6} B = { 1, 0, 0, 2}...
40
by: Spiros Bousbouras | last post by:
Do you have an example of an implementation where sizeof(short int) does not divide sizeof(int) or sizeof(int) does not divide sizeof(long int) or sizeof(long int) does not divide sizeof(long long...
1
by: Justin.Velazquez | last post by:
Hello everyone, I'm not really new to programming but my bitwise skills definately need work. I came across a problem I've been trying to figure out for fun. I'm trying to write a routine...
1
by: nadine | last post by:
I need some help writing an algorithm (pseudocode is fine too) for a divide-and-conquer technique for determining the position of the max element in an unsorted array. Any help would be appreciated
12
by: rajm2019 | last post by:
Without using /,% and * operators. write a function to divide a number by 3. itoa() function is available
5
by: seemanikam | last post by:
Can anyone suggest me how to devise an efficient divide-and-conquer algorithm for the Tower-of-Hanoi problem when the disks are colored alternately red and blue, and with the extra rule that no disk...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.