[algogeeks] Re: can you find this

2006-04-06 Thread Daniel Etzold
Hi, 1. multiply them as you would do on a paper with O(n^3) multplications 2. use Strassen (a recursive approach) with O(n^{2.81}) multiplications Regards, Daniel mahmoud kiki wrote: > I need two algorithms to multiplicat two matrix in C++ > and thank you so much > > -

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread Dhyanesh
Shishir , have a look at my example ... there is no repetition of points in it. Your formula wont work for it. -Dhyanesh On 4/6/06, shishir <[EMAIL PROTECTED]> wrote: > > Well the formula works only for the corner end points as starting and > ending node and that too on the diagonal ends. > Its

[algogeeks] can you find this

2006-04-06 Thread mahmoud kiki
I need two algorithms to multiplicat two matrix in C++ and thank you so much Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[algogeeks] Links on the Benefits of Vegetarianism

2006-04-06 Thread A. M. G. Solo
Watch Meet Your Meat from People for the Ethical Treatment of Animals (PETA): http://www.petatv.com/tvpopup/Prefs.asp?video=meet_your_meat 101 Reasons to be vegetarian: http://www.vivavegie.org/vv101/index.html Famous vegetarian athletes (list compiled by the International Vegetarian Union): ht

[algogeeks] Re: "Driving directions" algorithm

2006-04-06 Thread [EMAIL PROTECTED]
Also: no lookup tables or 2D arrays. I'm after a solution using lists and only lists. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegr

[algogeeks] Re: Problem

2006-04-06 Thread [EMAIL PROTECTED]
Hi, 0 < x < y < z < N-1 is the requirement. Lei --~--~-~--~~~---~--~~ 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 from this gro

[algogeeks] "Driving directions" algorithm

2006-04-06 Thread [EMAIL PROTECTED]
I'm looking for an algorithm which achieves the following: Given a directed, unweighted graph G and nodes g[i] and g[j] in G, find the shortest path from g[i] to g[j]. Use a single breadth-first traversal of G, marking visited nodes as you go. This is essentially a tree traversal problem. The t

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread shishir
Well the formula works only for the corner end points as starting and ending node and that too on the diagonal ends. Its not a general formula for any set of starting/ending nodes. @Dhyanesh I think the problem clearly states that the nodes can only be traversed once i.e. no repetition. --~--~-

[algogeeks] Re: Problem

2006-04-06 Thread wade
[EMAIL PROTECTED] wrote: > Is the solution always x = N-4, y = N-3, z = N-2 ? > > Suppose we are looking for x and y to minimize the sum. > Sum = a[i]*x + a[j]*y, where 0 <= i <= x < j <= y <= N. > It is always bigger than a[i]*x + a[j]*x, because x < y and all numbers > are positive. > We have t

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread Dhyanesh
This works only if you assume that you do not go backwards i.e. your max path length is N+M-2. If you can go backwards, then I think that there are more paths than just these. e.g. in 3x3 grid you can have path length more than 4 (1,1) -> (1,2) -> (2,2) -> (2,1) -> (3,1) -> (3,2) -> (3,3) I hav

[algogeeks] Interesting problem

2006-04-06 Thread Vijendra Singh
Check out the problem posted at this link. This was some contest problem posted some time back. Was just trying to solve this problem, but could not come up with an algo better than a brute force. Can you suggest something better? http://synapse.da-iict.org/events/algorythmus2.htmlThanks,-Vijendra

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread prashant bhargava
Can't understand man!!! can u explain and also does your formula take into account the position of starting and ending points or is it just about the corner points that u r talking abt -- Smile, it's the second best thing you can do with your lips...

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread shishir
There's a small error in my formula. The formula holds for a NxM grid (N horizontal and M vertical lines) where N= n+1 and M = m+1, which essentially boils down to C(N+M-2, N-1) = C(N+M-2,M-1). This should work fine. -Shishir --~--~-~--~~~---~--~~ You received t

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread prashant bhargava
missed the m*n in the last fnxn call in recursion area...PLZ CORRECT   No, it's definitely not going the right way..   i wonder if this can be done using that formula...   here's this algo i just thought.   Suppose u've got m horizontal lines and  n vertical and u give each of them a

[algogeeks] Re: Find the number of paths between two points on a grid

2006-04-06 Thread prashant bhargava
No, it's definitely not going the right way..   i wonder if this can be done using that formula...   here's this algo i just thought.   Suppose u've got m horizontal lines and  n vertical and u give each of them an index value. i.e. a 3x2 grid would be like...  ___!_(1)_! (2)__