1
$\begingroup$

I have a problem with counting the cardinality. I have a list of two-element sets

S = {{3.,0.0425}, {3.,0.423}, {3.1, 0.044}, {3.2, 0.567}, {3.2, 0.599}, {3.2, 0.52313}}

I would like to get a list:

O = {{3,2}, {3.1,1}, {3.2,3}}

I mean that I would like to get a list that counts the sets with the same first element.

$\endgroup$
2

0

Browse other questions tagged or ask your own question.