SubsetCount

SubsetCount[list,sub]

gives a count of the number of times sub appears in any order as a sublist of list.

SubsetCount[list,patt]

gives the number of sublists in list that match the general pattern patt in any order.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Count the number of appearances of a sublist:

Count the number of appearances of a sublist pattern:

Options  (1)

Overlaps  (1)

Allow overlaps:

Allow no overlaps:

Properties & Relations  (1)

Count the number of subsets:

The rules for counting are defined by the length of the result of SubsetCases:

Wolfram Research (2020), SubsetCount, Wolfram Language function, https://reference.wolfram.com/language/ref/SubsetCount.html.

Text

Wolfram Research (2020), SubsetCount, Wolfram Language function, https://reference.wolfram.com/language/ref/SubsetCount.html.

CMS

Wolfram Language. 2020. "SubsetCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SubsetCount.html.

APA

Wolfram Language. (2020). SubsetCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubsetCount.html

BibTeX

@misc{reference.wolfram_2024_subsetcount, author="Wolfram Research", title="{SubsetCount}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SubsetCount.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_subsetcount, organization={Wolfram Research}, title={SubsetCount}, year={2020}, url={https://reference.wolfram.com/language/ref/SubsetCount.html}, note=[Accessed: 22-November-2024 ]}