generate a set of items

hey guys i have data as follows
I1 I2 I3 I4
T1 1 0 0 0
T2 0 1 1 0
T3 1 1 1 1
T4 0 1 0 0

i am inserting the elemeents ie 0's and 1'ns in array. i have to count how many times an item has 1 and generate and array as follows

C1

I1 2
I2 3
I3 2
I4 1

then again i have to use the above data and generate a set of item as given below
C2

{I1 I2} 1
{I1 I3} 1
{I1 I4} 1
{I2 I3} 2
{I2 I4} 1
{I3 I4} 1


i dont know how to reprsent C1 and C2 in an array . please help

Last edited on
Topic archived. No new replies allowed.