sum is n.
e.g. The numeric partitions of 3 are: {(1,1,1), (1,2), 3}
2) For each partition generate its multiset permutations.
Note: there is a formula for how many of sums of positive integers to
n
there are but I don't what it is.
Regards,
Ralph Boland
--
You received this message
after
the data structure is constructed. For the record the O(log n) time
cost for a query is optimal. (Admittedly I never actually proved
this.)
Regards,
Ralph Boland
On Jan 31, 9:25 pm,RalphBolandrpbol...@gmail.com wrote:
On Jan 30, 11:00 pm, ritu ritugarg.c...@gmail.com wrote:
You
your algorithm is not.
Define optimal (reasonably) than then prove that my algorithm is
indeed
optimal or show that some other algorithm is better by your
definition.
Regards,
Ralph Boland
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
thought of this even though I knew you could make
quicksort be O(n log(n)) by using the the median as the pivot
point.
Of course I'm sure everyone realizes that one needs to stop the
recursion when all the elements in a subarray are the same.
Regards,
Ralph Boland
--
You received this message
On May 21, 7:17 am, Bharath bharath1...@gmail.com wrote:
Find the median of the values and move the lower values to left and higher
values to the right. This can be done in o(n). now do the same on both the
parts recursively. And the total complexity will be o(nlogk).
Further to my
is to build the tree bottom up.
Regards,
Ralph Boland
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr
performance.
For example a lower bound on the average case performance of quicksort
is omega(n)
and an upper bound on the average case performance is O(n * n).
Of course, if you are smart, you can prove that the average case
performance of
quicksort is theta(n * log(n)).
...
Regards,
Ralph
a version of it that builds a weighted binary tree.
I'll refrain from describing it here though because I suspect this is
someones homework. :-)
I will give this clue though. The tree is built bottom up, not top
down which is more difficult.
Regards,
Ralph Boland
--
You received this message
agree that this solves the problem
originally posted.
Regards,
Ralph Boland
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email
.
It is part of a larger data structure that I will implement
and release as open source in a few months.
Regards,
Ralph Boland
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com
This can be done without the parent pointer though the method
may not be wise. As you traverse the tree downward you set
the child pointer you traverse to point to the parent (grandparent
of the child). When you
traverse upward you reset the pointer of the node you traverse
to point to its
in the collection?
The standard solution to this problem is to use a Voronoi diagram.
I am only familiar with the Euclidean version but I see no problem
constructing a Voronoi diagram on the surface of a sphere.
Ralph Boland
--
You received this message because you are subscribed to the Google Groups
that is
already there (O(n) expected time to build the set).
Ralph Boland
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe
On Aug 16, 7:29 pm, Ralph Boland rpbol...@gmail.com wrote:
On Aug 14, 1:45 am, richa gupta richa.cs...@gmail.com wrote:
can we check the divisibility of a given number by 3 withoutusing
operators like '/' or '%'.
I want the efficient solution to this problem ..
can someone help
, or 15.
I believe divisibility by 13 can also be done but a different
algorithm is needed.
Ralph Boland
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
.
It will be released (in Squeak at least) under the MIT license.
Thanks for any help provided.
Ralph Boland
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
but it's not at all clear how to prove it.
My point in all this though is that the algorithm is simple enough
for a 15 year old interested in computational geometry to
implement.
Ralph Boland
2009/5/25 Ralph Boland rpbol...@gmail.com
On May 24, 5:05 am, Albert albert.xtheunkno...@gmail.com wrote
time.
If you are interested I can email you a copy of the paper.
Actually you can find it on line by searching for my name
or the Canadian Computational Geometry Conference.
If you have problems understanding the paper I can help.
Good luck whatever you decide.
Ralph Boland
values.
If closest pair has first value from first set of points and
second value from second pair of points then shorter arc
along circle joining points contains start point.
Ralph Boland
--~--~-~--~~~---~--~~
You received this message because you are subscribed
knowledge (or ideas) of applications of these algorithms
I would appreciate hearing about them.
Suggestions of other groups that would be interested in my algorithms
would also be appreciated.
I am willing to implement these algorithms; if someone would pay me to
do so of course.
Thanks
Ralph Boland
20 matches
Mail list logo