<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Grouping in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566366#M159161</link>
    <description>First, shorten the problem.  The number of combinations to test is 2 raised to the power of # of observations.  With millions of observations, you may not live long enough for a computer to perform all the calculations.&lt;BR /&gt;&lt;BR /&gt;Questions:  is T always an integer?  Could two separate observations hold identical values for T?  If so, would they count as 1 combination or 2?</description>
    <pubDate>Sat, 15 Jun 2019 14:58:27 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-06-15T14:58:27Z</dc:date>
    <item>
      <title>Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566364#M159159</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I have a variable and has numeric values stored in it.I want to create the groups of those values whose sum is equal irrespective of number of values in each group. For eg,&lt;/P&gt;&lt;P&gt;T is a variable that has all the values:&lt;/P&gt;&lt;P&gt;T&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;Creating two groups of 14 each, the groups formed would be (1,3,4,6) and (2,5,7).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly provide a generalized solution or idea because the variable actually has millions of rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 14:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566364#M159159</guid>
      <dc:creator>Pratik612_</dc:creator>
      <dc:date>2019-06-15T14:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566366#M159161</link>
      <description>First, shorten the problem.  The number of combinations to test is 2 raised to the power of # of observations.  With millions of observations, you may not live long enough for a computer to perform all the calculations.&lt;BR /&gt;&lt;BR /&gt;Questions:  is T always an integer?  Could two separate observations hold identical values for T?  If so, would they count as 1 combination or 2?</description>
      <pubDate>Sat, 15 Jun 2019 14:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566366#M159161</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-06-15T14:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566379#M159172</link>
      <description>Thank you, for asking for clarification and making my post more precise.&lt;BR /&gt;Firstly, I want to group them into 10 groups and answering your qts T is not always an integer and can hold duplicate values, also they should be treated as different combinations.</description>
      <pubDate>Sat, 15 Jun 2019 16:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566379#M159172</guid>
      <dc:creator>Pratik612_</dc:creator>
      <dc:date>2019-06-15T16:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566412#M159189</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/276939"&gt;@Pratik612_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;I want to group them into 10 groups&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;This kind-of contradicts your initial statement where you're looking for combinations with the same sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With millions of values the number of possible combinations to test will exceed the computational power of your environment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It feels like you should get back to the drawing board and try to come up with an algorithm that gives you a desired result with a different/amended method which requires less computing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also try and explain here in detail the underlying problem you want to solve, what you have and what you need. There might be other ways to approach things and someone here might have solved a similar problem before.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 23:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566412#M159189</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-06-15T23:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566435#M159194</link>
      <description>&lt;P&gt;Yeah. It is impossible mission . There are too many solutions to suit your condition .&lt;/P&gt;
&lt;P&gt;But if you have SAS/OR ,maybe give it a try (I also doubt due to big data).&lt;/P&gt;
&lt;P&gt;Post is at OR forum and calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1636"&gt;@RobPratt&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 12:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566435#M159194</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-06-16T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566440#M159196</link>
      <description>&lt;P&gt;How precisely do they need to match?&lt;/P&gt;
&lt;P&gt;Sort by descending value.&lt;/P&gt;
&lt;P&gt;Assign the next value to the group with smaller current total.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 12:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Grouping/m-p/566440#M159196</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-16T12:52:37Z</dc:date>
    </item>
  </channel>
</rss>

