Re: [algogeeks] help to give DP solution

2012-09-17 Thread Tushar
www.ams.jhu.edu/~castello/362/Handouts/*hungarian*.pdf
This PDF  might be helpful


On Sunday, 16 September 2012 16:42:25 UTC+5:30, Rahul Kumar Patle wrote:

 @atul: in Hungarian Algorithms works for minimization of cost where the 
 terminating condition is based on zeros.. in my problem what value i will 
 have to consider as base/terminating values because there may not be same 
 values in coloumn and rows..
 second thing you use subtraction there, here will i have to use 
 addition..??
 please clarify..
 i have seen following link:
 http://s-mat-pcs.oulu.fi/~mpa/matreng/eem1_2-1.htm
 if you have link which explains maximization problem..
 please post here..

 On Sun, Sep 16, 2012 at 12:44 AM, atul anand atul.8...@gmail.comjavascript:
  wrote:

 correct me if i am wrong ,
 it seems similar to Hungarian algorithm.
 here each column can be considered as persons P(p0,p1,p2,..pn) and each 
 as cost of job say X(x0,x1,x2,x3,x4xn).
  Hungarian algorithm tells how to find minimal but here its maximal...so 
 i guess changes in the algo will give the outputl

 On Sat, Sep 15, 2012 at 9:10 PM, Rahul Kumar Patle 
 patlera...@gmail.comjavascript:
  wrote:

 A 2D array of order A[N][N] is given, considering entry A[i][i] as 
 invalid you have to select one element from each row such that
 1. Selected elements does not belong to same column.
 2. Sum of selected element has maximal.


 -- 
 Thanks and Regards:
 Rahul Kumar 
 Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro
 M.Tech, School of Information Technology
 Indian Institute of Technology, Kharagpur-721302, 
 Indiahttp://www.iitkgp.ac.in/
 Mobile No: +91-8798049298, +91-9424738542
 Alternate Email: rahulku...@hotmail.com javascript:

  -- 
 You received this message because you are subscribed to the Google 
 Groups Algorithm Geeks group.
 To post to this group, send email to algo...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 algogeeks+...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.


  -- 
 You received this message because you are subscribed to the Google Groups 
 Algorithm Geeks group.
 To post to this group, send email to algo...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 algogeeks+...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/algogeeks?hl=en.




 -- 
 Thanks and Regards:
 Rahul Kumar 
 Patlehttp://www.linkedin.com/profile/view?id=106245716trk=tab_pro
 M.Tech, School of Information Technology
 Indian Institute of Technology, Kharagpur-721302, 
 Indiahttp://www.iitkgp.ac.in/
 Mobile No: +91-8798049298, +91-9424738542
 Alternate Email: rahulku...@hotmail.com javascript:



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/p2mOfKSQbrUJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] all subarray with sum zero

2012-09-17 Thread rahul sharma
Plz provide me efficeient sol. 4 thisthnx

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] all subarray with sum zero

2012-09-17 Thread bharat b
contiguous or non-contiguous ?

On Tue, Sep 18, 2012 at 1:23 AM, rahul sharma rahul23111...@gmail.comwrote:

 Plz provide me efficeient sol. 4 thisthnx

 --
 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 group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] all subarray with sum zero

2012-09-17 Thread pankajsingh
it wud give u continuous...subarray...if u want non continuous..question
shud be subsequence...and for that u need to all combination O(n^20..which
is offcourse bruteforce...

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] all subarray with sum zero

2012-09-17 Thread pankajsingh
make a sum array..such that..sum[i]=sum of number from 0 to i-1make a
node which has 2 data..sum[i] and ith index itself..sort this node array
according to sum[i]...now check for consecutive value which have same
value...corresponding index i,j to that sum nodes will be start and end of
subarray...look for all such subarray..its an O(nlgn)..solution...:) hope
it works..!!

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.