Program slows down significantly based on input
This should help a little bit:

        List&lt;string&gt; CandidatesRet = new List&lt;string&gt;();

        var splitChars = new[] { ' ' };

        for (var indexCi = 0; indexCi &lt; Ci.Count - 1; indexCi++)
        {
            // generate all sub itemset with length-1
            var allItems = Ci[indexCi].Split(splitChars);

            subItemset
                .AddRange(allItems.Select((s, i) =&gt; allItems.Where((t, j) =&gt; i != j)
                .Aggregate(string.Empty, (current, t) =&gt; current + (t + " ")))
                .Select(tempStr =&gt; tempStr.Trim()));

            // THE PROBLEM BEGINS HERE 
            foreach (var subitem in subItemset)
            {
                for (var indexCommon = indexCi + 1; indexCommon &lt; Ci.Count; indexCommon++)
                {
                    if (Ci[indexCommon].IndexOf(subitem, StringComparison.Ordinal) &lt; 0)
                    {
                        continue;
                    }

                    var listTempCi = Ci[indexCommon].Split(splitChars);

                    commonItem.AddRange(listTempCi.Where(itemCi =&gt; !subitem.Contains(itemCi)));
                }

                allCommonItems.Add(commonItem);
            }

            // generate condidate from common item
            CandidatesRet.AddRange(oldItemsetCi
                .Select(item =&gt; new { item, flagCi = allCommonItems.All(listCommItem =&gt; listCommItem.Contains(item)) })
                .Where(t =&gt; t.flagCi)
                .Select(t =&gt; (Ci[indexCi] + " " + t.item).Trim()));
        }
    }


However, the big problem is the still the double loop, which will grow as a power-of-two rather than linearly with your data size.