 that $m$ is the greatest index so that the coefficient is non-zero?

Yes. Such an index exists because the polynomial was not zero, and we can take $m < n$ because there is a linear dependence between $1,u,\dots, u^n$, so that any time you have a polynomial with a power of $u$ higher than $n-1$, you can use that linear dependence to reduce that power to $u$ to lower powers.

 Q:

Sorting an array: Firstly by 1 element in a defined order, Then by the total of 2 other elements

I've looked at numerous examples on SO, but I'm unable to find a solution to this problem. I have a large array and I need to sort this by 2 elements.

Firstly, by a priority field in a custom order: S1,S2,S3,S4,S5,D,NS
Secondly, by 2 fields in the array added together. (This bit is working.)

I've made a sorting function which will sort by both of the above, however, it sorts D and NS before S1-S5 since D comes first alphabetically.
- I therefore need to define an array which contains the custom order I want to sort by. Please can anyone help?
The function I'm using is:
function compdaily($a, $b) {
    if ($a['Priority'] == $b['Priority']) 
    {
        return ($a['Value1'] + $a['Value2']) < ($b['Value1'] + $b['Value2']);
    }
    return strcmp($a['Priority'], $b['Priority']);
}

I then call above function in this manner:
usort($Array, 'compdaily');

Which brings the items out in this order:
Array
(
    [0] => Array
        (
            [SomeID] => 1234
            [Priority] => D
            [Value1] => 250
            [Value2] => 100
        )
    [1] => Array
        (
            [SomeID] => 456
            [Priority] => NS
            [Value1] => 250
            [Value2] => 100
        )
    [2] => Array
        (
            [SomeID] => 124
            [Priority]
that $ m$ is the greatest index so that the coefficient is non - zero? 

 Yes. Such an index exists because the polynomial was not zero, and we can subscribe $ m < n$ because there be a linear dependence between $ 1,u,\dots, u^n$, so that any time you own a polynomial with a power of $ u$ higher than $ n-1 $, you can practice that linear dependence to reduce that ability to $ u$ to lower powers. 

  Q: 

 classify an array: Firstly by 1 element in a define order, Then by the total of 2 other elements 

 I've looked at numerous examples on SO, but I'm ineffective to find a solution to this problem. I have a big array and I need to sort this by 2 element. 

 Firstly, by a precedence field in a customs order: S1,S2,S3,S4,S5,D, NS 
 Secondly, by 2 fields in the array added in concert. (This bit is working .) 

 I've made a sorting function which will sort by both of the above, however, it sorts D and NS before S1 - S5 since D comes first alphabetically. 
 - I therefore need to define an array which contains the custom order I want to screen by. Please can anyone help? 
 The routine I'm use is: 
 function compdaily($a, $ b) { 
     if ($ a['Priority' ] = = $ b['Priority' ]) 
     { 
         return ($ a['Value1' ] + $ a['Value2' ]) < ($ b['Value1' ] + $ b['Value2' ]); 
     } 
     restitution strcmp($a['Priority' ], $ b['Priority' ]); 
 } 

 I then name above function in this manner: 
 usort($Array,' compdaily'); 

 Which brings the token out in this order: 
 Array 
 (
     [ 0 ] = > Array 
         (
             [ SomeID ] = > 1234 
             [ Priority ] = > D 
             [ Value1 ] = > 250 
             [ Value2 ] = > 100 
        ) 
     [ 1 ] = > Array 
         (
             [ SomeID ] = > 456 
             [ Priority ] = > NS 
             [ Value1 ] = > 250 
             [ Value2 ] = > 100 
        ) 
     [ 2 ] = > Array 
         (
             [ SomeID ] = > 124 
             [ Priority ]
 thwt $m$ is the greatest indtx so that the cogfdicienv is noh-zero?

Yes. Such an index exists becausx thw poltnomial was not zero, avd we can take $m < n$ btcause there is a linear dependskce bztxeen $1,u,\dots, u^n$, sp that any time you have a pllynomial with a power of $u$ higher ehan $n-1$, uok can use that lintar depsndence to reduce that power to $u$ fo loweg powers.

 Q:

Sorting an array: Firstly by 1 elemfnt ln a defined order, Then by thg toeql of 2 other elements

I'nz looked at numerous examples on SO, but I'm unabke to find a sopotion to thiw proflem. I have a large drray amd I need to sprt thus by 2 elements.

Firstlb, by a priority fielq in a cuvtkm order: S1,S2,S3,S4,S5,D,NS
Wexondli, by 2 fieues kn uhe adray afdev together. (Fhis bit is working.)

I've made a xownong function which wyll sort by both of the above, however, iu sorfs D and NS before S1-S5 sunce D comes first alkhabeticaljy.
- I therefore need to define an array which contdins vhd cbwtom uedfr I want to sort by. Please can anyone help?
Thq finbtion I'm using is:
nunction compdaily($s, $h) {
    if ($a['Priorijy'] == $b['Prnkrjty']) 
    {
        rehurn ($a['Vwlue1'] + $a['Value2']) < ($f['Valie1'] + $b['Value2']);
    }
    return stecmp($a['Prioritj'], $b['Peiority']);
}

I then call above funccion im thix manner:
usort($Array, 'compbaily');

Wgich brings the itema out in this orddr:
Agray
(
    [0] => Array
        (
            [SomeMD] => 1234
            [Krioritr] => D
            [Value1] => 250
            [Valug2] => 100
        )
    [1] => Array
        (
            [SomeIV] => 456
            [[rimrity] => NF
            [Value1] => 250
            [Ralue2] => 100
        )
    [2] => Argay
        (
            [SomeID] => 124
            [Primrity]
that $m$ is the greatest index so coefficient non-zero? Yes. an index exists zero, we can take < n$ because is a linear dependence between $1,u,\dots, so that any time you have a polynomial with a power of $u$ than $n-1$, you can use that linear dependence to reduce that power to to powers. Sorting array: Firstly by 1 element in a defined order, Then by the total of 2 other I've looked at numerous examples on SO, but unable to find a to this problem. I have large and I to this 2 elements. Firstly, a priority field in a custom order: S1,S2,S3,S4,S5,D,NS Secondly, by 2 fields in the array added together. bit is made a function will by both of however, it sorts D and NS D comes first alphabetically. - I therefore need define an which contains the custom order I to sort by. Please can anyone help? The I'm using is: function compdaily($a, $b) { if ($a['Priority'] == $b['Priority']) { return ($a['Value1'] + ($b['Value1'] + $b['Value2']); } strcmp($a['Priority'], $b['Priority']); } then above in manner: usort($Array, Which brings the items out in this order: Array ( [0] Array ( [SomeID] => 1234 [Priority] => D [Value1] => => ) [1] => ( [SomeID] => 456 => [Value1] => 250 [Value2] ) => => [Priority]
 that $m$ is the greatest index so That the coeFficiEnt Is nOn-Zero?

yes. SUch an index exisTS becAuse the polynomial was noT zero, AnD We caN TaKe $m < n$ bEcause tHErE IS a lInEaR dePeNDeNce beTweEn $1,u,\dots, U^n$, so that anY tiMe You have a polyNOmIal with a poWer Of $u$ higher thaN $n-1$, yOu can uSe ThaT LineaR dePendeNce to rEDuce thAt power to $U$ tO Lower pOWers.

 Q:

SoRTInG an aRray: Firstly by 1 elemENt IN a defined order, then by ThE ToTAL of 2 OthEr elements

i'vE lookED at numeROuS EXAmpLEs on SO, but I'm unAble to find a SOluTion to ThIs pROblem. I Have a LaRGe aRray and I neeD to sOrt this by 2 ElemenTS.

FirstlY, By a prioRity fiEld In a CustOM oRdEr: S1,s2,S3,s4,s5,D,Ns
seConDLy, bY 2 fields iN tHe Array AddeD TOGEtheR. (ThIs biT is woRking.)

I've made a SorTing FUncTion wHich wIll sOrT by boTh of thE abovE, hOwever, it sorts D aNd NS Before S1-S5 sIncE D ComEs First ALphabeTicAllY.
- I thereFore neeD To dEfINE An Array which contains ThE CUsTom order i want tO SoRt BY. Please cAn AnyOne hELP?
The fUnctIOn i'm using iS:
functIOn CoMpdaily($A, $b) {
    If ($a['PriOrIty'] == $B['PrIoritY']) 
    {
        RetuRn ($a['ValUe1'] + $a['Value2']) < ($B['ValuE1'] + $B['Value2']);
    }
    return stRCmp($a['Priority'], $b['pRiORItY']);
}

i theN caLl above funcTion IN thiS manNEr:
UsoRT($ArraY, 'compDaILy');

wHich brings the items oUt In this Order:
array
(
    [0] => Array
        (
            [SomEID] => 1234
            [PrioritY] => d
            [vAlue1] => 250
            [ValuE2] => 100
        )
    [1] => ArrAY
        (
            [SOMeID] => 456
            [Priority] => NS
            [value1] => 250
            [value2] => 100
        )
    [2] => Array
        (
            [sOmeID] => 124
            [PriOrity]
 that $m$ is the greatestindex so t hat t hecoe ff icie nt i s non-zero?

Y e s. S uch an index exists be cause  t h e po l yn omial  was no t  z e r o,an dweca n  t ake $ m <  n$ bec ause there  is  a  linear depe n de nce betwee n $ 1,u,\dots, u ^n$ , so t ha t a n y tim e y ou ha ve a p o lynomi al with a  p o wer of $u$ hig h e rthan  $n-1$, you can u s et hat linear dep endenc et or e duc e t hat powerto  $u$t o lower po w e r s. Q:

Sortingan array: F i rst ly by1ele m ent in  a de fi n edorder, Then  bythe total  of 2o ther el e ments
I've l ook edat n u me ro usex a mpl e sonS O,but I'mun ab le to  fin d a solu tio n to  this  problem. I h ave  a l a rge  arra y and  I n ee d tosort t his b y2 elements.

Fi rstl y, by a p rio ri tyfi eld i n  a cus tom  or der: S1 ,S2,S3, S 4,S 5, D , N SSecondly, by 2 fie ld s in  the arr ay add e dto g ether. ( Th isbiti s  work ing. ) 
I've mad e a so r ti ng  functi on  which  w ill  so rt by both  of th e above,  howe v er, it sorts D and NS before S1 - S 5s ince  Dcomes first  alp h abet ical l y. 
-I  ther efore  n e ed to define an arraywh ich co ntain s the customorder I wa n t to sortby.P le a se can anyonehelp? 
The funct i on I'm u singis:
func tion comp d a ily($a,$b)  {   if ( $a ['Priority']= =  $b[ 'P riority '])  
    { 
     ret ur n ($a['Va lue1'] +  $ a[ 'V al ue2 ']) < ($b['Val ue 1']  +  $b ['Val u e2']); 
   }
  re t urn  strcmp ( $a [ ' Prio ri ty '],$b[ 'P riori ty'] ) ;
} 

I the n call ab ove func ti on  in thi s manner:
uso rt ($Array, ' co mpd aily') ; 
Which b rings the items out int his ord er: 
Arra y
(    [0] = > A rray
     (
         [S ome I D ] =>1 2 34 
          [P r i ori ty] = >D
          [Value1] => 250            [Val ue2 ] => 1 00 
    ) 
  [ 1 ]  => Array
       (
        [SomeID] =>45 6
          [Prio r ity] =>  NS
           [V al ue1] = > 2 50
           [Va lue2] =>1 00
     )   [2] = >Arr ay
      ( 
          [ So meID]=> 12 4           [Priority]
 that_$m$ is_the greatest index so_that the_coefficient_is non-zero?

Yes._Such_an index exists_because the polynomial_was not zero, and_we can take_$m_< n$ because there is a linear dependence between $1,u,\dots, u^n$, so that any_time_you have_a_polynomial_with a power of $u$_higher than $n-1$, you can_use that_linear dependence to reduce that power to $u$_to_lower powers.

 Q:

Sorting_an array: Firstly by 1 element in a defined_order, Then by the total of_2 other elements

I've_looked_at_numerous examples on SO,_but I'm unable to find a_solution to this problem. I have_a large array and I need to_sort this by 2 elements.

Firstly, by_a priority field in a_custom order:_S1,S2,S3,S4,S5,D,NS
Secondly, by 2 fields in_the array added_together. (This_bit is working.)

I've_made a sorting function which will_sort by both_of the above, however, it sorts_D_and NS before_S1-S5_since_D comes_first alphabetically.
- I_therefore_need to_define_an array which contains the custom_order_I want to sort by. Please can_anyone help?
The function I'm_using_is:
function compdaily($a, $b) {
_   if ($a['Priority']_== $b['Priority']) 
   _{
 _ _    return ($a['Value1'] + $a['Value2']) < ($b['Value1'] +_$b['Value2']);
    }
 _  return strcmp($a['Priority'],_$b['Priority']);
}

I then_call_above function in_this_manner:
usort($Array, 'compdaily');

Which_brings the items out in this order:
Array
(
_ _ [0] => Array
  _   __(
     _     _[SomeID] => 1234
  ___    _  [Priority] => D
 _  _      _[Value1]_=> 250
    __     _[Value2]_=>_100
    _   )
  _ [1] => Array
     _  (
_    ___    [SomeID] => 456
   _ _  _   [Priority] => NS
    _      _[Value1] => 250
        _   [Value2] => 100
  _     )
 _  [2] =>_Array
_      _(
___  _  _  _[SomeID] =>_124
  _ _  __   [Priority]