Any sort of optimization will require a "blank" check in your php scripts, because paths that aren't there will still have a $_GET['']
variable associated with it, just that it'll be blank.
As far as the "state" and "national" URLs go, there's pretty much only one thing you can do, combine these two rules:
RewriteRule ^state/([A-Za-z]+)/?$ index.php?r=$1 [L,NC]
RewriteRule ^state/([A-Za-z]+)/([0-9]+)/?$ index.php?r=$1&class=$2 [L,NC]
by making the "class" optional (but there will still be a "class" parameter, it'll just be blank):
RewriteRule ^state/([A-Za-z]+)(?:/([0-9]+)|)/?$ index.php?r=$1&class=$2 [L,NC]
Same with the national:
RewriteRule ^national/([A-Za-z]+)/?$ index.php?r=national&show=$1 [L,NC]
RewriteRule ^national/([A-Za-z]+)/([0-9]+)/?$ index.php?r=national&show=$1&class=$2 [L,NC]
gets combined into:
RewriteRule ^national/([A-Za-z]+)(?:/([0-9]+)|)/?$ index.php?r=national&show=$1&class=$2 [L,NC]
But the school stuff is a little more complex. You can combine some of them, like:
RewriteRule ^schools/([A-Za-z-]+)/?$ index.php?school=$1 [L,NC]
RewriteRule ^schools/([A-Za-z-]+)/([A-Za-z]+)/?$ index.php?school=$1&show=$2 [L,NC]
RewriteRule ^schools/([A-Za-z-]+)/([A-Za-z]+)/([A-Za-z]+)/?$ index.php?school=$1&show=$2&sub=$3 [L,NC]
can be combined into just a single:
RewriteRule ^schools/([A-Za-z-]+)(?:/([A-Za-z]+)|)(?:/([A-Za-z]+)|)/?$ index.php?school=$1&show=$2&sub=$3 [L,NC]
while the
RewriteRule ^schools/([0-9]+)/?$ index.php?r=schools&class=$1 [L,NC]
RewriteRule ^schools/([A-Za-z-]+)/([0-9]+)/?$ index.php?school=$1&class=$2 [L,NC]
RewriteRule ^schools/([A-Za-z-]+)/([A-Za-z]+)/([0-9]+)/?$ index.php?school=$1&show=$2&class=$3 [L,NC]
RewriteRule ^schools/([A-Za-z-]+)/([A-Za-z]+)/([A-Za-z]+)/([0-9]+)/?$ index.php?school=$1&show=$2&sub=$3&class=$4 [L,NC]
can be combined into a single:
RewriteRule ^schools/([A-Za-z-]+)(?:/([A-Za-z]+)|)(?:/([A-Za-z]+)|)/([0-9]+)/?$ index.php?school=$1&show=$2&sub=$3&class=$4 [L,NC]