# Algorithm for determining variety

**URL:** <https://forum.kirupa.com/t/algorithm-for-determining-variety/198541>\
**Category:** Uncategorized\
**Created:** [August 25, 2006, 9:59pm UTC](https://forum.kirupa.com/t/algorithm-for-determining-variety/198541 "2006-08-25T21:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheRiddler](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@TheRiddler](https://forum.kirupa.com/u/TheRiddler)\
**Post date:** [August 25, 2006, 9:59pm UTC](https://forum.kirupa.com/t/algorithm-for-determining-variety/198541/1 "2006-08-25T21:59:59Z")

</div>

Hey guys, it’s been awhile,

I’m wondering if anybody has any ideas about an algorithm to see how many different variations there are within a set of data… For example, if I had:

1 1 1 1 2 3 3 2 1 1 4

The algorithm could figure that there are 4 different “types”. I don’t mean 4 numbers, because there are obviously more, but 4 varieties; of course, if I could be given a couple of hints as to how to go about count how many of the different types, that’d be appreciated, too. Thanks in advance.
