Go back to previous page
Forum URL: http://www.cut-the-knot.org/cgi-bin/dcforum/forumctk.cgi
Forum Name: This and that
Topic ID: 668
#0, How can I count the number of chosen options in a matrix?
Posted by Lachlan on Dec-30-05 at 11:21 AM
A real life problem in town planning has come up that I am hoping someone can help us with.

We have generated 9 town planning strategy options using a 3 by 3 matrix (three development densitiy types against three economic/environmental/social issues) giving us an options matrix that we have numbered options 1 to 9. We have asked the public to let us know what is their preferred option or combination of options.

How would we go about counting the number of people who have chosen one particular option or combination of options without dashing around the office with printed forms and sorting them into piles? For example, I was wondering if the 9 numbers could be manipulated in such a way as to generate a unique number applicable to each option or combination of options.

regards and thank you


#1, RE: How to count number of chosen options in a matrix?
Posted by Pierre Charland on Jan-12-06 at 10:24 PM
In response to message #0
Well, If I understand you well,

a choice N is in row R and column C

R = floor
C = N mod 3

example: if N=5 then R=floor(7/3)=2 and C=5 mod 3=2