RE: Army Composition
- Posted by "C. K. Lester" <cklester at yahoo.com> Oct 10, 2001
- 415 views
Hey, Dan, thanks for the help. All truth will soon be revealed. > The number "10556" was calculated by simple algebra: > > --Soldiers - no requirements > --Squad Leader - commands 20 soldiers > --Lt. - commands 10 Squad Leaders > --Captain - commands 10 Lt.s > --General - commands 5 Captains > > > -- soldiers + squad leaders + Lts. + Captains + Generals = Population > (army!) > --s + (s/20) + ((s/20)/10) + (((s/20)/10)/10 ) + ((((s/20)/10)/10)/5)= P > -- s + s/20 + s/200 + s/2000 + s/10000 = p > -- 10000s + 500s + 50s + 5s + s = 10000p > -- 10556s = 10000p > -- s = 1000p/10556 > > > I don't understand what you mean by "4 levels and 6 levels" of rank. You > only specified 5 levels of rank. Right. But "What If" I needed to calculate for a differently leveled organization? What if my calculations required a 4-tier organization or a 6-tier organization, other than the 5-tier organization we've hard coded so far...? What if we had { "Soldier" , "Leader" , "Captain" , "General" }? > If you want to find out how many different ranks there are, just look at > each rank var, if not zero, increment a "NumberOfRanks" counter. Yeah. That's what I mean. But how to implement? That's what I need to know. > I didn't really understand what you're doing with the matrix, either, and > the change in your rank system, > ranks = { "Soldier" , "Leader" , "Captain" , "Sergeant" , "General" } > seems wrong, it should be: > ranks = { "Soldier" , "Leader" , "Sergeant" ,"Captain" , "General" } Okay! Sounds right to me. But anything would. I'm just using familiar labels. We could also be using { "Pion" , "Assistant Manager" , "Manager" , "VP" , "President" } or something similar. The labels aren't what's important... It's the tiered organization that matters. Hopefully I've shed a little light on the above. -ck