Symbols and units

QuantitySymbolUnit / convention
Array/input size; item or matrix countnncount; local meaning stated
Time cost; measured execution timeT(n),t(n)T(n),t(n)steps; seconds or stated time unit
Comparisons; inversions; expected valueC,I,E[⋅]C,I,E[\cdot]count; count; same unit as argument
Auxiliary space; live depthSaux,DS_{\mathrm{aux}},Dwords; frames
Array and search key; rankA,x,rA,x,rproblem values; rank is one-based
Logarithm; harmonic numberlog⁡,ln⁡,Hn\log,\ln,H_nbase 2; base ee; dimensionless
Recurrence branching/reduction; exponenta,b,p,q,ℓa,b,p,q,\elldimensionless; locally defined constants/level
Integer-sort key range, digit count/baseK,d,bK,d,bcount
Specified empty-slot countrrcount; 0≤r≤m0\le r\le m, local to occupancy
Hash key, slots, load, probek,m,α,ik,m,\alpha,ikey; count; ratio; zero-based count
Hash functions and quadratic coefficientsh0,h1,h2,h,c1,c2h_0,h_1,h_2,h,c_1,c_2slot/step indices; dimensionless
Search probes or inspected keysU,SU,Scount; model explicitly stated
Universal hash familyH\mathcal Hset of functions
Item weight, value, fraction, density, capacitywi,vi,xi,ρi,Ww_i,v_i,x_i,\rho_i,Wweight; value; ratio; value/weight; weight
Interval start/finish; job deadlinesi,fi,dis_i,f_i,d_isame scheduling time unit
Frequency, probability, code lengthfi,pi,ℓif_i,p_i,\ell_icount; ratio; bits
Encoded size, average length, entropyB,ℓˉ,HB,\bar\ell,Hbits; bits/symbol; bits/symbol
Merge work and run lengthsM,r,sM,r,srecord movements; counts
DP state, LCS, knapsack, Boolean reachabilityD[i,j],L[i,j],K[i,c],B[i,c]D[i,j],L[i,j],K[i,c],B[i,c]problem-dependent value; length; value; Boolean
Matrix-chain dimensions and costpi,M[i,j]p_i,M[i,j]dimension count; scalar multiplications
Rod price and revenuepi,R[j]p_i,R[j]currency; context distinguishes matrix dimensions
Subarray ending/best sumEi,MiE_i,M_iunits of array entries
Increasing/nondecreasing lengthLi,LIS,LNDSL_i,L_{\mathrm{IS}},L_{\mathrm{NDS}}count
Graph, vertex set, edge set and sizesG,V,E,nv,neG,V,E,n_v,n_egraph; sets; counts
Source, target, vertex; transposes,t,u,v,GRs,t,u,v,G^Rgraph labels; graph
BFS level, DFS times, low valued(v),df(v),ff(v),low⁡(v)d(v),d_f(v),f_f(v),\operatorname{low}(v)edges; event counts; event count
Components, diameter, tree heightc,D,hc,D,hcount; edges; edges
Edge/path weight and true/tentative distancew,δ,d,dk,D(k)w,\delta,d,d_k,D^{(k)}common problem weight unit; +∞+\infty unreachable
Potential and multiplicative path scoreϕ,Q\phi,Qweight unit; product of edge-score units
Spanning tree, path, weight, path maximumT,PT,WT,MT,P_T,W_T,Mgraph; path; weight; weight
Disjoint-set costαDSU\alpha_{\mathrm{DSU}}dimensionless inverse-Ackermann function
Power base, exponent, accumulator and bit counta,e,z,bea,e,z,b_evalue; nonnegative integer; value/residue; bits
Matrix blocks and seven productsAij,Bij,Cij,PiA_{ij},B_{ij},C_{ij},P_imatrices in scalar operation model
DP state and transition countsNstates,Ntransitions(s)N_{\mathrm{states}},N_{\mathrm{transitions}}(s)counts
Terminal-step valueJ(v)J(v)steps to terminal
Hash multiplication constantAAdimensionless, 0<A<10<A<1, local to hashing

Revise offline: the whole Algorithms handbook as one PDF

52 pages · 2.6 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections