15,901,738 members
Home / Discussions / Algorithms

# Algorithms

 find a sulution! wbgxx3-May-10 3:59 wbgxx 3-May-10 3:59
 Re: find a sulution! Kevin Drzycimski3-May-10 4:06 Kevin Drzycimski 3-May-10 4:06
 Re: find a sulution! wbgxx3-May-10 4:12 wbgxx 3-May-10 4:12
 Re: find a sulution! Luc Pattyn3-May-10 4:13 Luc Pattyn 3-May-10 4:13
 Re: find a sulution! wbgxx3-May-10 4:15 wbgxx 3-May-10 4:15
 Re: find a solution! theCPkid6-May-10 2:21 theCPkid 6-May-10 2:21
 Re: find a solution! [modified] Radhakrishnan G.18-May-10 3:30 Radhakrishnan G. 18-May-10 3:30
 Subset Sum problem I am pasting an algorithm, got this from a book ```Algorithm SumOfSubSet(s,k,r) // Find all subset of w[1:n] that sum to m. The values of x[j], // 1 m where i = 1..n { x[k] := 1; if( s + w[k] = m ) then Write( x[1:k]); // Subset found else if( s + w[k] + w[k+1] <= m ) then SumOfSub( s + w[k], k+1, r-w[k]); if( (s+r-w[k] >= m) and (s + w[k+1] <= m )) then { x[k] := 0; SumOfSub( s, k + 1, r - w[k]); } }``` `s` = is the sum to be generated `w` is the set with size `n`, `x `is an array and if `x[i]` is one means ``ith element in `w` is in the subset `k `is the index of element in `w` we are examining r is the remaining sum that can be created from `k +1`th element to `n`th item in `w` modified on Thursday, May 12, 2011 9:23 AM
 Re: find a solution! talazz12-May-11 2:53 talazz 12-May-11 2:53
 Simulating movement Code-o-mat24-Apr-10 5:49 Code-o-mat 24-Apr-10 5:49
 Re: Simulating movement Software_Developer24-Apr-10 10:12 Software_Developer 24-Apr-10 10:12
 Re: Simulating movement Code-o-mat24-Apr-10 22:02 Code-o-mat 24-Apr-10 22:02
 Re: Simulating movement Software_Developer29-Apr-10 6:26 Software_Developer 29-Apr-10 6:26
 Re: Simulating movement molesworth29-Apr-10 7:11 molesworth 29-Apr-10 7:11
 Re: Simulating movement Code-o-mat29-Apr-10 9:16 Code-o-mat 29-Apr-10 9:16
 Console shapes? venomation18-Apr-10 2:58 venomation 18-Apr-10 2:58
 Re: Console shapes? Richard MacCutchan18-Apr-10 11:06 Richard MacCutchan 18-Apr-10 11:06
 Re: Console shapes? MikeMarq20-Apr-10 16:33 MikeMarq 20-Apr-10 16:33
 "Best Fit" Algorithm Request && Teach A Man To Fish Michael Fritzius17-Apr-10 13:10 Michael Fritzius 17-Apr-10 13:10
 Re: "Best Fit" Algorithm Request && Teach A Man To Fish Luc Pattyn17-Apr-10 13:45 Luc Pattyn 17-Apr-10 13:45
 Re: "Best Fit" Algorithm Request && Teach A Man To Fish Radhakrishnan G.18-May-10 3:44 Radhakrishnan G. 18-May-10 3:44
 Re: "Best Fit" Algorithm Request && Teach A Man To Fish harold aptroot17-Apr-10 14:31 harold aptroot 17-Apr-10 14:31
 Re: "Best Fit" Algorithm Request && Teach A Man To Fish Som Shekhar17-Apr-10 20:46 Som Shekhar 17-Apr-10 20:46
 Re: "Best Fit" Algorithm Request && Teach A Man To Fish harold aptroot18-Apr-10 2:01 harold aptroot 18-Apr-10 2:01
 Last Visit: 31-Dec-99 18:00     Last Update: 19-May-24 23:39 Refresh ᐊ Prev1...121122123124125126127128129130 Next ᐅ