Adjacency Matrix in php -- vlookup in Excel
Posted: Sat Sep 24, 2011 1:15 am
My actual data has 100 x-values ( x1, x2, .... x100)
and 2000 s-values (s1, s2, ...... s2000)
Question 1: Which sites were visited by at least 2 people?
Question 2: How may people visited at least 2 sites?
Problem:
5 people (x1, x2, x3, x4, x5) visited some of the 7 possible sites (s1, s2, s3, s4, s5, s6, s7)
Sample Input:
x1, s1
x2, s3
x1, s3
x3, s7
x1, s7
x5, s2
x5, s1
x5, s3
Desired Output#1: List of sites visited by at least 2 people
Desired Output#2: List of people who visited at least 2 sites
1) Any ideas where do I begin with?
2 Should I use an adjacency matrix?
3) Am I better off just working with Excel and use vlookup?
and 2000 s-values (s1, s2, ...... s2000)
Question 1: Which sites were visited by at least 2 people?
Question 2: How may people visited at least 2 sites?
Problem:
5 people (x1, x2, x3, x4, x5) visited some of the 7 possible sites (s1, s2, s3, s4, s5, s6, s7)
Sample Input:
x1, s1
x2, s3
x1, s3
x3, s7
x1, s7
x5, s2
x5, s1
x5, s3
Desired Output#1: List of sites visited by at least 2 people
Code: Select all
Sites, #times, list of people
s1, 2, (x1, x5)
s3, 3, (x1, x2, x5)
Code: Select all
People, #times, sites
x1, 3, (s1, s3, s7)
x5, 3, (s1, s2, s3)
2 Should I use an adjacency matrix?
3) Am I better off just working with Excel and use vlookup?