15,900,725 members
Home / Discussions / Algorithms

# Algorithms

 Re: Socket message(frame) pattern matching Hamed Musavi13-May-10 9:39 Hamed Musavi 13-May-10 9:39
 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
 I feel what he wants is to input two numbers n and m and the program should choose some numbers from series 1,2..n whose sum equals m and return all such combinations. For n=10, m=8, the possible combinations are: 1+7 2+6 3+5 .. 1+1+6 1+2+5 .. .. there can be a lot of such combinations. This is probably the ideal candidate for DP? 1. store all possible ways to make 1 using numbers from given series and store them 2. likewise all possible ways to make 2. since 2 can only be either using it alone or 1+1 and then to make 1, you already have ways stored during step 1 and so on for oher nos. for 3 = 3, 2+1. use info. for ways to make 2 and you'll automatically get 3, 2+1, 1+1+1 for 4 = 4, 3+1...
 Re: find a solution! [modified] Radhakrishnan G.18-May-10 3:30 Radhakrishnan G. 18-May-10 3:30
 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