Abstract Improved Upper Bounds on the Reflexivity of Point Sets
中英文对照论文-2005美赛B题The Booth Tolls for Thee_收费站模型

In fact, the models mostly agree that given L lanes, a number of booths around B = ⌊1.65L + 0.9⌋, where ⌊x⌋ is the greatest integer less than x, will minimize the total human cost associated with the plaza.
The Booth Tolls for Thee
Adam Chandler Matthew Mian Pradeep Baliga 翻译: 周吕文0
COMAP Mathematical Contest in Modeling February 7, 2005 Duke University
(0,1)矩阵矩阵积和式的上下界

PerA ≤
i=1
(ri !) ri .
1
If A ∈ Bn , let τ = n2 − A be the number of zeros of A. For 0 ≤ τ ≤ n2 , let U (n, τ ) = {A ∈ Bn : A = n2 − τ }, In 1988, Brualdi et al considered upper bounds of PerA when A ∈ Bn with restrictions on A . The following are the two results of A ∈ U (n, τ ). Theorem 1.3(Brualdi, Goldwasser and Michael, [5]) Let A ∈ U (n, τ ) with τ ≥ n2 − n. Let σ = n2 − τ and r = σ/n . Then PerA ≤ (r!)
The upper bound and lower bound for the permanent of (0, 1)-matrices
Zhang Xueyuan Zhu Xiaoying Wang Cuiqi ∗ (School of Science, China University of Mining and Technology, Xuzhou, Jiangsu, 221008)
A=
0 ··· 1 ··· . . . . . . 1 ···
0 1 . . .
1 ··· 1 ··· . . . . . . 1 1 ···
1 1 . . . 1
∈ U (n, τ )
Now using Laplace (2) expand PerA by the 1st row: 1 ··· . . PerA = τ · 0 · Per . .. . 1 ··· 1 ··· . . +(n − τ ) · 1 · Per . . .. 1 ··· = (n − τ ) · (n − 1)!.
Boosting very-high radix division with prescaling and selection by rounding

Boosting Very-High Radix Division with Prescaling and Selection by Rounding Paolo Montuschi Tom´a s Lang Dip.di Automatica e Informatica Dep.of Electrical and Computer Eng.Politecnico di Torino University of California at Irvine e-mail:montuschi@polito.it e-mail:tlang@AbstractAn extension of the very-high radix division with prescal-ing and selection by rounding is presented.This extension consists in increasing the effective radix of the implementa-tion by obtaining a few additional bits of the quotient per iteration,without increasing the complexity of the unit to obtain the prescaling factor nor the delay of an iteration. As a consequence,for some values of the effective radix, it permits an implementation with a smaller area and the same execution time than the original scheme.Estimations are given for54-bit and114-bit quotients.1.IntroductionDivision by digit recurrence produces one digit of the quotient per iteration.Consequently,for a given precision a higher radix results in fewer iterations and a potential faster execution.However,as the radix increases the digit-selection function becomes more complicated,which in-creases the cycle time and can overcome the reduction in execution time.Because of this,practical implementations are limited to up to radix-8stages and radix-16dividers have been implemented using overlapped radix-2and radix-4stages.Extensive literature exists on this subject;for spe-cific references see for instance[5,9,14]A way of achieving speedup with larger radices is to simplify the selection function by prescaling the divisor [4,8,10,17].In particular,prescaling and selection by rounding has been shown to produce a significant speedup [6].We refer to this scheme as the VHR approach,which has been extended to square root[12]andHere are shown improved values with respect to Table4in[6],since we used an improved linear approximation developed in[12]and[11].Table1.Execution time&area of VHR division Quotient bits per iteration9111418 Cycle time7.59.09.09.0 No.of cycles(54-bit quotient)10987 Execution time75817263 Area MAC520710740970 Area presc.factor module1302204701750:delay and area of full adder In this paper we increase the effective radix by obtain-ing a few additional bits of the quotient per cycle,while maintaining the complexity of the prescaling factor calcula-tion.This results in a reduction of the overall area for the same execution time.Specifically,we estimate that for54 bits,in the implementation for18quotient bits per iteration the area of the prescaling factor module plus the area of the multiplier,can be reduced by30%.Moreover,for the case of a quotient of114bits(extended precision)the boosting can achieve a speedup of about10%for the same area.We describe the algorithm,show the architecture,and estimate the improvement obtained with respect to VHR division. We assume familiarity with[5]and[6].2.Review of VHR divisionAs described in[6]in this approach the division is per-formed in the unit of Figure1,as followsCycle1:determine the scaling factor as an ap-proximation of such thatwhere is the divisor and the radix.Cycle2:obtain the scaled divisor(carry-save).Cycle3:obtain the initial residual(carry-save),where is the dividend.Assimilate.Cycles4toFigure1.Architecture of VHR division of[6] where is the(redundant)shifted residual trun-cated at the-th fractional bit,andThe residual is left in carry-save form.Cycle(3)as determined in Section4.1.The selection function has two components.Forwe perform selection by rounding,as done in[6].That is,(4) where is the truncation of the shifted residualto its th fractional bit.To allow this selection by rounding we need thatIn[5]the improved analytical expression(5)has been introduced,and it has been shown that it influences neither the analytical and numerical results nor the implementation of[6].very high radix division unitFigure 2.Proposed architectureThen(9)This means that the selection of corresponds to a radix-C division with replaced byand the restrictions(10)and(11)We first determine the digit set of and then the selec-tion function.4.1.Choice of digit set forIn this section we determine the digit set of .To do this,we need to determine bounds on the value of .We decompose as follows:(12)whereBecauseis selected by rounding we get(14)Consequently,the upper bound ofis(15)Note that we do not consider the special casesincethis produces ,as shown in [6].For the lower bound the worst case is produced by using,which can occur in the first iteration,leading to(17)Since the domain of is not symmetric,this results in anonsymmetric digit set for .Let us define the digit setWe start with the determination of the minimum ,which guarantees that (10)holds,i.e..From (9)we have that the worst-case situation occurs when is at its maximum value and has the minimum value of its domain;in this case,which results inNow should guarantee that. We have(20) Let us consider now the right hand side of(20).We have by expansion of,Now,for we have,(sinceSince should be an integer,we get as necessary and sufficient condition for the smallest value ofif(21) 4.2.Selection intervals and selection constantsWefirst determine the selection intervals and then use them to determine conditions for the selection constants. 4.2.1Selection intervalsSince the region of convergence of the algorithm is given by (10),we obtain,from(9),the following selection interval for.(22) However,the boosting algorithm should operate concur-rently with the VHR part,which implies that is not known.Consequently,we develop the selection function from instead of.Replacing byin(22)we get the bounds of the selection intervalsuch that if then can be se-lected.We get4.2.2Selection constantsNow,as in standard digit-recurrence division[5],the selec-tion function is described by the selection constants so that the value is selected if. Continuity requires that.As is, depends on and.Moreover,the selection requires knowledge of with full precision.Since there is over-lap between the selection intervals,it is possible to use esti-mates of these three quantities.If we call the estimate of and the estimate, we get(23) where the maximum and the minimum are determined for the range of values of and defined by the estimates and,respectively.This expression assumes with full precision.Estimate ofTo avoid the knowledge of with full precision,we use an estimate obtained from a few bits of the carry-save representation of,as follows.Sinceand is determined by rounding as described in(4),we obtain thatwhere is the-th digit of the representation of .That is,is the two’s complement repre-sentation of.Because of the way the rounding is per-formed and have values and the rest is in carry-save form.Consequently,the estimate of can be obtained from a truncated.Because of the two’s complement representation we getMoreover,if the truncation is done at the fractional bit,(24)Table2.Sufficient conditions for selection (bits of)(frac.bits of)As a consequence,when the estimate of is used, we get the selection intervals(25) and expression(23)is transformed to(26) where the*indicates the value larger than,with the granularity of.To determine suitable values of ,we need to specify the way the estimates and are computed.Estimate ofBecause of the selection by rounding,is directly de-rived from the most significant integer and2frac-tional bits of.We estimate by considering the most significant binary weights of,i.e.those from weight to weight.So,if the estimate is rep-resented in(assimilated)two’s complement representation while the rest of remains in carry-save representa-tion we getwhere(27) Consequently,from(4)it follows that(28) By combining(28)with(2),we get(29) Estimate and range ofSince,obtained from,is in two’s complement represen-tation we obtain(30) Moreover,since2.The generation of3.The incorporation of into the MAC4.The production ofConsequently,we now concentrate on the implementation of these blocks.Selection function ofAs described in Section4,the selection function requires the assimilation of parts of the carry-save representation of and then a function on the resulting bits.This im-plementation is shown in Figure3.Note the two-level as-similation required for,which is due to the fact that therounding to produce uses up to the the second fractional bit.Moreover,the estimate is obtained by a truncation of,which is produced by inverting the integer bit of.Of course,this inversion is not actually nec-essary to feed the selection function.Moreover,from(14) and as explained in section4.2.2on the range of,only the bit weights from weight to weight of enter the selection function.Generation of and residual updatingIn general,the generation of requires a rectangu-lar multiplier.This consists of two parts:generation of partial products and addition.The addition can be per-formed as part of the MAC tree,together with the updat-ing of the residual.For instance,for radix-4()sincetwo terms are required,unless the multiple is precomputed.Two terms are also required for. Incorporation into the MAC treeBecause the time of the selection function for is largerthan that for(done by rounding and recoding),to avoid that the boosting produces an increase in the cycle time,it is necessary to introduce the additional terms to lower lev-els of the MAC tree.This is possible if the original tree is not complete,as illustrated in Figure4.Since the MAC in the VHR division is used both for the recurrence and for the prescaling,the number of available slots at different levels depends on the radix and on the number of bits of the prescaling factor.Specifically,for the recurrence the num-ber of inputs to the tree is and for the prescal-ing,where is the number of fractional bits of the prescaling factor(since and must be represented,for recoding purposes,in two’s complement). Production ofFinally,it is necessary to producein two’s complement for the on-the-fly conversion.The im-plementation is simple and is not in the critical path.6.Evaluation and comparisonWe now give a rough estimation of the execution timeand the area of the boosting VHR division and compareFigure4.Levels of the MAC treewith VHR division.As was seen for the VHR scheme[6], the radices that have to be considered are the lowest that achieve a reduction in the number of cycles.Consequently, we need to compare the VHR with radix with the boost approach with.For the execution time we can give the following general considerations.The cycle time is determined by the maximum of the time to compute the prescaling factor and the time to perform an iteration of the recurrence.Moreover,the time to compute the scaling factor depends onfor the VHR approach and on for the boosting ap-proach.Consequently,this time might be reduced byusing the boosting approach.the time of an iteration is the same for both schemes,as long as the delay of the selection function forand the generation of the multiple is overlapped bythe recoding and rounding,the multiplexer,the mul-tiple generator,and thefirst levels of the MAC tree. Consequently,the addition of the boosting can produce a speedup if the delay of the calculation of the scaling factor is the critical component.This depends on the way this cal-culation is performed.The implementation model we use shows that it is reasonable to assume that the delay of this calculation is not critical.Consequently,for the same radix ,we do not expect the boosting to produce a speedup.With respect to the area,the main components are the MAC and the calculation of the prescaling factor.The area of the MAC increases somewhat when adding the boosting, because of the partitioning of the multiplier into two parts. On the other hand,the reduction in the area of the module to calculate the prescaling factor should be substantial,when going from to radix.This is the main advan-tage of the boosting technique.We now perform an estimate of this area reduction.6.1.Choice ofAcceptable values of are determined by the following considerations:Table3.Available slots in the MAC tree11-1215-1619-208101214-16slots321VHR+boost()---190021002900Area ratio0.800.650.55(a)114-bit quotientrecurrence and also on the number of bits of the prescalingfactor,which depends on the way this factor is computed[3,7,15,16,18].Using the L-approach described in[12](and,more in general in[11])we obtain that the numberof inputs to the tree required by the VHR division is.Consequently,the number of empty slots is shownin Table3.Therefore,since for and we needtwo slots,in the sequel we consider.6.3.Suitable values ofAs described in[13],the suitable values of depend onthe required precision of the quotient;namely,the suitablevalues are the smallest that produce a given number of cy-cles.These values for and bits(double andextended precision,respectively)are as reported in Table4.6.4.Execution time and areaTable5shows estimates of the execution time and areaof VHR division and of the version with boosting,using themodels presented in[12].As can be seen from the table,for54bits the boosting technique is only effective for,in which case the area ratio(VHR+boost)/(VHR)is0.7.On the other hand,for114bits it is effective forand,producing ratios between0.85and0.65.Moreover,for114bits we estimate that additionalarea reductions can be achieved by using.Figure5shows the tradeoff between area and speedup,using as reference values for delay and area the radix-2im-plementation as reported in[5],i.e.area equal toFigure5.Speedup vs.Area comparisonsand for54and114bits,respectively,and delay equal to and again for54and114bits,re-spectively.For54bits we estimate a VHR+boost() unit4times faster than the“classical”radix-2architecture, requiring6times its hardware;in this case,the estimated area saving is about30%,with respect to the VHR unit with the same delay.On the other hand,for114bits both very-high radix implementations produce speedups of up to6; the reduction in area of the implementations of the boosting algorithm being of25%(for C=4)and of35%(for C=8), with respect to the standard VHR implementation.More-over,from Table5b we observe that for114bits using an area of about,we can design either a VHR radix-unit with total delay of or a VHR+boost radix-unit(with)with total delay10%smaller.7.ConclusionsWe have presented an algorithm and implementation that increases the effective radix of the very-high radix division approach presented in[6].This is accomplished by obtain-ing a few additional bits of the quotient per iteration without increasing the complexity of the module to obtain the scal-ing factor,nor the iteration delay.We show that for some values of the effective radix this approach results in a significant reduction in the area of the module to compute the prescaling factor with respect to the original scheme.As a consequence,it is possible to achieve values of the execution time with a smaller unit.We expect this approach to be useful for other related operation such as square root andin a very high radix combined division/square-root unit withscaling.IEEE put.,C-47(2):152–161,February 1998.[2]Compass Design Automation.Passport-0.6Micron,3-Volt,High Performance Standard Cell pass Design Automation,Inc.,1994.[3] D.DasSarma and D.Matula.Faithful bipartite rom recipro-cal tables.In Proc.of the12th IEEE Symposium on Com-puter Arithmetic,pages12–25,Bath,England,July1995.[4]M.Ercegovac and ng.Simple radix-4division withoperands scaling.IEEE put.,C-39(9):1204–1208,September1990.[5]M.Ercegovac and ng.Division and Square Root:Digit-Recurrence Algorithms and Implementations.Kluwer Academic Press,New York,NJ,1994.[6]M.Ercegovac,ng,and P.Montuschi.Very high radixdivision with prescaling and selection by rounding.IEEE put.,C-43(8):909–917,August1994.[7]M.Ito,N.Takagi,and S.Yajima.Efficient initial approxi-mation for multiplicative division and square root by a mul-tiplication with operand modification.IEEE put., C-46(4):495–498,April1997.[8]J.Klir.A note on Svoboda’s algorithm for r-mation Processing Machines,(Stroje na Zpracovani Infor-maci),9:35–39,1963.[9]puter Arithmetic Algorithms.Prentice-Hall,Englewood Cliffs,NJ,1993.[10] E.Krishnamurthy.On range-transformation techniques fordivision.IEEE put.,C-19(2):157–160,February 1970.[11]ng and P.Montuschi.Improved methods to a linear in-terpolation approach for computing the prescaling factor for very high radix division.I.R.DAI/ARC6-94,Dipartimento di Automatica e Informatica,1994.[12]ng and P.Montuschi.Very high radix combined divi-sion and square root with prescaling and selection by round-ing.In Proc.of the12th IEEE Symposium on Computer Arithmetic,pages124–131,Bath,England,July1995. [13]P.Montuschi and ng.An algorithm for boosting veryhigh radix division with prescaling and selection by round-ing.I.R.DAI/ARC4-98,Dipartimento di Automatica e In-formatica,1998.[14]S.Oberman and M.Flynn.Division algorithms and imple-mentations.IEEE put.,C-46(8):833–854,Au-gust1997.[15]M.Schulte and J.Stine.Symmetric bipartite tables for ac-curate function approximation.In Proc.of the13th IEEE Symposium on Computer Arithmetic,pages175–183,Asilo-mar,CA,July1997.[16] E.Schwarz and M.Flynn.Hardware starting approxima-tion method and its application to the square root opera-tion.IEEE put.,C-45(12):1356–1369,Decem-ber1996.[17] A.Svoboda.An algorithm for division.Inf.Proc.Mach.,9:25–32,1963.[18]N.Takagi.Generating a power of an operand by a tablelookup and a multiplication.In Proc.of the13th IEEE Sym-posium on Computer Arithmetic,pages126–131,Asilomar, CA,July1997.。
最大叶子生成树(MLST问题)

Spanning directed trees with many leaves Noga Alon1,Fedor V.Fomin2,Gregory Gutin3,Michael Krivelevich1,andSaket Saurabh21Department of Mathematics,Tel Aviv UniversityTel Aviv69978,Israel{nogaa,krivelev}@post.tau.ac.il2Department of Informatics,University of BergenPOB7803,5020Bergen,Norway{fedor.fomin,saket}@ii.uib.no3Department of Computer ScienceRoyal Holloway,University of LondonEgham,Surrey TW200EX,UKgutin@Abstract.The Directed Maximum Leaf Out-Branching problemis tofind an out-branching(i.e.a rooted oriented spanning tree)in a givendigraph with the maximum number of leaves.In this paper,we obtaintwo combinatorial results on the number of leaves in out-branchings.Weshow that–every strongly connected n-vertex digraph D with minimum in-degree at least3has an out-branching with at least(n/4)1/3−1leaves;–if a strongly connected digraph D does not contain an out-branching with k leaves,then the pathwidth of its underlying graph UG(D)isO(k log k).Moreover,if the digraph is acyclic,the pathwidth is atmost4k.The last result implies that it can be decided in time2O(k log2k)·n O(1)whether a strongly connected digraph on n vertices has an out-branchingwith at least k leaves.On acyclic digraphs the running time of our algo-rithm is2O(k log k)·n O(1).1IntroductionIn this paper,we initiate the combinatorial and algorithmic study of a natural generalization of the well studied Maximum Leaf Spanning Tree problem on connected undirected graphs[11,16,19–21,24,25,31,33].Given a digraph D,a subdigraph T of D is an out-tree if T is an oriented tree with only one vertex s of in-degree zero(called the root).If T is a spanning out-tree,i.e.V(T)=V(D), then T is called an out-branching of D.The vertices of T of out-degree zero are called leaves.The Directed Maximum Leaf Out-Branching(DMLOB) Preliminary extended abstracts of this paper have been presented at FSTTCS2007[5]and ICALP2007[4]2N.Alon,F.V.Fomin,G.Gutin,M.Krivelevich,and S.Saurabhproblem is to find an out-branching in a given digraph with the maximum num-ber of leaves.The combinatorial study of spanning trees with maximum number of leaves in undirected graphs has an extensive history.Linial conjectured around 1987that every connected graph on n vertices with minimum vertex degree δhas a spanning tree with at least n (δ−2)/(δ+1)+c δleaves,where c δdepends on δ.This is indeed the case for all δ≤5.Kleitman and West [27]and Linial and Sturtevant [30]showed that every connected undirected graph G on n vertices with minimum degree at least 3has a spanning tree with at least n/4+2leaves.Griggs and Wu [25]proved that the maximum number of leaves in a spanning tree is at least n/2+2when δ=5and at least 2n/5+8/5when δ=4.All these results are tight.The situation is less clear for δ≥6;the first author observed that Linial’s conjecture is false for all large values of δ.Indeed,the results in [2]imply that there are undirected graphs with n vertices and minimum degree δinwhich no tree has more than (1−(1+o (1))ln(δ+1)δ+1)n leaves,where the o (1)-termtends to zero an δtends to infinity,and this is essentially tight.See also [3],pp.4-5and [13]for more information.In this paper we prove an analogue of the Kleitman-West result for directed graphs:every strongly connected digraph D of order n with minimum in-degree at least 3has an out-branching with at least (n/4)1/3−1leaves.We do not know whether this bound is tight,however we show that there are strongly connected digraphs with minimum in-degree 3in which every out-branching has at most O (√n )leaves.Unlike its undirected counterpart which has attracted a lot of attention in all algorithmic paradigms like approximation algorithms [24,31,33],parameterized algorithms [11,19,21],exact exponential time algorithms [20]and also combina-torial studies [16,25,27,30],the Directed Maximum Leaf Out-Branching problem has largely been neglected until recently.The only paper we are aware of is the very recent paper [18]that describes an O (√opt )-approximation algo-rithms for DMLOB.Our second combinatorial result relates the number of leaves in a DMLOB of a directed graph D with the pathwidth of its underlying graph UG(D ).(We postpone the definition of pathwidth till the next section.)If an undirected graph G contains a star K 1,k as a minor,then it is possible to construct a spanning tree with at least k leaves from this minor.Otherwise,there is no K 1,k minor in G ,and it is possible to prove that the pathwidth of G is O (k ).(See,e.g.[8].)Actually,a much more general result due to Bienstock et al.[10])is that any undirected graph of pathwidth at least k ,contains all trees on k vertices as a minor.We prove a result that can be viewed as a generalization of known bounds on the number of leaves in a spanning tree of an undirected graph in terms of its pathwidth,to strongly connected digraphs.We show that either a strongly connected digraph D has a DMLOB with at least k leaves or the pathwidth of UG(D )is O (k log k ).For an acyclic digraph with a DMLOB having k leaves,we prove that the pathwidth is at most 4k .This almost matches the boundSpanning directed trees with many leaves3 for undirected graphs.These combinatorial results are useful in the design of parameterized algorithms.In parameterized algorithms,for decision problems with input size n,and a parameter k,the goal is to design an algorithm with runtime f(k)n O(1),where f is a function of k alone.(For DMLOB such a parameter is the number of leaves in the out-tree.)Problems having such an algorithm are said to befixed parameter tractable(FPT).The book by Downey and Fellows[17]provides an introduction to the topic of parameterized complexity.For recent developments see the books by Flum and Grohe[23]and by Niedermeier[32].The parameterized version of DMLOB is defined as follows:Given a digraph D and a positive integral parameter k,does D contain an out-branching with at least k leaves?We denote the parameterized versions of DMLOB by k-DMLOB. If in the above definition we do not insist on an out-branching and ask whether there exists an out-tree with at least k leaves,we get the parameterized Di-rected Maximum Leaf Out-Tree problem(denoted k-DMLOT).Our combinatorial bounds,combined with dynamic programming on graphs of bounded pathwidth imply thefirst parameterized algorithms for k-DMLOB on strongly connected digraphs and acyclic digraphs.We remark that the algorith-mic results presented here also hold for all digraphs if we consider k-DMLOT rather than k-DMLOB.This answers an open question of Mike Fellows[14, 22,26].However,we mainly restrict ourselves to k-DMLOB for clarity and the harder challenges it poses,and we briefly consider k-DMLOT only in the last section.Very recently,using a modification of our approach,Bonsma and Dorn[12] proved that either an arbitrary digraph D has an out-branching with at most k leaves or the pathwidth of UG(D )is O(k3),where D is the digraph obtained from D by deleting all arcs not contained in any out-branching of D.The bound O(k3)is much larger than our bounds for strongly connected and acyclic di-graphs,but it suffices to allow Bonsma and Dorn to show that k-DMLOB is FPT,settling another open question of Fellows[22,26].This paper is organized as follows.In Section2we provide additional ter-minology and notation as well as some well-known results.We introduce locally optimal out-branchings in Section3.Bounds on the number of leaves in maxi-mum leaf out-branchings of strongly connected and acyclic digraphs are obtained in Section4.In Section5we prove upper bounds on the pathwidth of the un-derlying graph of strongly connected and acyclic digraphs that do not contain out-branchings with at least k leaves.In Section6we conclude with discussions and open problems.2PreliminariesLet D be a digraph.By V(D)and A(D)we represent the vertex set and arc set of D,respectively.An oriented graph is a digraph with no directed2-cycle. Given a subset V ⊆V(D)of a digraph D,let D[V ]denote the digraph induced by V .The underlying graph UG(D)of D is obtained from D by omitting all4N.Alon,F.V.Fomin,G.Gutin,M.Krivelevich,and S.Saurabhorientations of arcs and by deleting one edge from each resulting pair of parallel edges.The connectivity components of D are the subdigraphs of D induced by the vertices of components of UG(D ).A digraph D is strongly connected if,for every pair x,y of vertices there are directed paths from x to y and from y to x.A maximal strongly connected subdigraph of D is called a strong component .A vertex u of D is an in-neighbor (out-neighbor )of a vertex v if uv ∈A (D )(vu ∈A (D ),respectively).The in-degree d −(v )(out-degree d +(v ))of a vertex v is the number of its in-neighbors (out-neighbors).We denote by (D )the maximum number of leaves in an out-tree of a digraph D and by s (D )we denote the maximum possible number of leaves in an out-branching of a digraph D .When D has no out-branching,we write s (D )=0.The following simple result gives necessary and sufficient conditions for a digraph to have an out-branching.This assertion allows us to check whether s (D )>0in time O (|V (D )|+|A (D )|).Proposition 1([7]).A digraph D has an out-branching if and only if D has a unique strong component with no incoming arcs.Let P =u 1u 2...u q be a directed path in a digraph D .An arc u i u j of D is a forward (backward )arc for P if i ≤j −2(j <i ,respectively).Every backward arc of the type v i +1v i is called double .For a natural number n ,[n ]denotes the set {1,2,...,n }.A tree decomposition of an (undirected)graph G is a pair (X,U )where U is a tree whose vertices we will call nodes and X =({X i |i ∈V (U )})is a collection of subsets of V (G )such that 1. i ∈V (U )X i =V (G ),2.for each edge {v,w }∈E (G ),there is an i ∈V (U )such that v,w ∈X i ,and3.for each v ∈V (G )the set of nodes {i |v ∈X i }forms a subtree of U .The width of a tree decomposition ({X i |i ∈V (U )},U )equals max i ∈V (U ){|X i |−1}.The treewidth of a graph G is the minimum width over all tree decompositions of G .If in the definitions of a tree decomposition and treewidth we restrict U to be a path,then we have the definitions of path decomposition and pathwidth.We use the notation tw (G )and pw (G )to denote the treewidth and the pathwidth of a graph G .We also need an equivalent definition of pathwidth in terms of vertex sepa-rators with respect to a linear ordering of the vertices.Let G be a graph and let σ=(v 1,v 2,...,v n )be an ordering of V (G ).For j ∈[n ]put V j ={v i :i ∈[j ]}and denote by ∂V j all vertices of V j that have neighbors in V \V j .Setting vs (G,σ)=max i ∈[n ]|∂V i |,we define the vertex separation of G asvs (G )=min {vs (G,σ):σis an ordering of V (G )}.The following assertion is well-known.It follows directly from the results of Kirousis and Papadimitriou [29]on interval width of a graph,see also [28].Proposition 2([28,29]).For any graph G ,vs (G )=pw (G ).Spanning directed trees with many leaves53Locally Optimal Out-BranchingsOur bounds are based onfinding locally optimal out-branchings.Given a di-graph,D and an out-branching T,we call a vertex leaf,link and branch if its out-degree in T is0,1and≥2respectively.Let S+≥2(T)be the set of branch vertices,S+1(T)the set of link vertices and L(T)the set of leaves in the tree T. Let P2(T)be the set of maximal paths consisting of link vertices.By p(v)we denote the parent of a vertex v in T;p(v)is the unique in-neighbor of v.We calla pair of vertices u and v siblings if they do not belong to the same path from the root r in T.We start with the following well known and easy to observe facts.Fact1|S+≥2(T)|≤|L(T)|−1.Fact2|P2(T)|≤2|L(T)|−1.Now we define the notion of local exchange which is intensively used in our proofs.Definition3 -Arc Exchange( -AE)optimal out-branching:An out-branching T of a directed graph D with k leaves is -AE optimal if for all arc subsets F⊆A(T)and X⊆A(D)−A(T)of size ,(A(T)\F)∪X is either notan out-branching,or an out-branching with at most k leaves.In other words,Tis -AE optimal if it can’t be turned into an out-branching with more leaves by exchanging arcs.Let us remark,that for everyfixed ,an -AE optimal out-branching can be obtained in polynomial time.In our proofs we use only1-AE optimal out-branchings.We need the following simple properties of1-AE optimal out-branchings. Lemma1.Let T be an1-AE optimal out-branching rooted at r in a digraph D. Then the following holds:(a)For every pair of siblings u,v∈V(T)\L with d+T (p(v))=1,there is no arce=(u,v)∈A(D)\A(T);(b)For every pair of vertices u,v/∈L,d+T (p(v))=1,which are on the samepath from the root with dist(r,u)<dist(r,v)there is no arc e=(u,v)∈A(D)\A(T)(here dist(r,u)is the distance to u in T from the root r); (c)There is no arc(v,r),v/∈L such that the directed cycle formed by the(r,v)-path and the arc(v,r)contains a vertex x such that d+T(p(x))=1. Proof.The proof easily follows from the fact that the existence of any of these arcs contradicts the local optimality of T with respect to1-AE. 4Combinatorial BoundsWe start with a lemma that allows us to obtain lower bounds on s(D).6N.Alon,F.V.Fomin,G.Gutin,M.Krivelevich,and S.SaurabhLemma 2.Let D be a oriented graph of order n in which every vertex is of in-degree 2and let D have an out-branching.If D has no out-tree with k leaves,then n ≤4k 3.Proof.Let us assume that D has no out-tree with k leaves.Consider an out-branching T of D with p <k leaves which is 1-AE optimal.Let r be the root of T .We will bound the number n of vertices in T as follows.Every vertex of T is either a leaf,or a branch vertex,or a link vertex.By Facts 1and 2we already have bounds on the number of leaf and branch vertices as well as the number of maximal paths consisting of link vertices.So to get an upper bound on n in terms of k ,it suffices to bound the length of each maximal path consisting of link vertices.Let us consider such a path P and let x,y be the first and last vertices of P ,respectively.The vertices of V (T )\V (P )can be partitioned into four classes as follows:(a )ancestor vertices :the vertices which appear before x on the (r,x )-path of T ;(b )descendant vertices :the vertices appearing after the vertices of P on pathsof T starting at r and passing through y ;(c )sink vertices :the vertices which are leaves but not descendant vertices;(d )special vertices :none-of-the-above vertices.Let P =P −x ,let z be the out-neighbor of y on T and let T z be the subtree of T rooted at z .By Lemma 1,there are no arcs from special or ancestor vertices to the path P .Let uv be an arc of A (D )\A (P )such that v ∈V (P ).There are two possibilities for u :(i)u ∈V (P ),(ii)u ∈V (P )and uv is backward for P (there are no forward arcs for P since T is 1-AE optimal).Note that every vertex of type (i)is either a descendant vertex or a sink.Observe also that the backward arcs for P form a vertex-disjoint collection of out-trees with roots at vertices that are not terminal vertices of backward arcs for P .These roots are terminal vertices of arcs in which first vertices are descendant vertices or sinks.We denote by {u 1,u 2,...,u s }and {v 1,v 2,...,v t }the sets of vertices on P which have in-neighbors that are descendant vertices and sinks,respectively.Let the out-tree formed by backward arcs for P rooted at w ∈{u 1,...,u s ,v 1,...,v t }be denoted by T (w )and let l (w )denote the number of leaves in T (w ).Observe that the following is an out-tree rooted at z :T z ∪{(in (u 1),u 1),...,(in (u s ),u s )}∪si =1T (u i ),where {in (u 1),...,in (u s )}are the in-neighbors of {u 1,...,u s }on T z .This out-tree has at least s i =1l (u i )leaves and,thus, s i =1l (u i )≤k −1.Let us denote the subtree of T rooted at x by T x and let {in (v 1),...,in (v t )}be the in-neighbors of {v 1,...,v t }on T −V (T x ).Then we have the following out-tree:(T −V (T x ))∪{(in (v 1),v 1),...,(in (v t ),v t )}∪ti =1T (v i )Spanning directed trees with many leaves 7with at least t i =1l (v i )leaves.Thus, t i =1l (v i )≤k −1.Consider a path R =v 0v 1...v r formed by backward arcs.Observe that the arcs {v i v i +1:0≤i ≤r −1}∪{v j v +j :1≤j ≤r }form an out-tree withr leaves,where v +j is the out-neighbor of v j on P.Thus,there is no path ofbackward arcs of length more than k −1.Every out-tree T (w ),w ∈{u 1,...,u s }has l (w )leaves and,thus,its arcs can be decomposed into l (w )paths,each of length at most k −1.Now we can bound the number of arcs in all the trees T (w ),w ∈{u 1,...,u s },as follows: s i =1l (u i )(k −1)≤(k −1)2.We can similarly bound the number of arcs in all the trees T (w ),w ∈{v 1,...,v s }by (k −1)2.Recall that the vertices of P can be either terminal vertices of backward arcsfor P or vertices in {u 1,...,u s ,v 1,...,v t }.Observe that s +t ≤2(k −1)since s i =1l (u i )≤k −1and ti =1l (v i )≤k −1.Thus,the number of vertices in P is bounded from above by 1+2(k −1)+2(k −1)2.Therefore,n =|L (T )|+|S +≥2(T )|+|S +1(T )|=|L (T )|+|S +≥2(T )|+ P ∈P 2(T )|V (P )|≤(k −1)+(k −2)+(2k −3)(2k 2−2k +1)<4k 3.Thus,we conclude that n ≤4k 3.Theorem 4.Let D be a strongly connected digraph with n vertices.(a)If D is an oriented graph with minimum in-degree at least 2,then s (D )≥(n/4)1/3−1.(b)If D is a digraph with minimum in-degree at least 3,then s (D )≥(n/4)1/3−1.Proof.Since D is strongly connected,we have (D )= s (D )>0.Let T be an 1-AE optimal out-branching of D with maximum number of leaves.(a)Delete some arcs from A (D )\A (T ),if needed,such that the in-degree of each vertex of D becomes 2.Now the inequality s (D )≥(n/4)1/3−1follows from Lemma 2and the fact that (D )= s (D ).(b)Let P be the path formed in the proof of Lemma 2.(Note that A (P )⊆A (T ).)Delete every double arc of P ,in case there are any,and delete some more arcs from A (D )\A (T ),if needed,to ensure that the in-degree of each vertex of D becomes 2.It is not difficult to see that the proof of Lemma 2remains valid for the new digraph D .Now the inequality s (D )≥(n/4)1/3−1follows from Lemma 2and the fact that (D )= s (D ). Remark 5It is easy to see that Theorem 4holds also for acyclic digraphs D with s (D )>0.While we do not know whether the bounds of Theorem 4are tight,we can show that no linear bounds are possible.The following result is formulated for Part (b)of Theorem 4,but a similar result holds for Part (a)as well.8N.Alon,F.V.Fomin,G.Gutin,M.Krivelevich,and S.SaurabhTheorem6.For each t≥6there is a strongly connected digraph H t of order n=t2+1with minimum in-degree3such that0< s(H t)=O(t).Proof.Let V(H t)={r}∪{u i1,u i2,...,u i t|i∈[t]}andA(H t)=u i j u i j+1,u i j+1u i j|i∈[t],j∈{0,1,...,t−3}u i j u i j−2|i∈[t],j∈{3,4,...,t−2}u i j u i q|i∈[t],t−3≤j=q≤t,where u i0=r for every i∈[t].It is easy to check that0< s(H t)=O(t). 5Pathwidth of underlying graphs and parameterized algorithmsBy Proposition1,an acyclic digraph D has an out-branching if and only if D possesses a single vertex of in-degree zero.Theorem7.Let D be an acyclic digraph with a single vertex of in-degree zero. Then either s(D)≥k or the underlying undirected graph of D is of pathwidth at most4k and we can obtain this path decomposition in polynomial time. Proof.Assume that s(D)≤k−1.Consider a1-AE optimal out-branching T of D.Notice that|L(T)|≤k−1.Now remove all the leaves and branch vertices from the tree T.The remaining vertices form maximal directed paths consisting of link vertices.Delete thefirst vertices of all paths.As a result we obtain a collection Q of directed paths.Let H=∪P∈Q P.We will show that every arc uv with u,v∈V(H)is in H.Let P ∈Q.As in the proof of Lemma2,we see that there are no forward arcs for P .Since D is acyclic,there are no backward arcs for P .Suppose uv is an arc of D such that u∈R and v∈P ,where R and P are distinct paths from Q.As in the proof of Lemma2,we see that u is either a sink or a descendent vertex for P in T.Since R contains no sinks of T,u is a descendent vertex, which is impossible as D is acyclic.Thus,we have proved that pw(UG(H))=1.Consider a path decomposition of H of width1.We can obtain a path de-composition of UG(D)by adding all the vertices of L(T)∪S+≥2(T)∪F(T),whereF(T)is the set offirst vertices of maximal directed paths consisting of link ver-tices of T,to each of the bags of a path decomposition of H of width1.Observe that the pathwidth of this decomposition is bounded from above by|L(T)|+|S+≥2(T)|+|F(T)|+1≤(k−1)+(k−2)+(2k−3)+1≤4k−5. The bounds on the various sets in the inequality above follows from Facts1and 2.This proves the theorem. Corollary1.For acyclic digraphs,the problem k-DMLOB can solved in time 2O(k log k)·n O(1).Spanning directed trees with many leaves 9Proof.The proof of Theorem 7can be easily turned into a polynomial time algorithm to either build an out-branching of D with at least k leaves or to show that pw (UG(D ))≤4k and provide the corresponding path decomposition.A standard dynamic programming over the path (tree)decomposition (see e.g.[6])gives us an algorithm of running time 2O (k log k )·n O (1).The following simple lemma is well known,see,e.g.,[15].Lemma 3.Let T =(V,E )be an undirected tree and let w :V →R +∪{0}be a weight function on its vertices.There exists a vertex v ∈T such that the weight of every subtree T of T −v is at most w (T )/2,where w (T )= v ∈V w (v ).Let D be a strongly connected digraph with s (D )=λand let T be an out-branching of D with λleaves.Consider the following decomposition of T (called a β-decomposition )which will be useful in the proof of Theorem 8.Assign weight 1to all leaves of T and weight 0to all non-leaves of T .By Lemma 3,T has a vertex v such that each component of T −v has at most λ/2+1leaves (if v is not the root and its in-neighbor v −in T is a link vertex,then v −becomes a new leaf).Let T 1,T 2,...,T s be the components of T −v and let l 1,l 2,...,l s be the numbers of leaves in the components.Notice that λ≤ s i =1l i ≤λ+1(we may get a new leaf).We may assume that l s ≤l s −1≤···≤l 1≤λ/2+1.Let j be the first index such that j i =1l i ≥λ2+1.Considertwo cases:(a)l j ≤(λ+2)/4and (b)l j >(λ+2)/4.In Case (a),we haveλ+22≤j i =1l i ≤3(λ+2)4and λ−64≤s i =j +1l i ≤λ2.In Case (b),we have j =2andλ+2≤l 1≤λ+2and λ−2≤si =2l i ≤3λ+2.Let p =j in Case (a)and p =1in Case (b).Add to D and T a copy v of v (with the same in-and out-neighbors).Then the number of leaves in each of the out-treesT =T [{v }∪(∪pi =1V (T i ))]and T =T [{v }∪(∪s i =p +1V (T i ))]is between λ(1+o (1))/4and 3λ(1+o (1))/4.Observe that the vertices of T have at most λ+1out-neighbors in T and the vertices of T have at most λ+1out-neighbors in T (we add 1to λdue to the fact that v ‘belongs’to both T and T ).Similarly to deriving T and T from T ,we can obtain two out-trees from T and two out-trees from T in which the numbers of leaves are approximately between a quarter and three quarters of the number of leaves in T and T ,respectively.Observe that after O (log λ)‘dividing’steps,we will end up with O (λ)out-trees with just one leaf,i.e.,directed paths.These paths contain O (λ)copies of vertices of D (such as v above).After deleting the copies,we obtain a collection of O (λ)disjoint directed paths covering V (D ).10N.Alon,F.V.Fomin,G.Gutin,M.Krivelevich,and S.SaurabhTheorem8.Let D be a strongly connected digraph.Then either s(D)≥k or the underlying undirected graph of D is of pathwidth O(k log k).Proof.We may assume that s(D)<k.Let T be be a1-AE optimal out-branching.Consider aβ-decomposition of T.The decomposition process can be viewed as a tree T rooted in a node(associated with)T.The children of T in T are nodes(associated with)T and T ;the leaves of T are the directed paths of the decomposition.Thefirst layer of T is the node T,the second layer are T and T ,the third layer are the children of T and T ,etc.In what follows, we do not distinguish between a node Q of T and the tree associated with the node.Assume that T has t layers.Notice that the last layer consists of(some) leaves of T and that t=O(log k),which was proved above(k≤λ−1).Let Q be a node of T at layer j.We will prove thatpw(UG(D[V(Q)]))<2(t−j+2.5)k(1) Since t=O(log k),(1)for j=1implies that the underlying undirected graph of D is of pathwidth O(k log k).Wefirst prove(1)for j=t when Q is a path from the decomposition.LetW=(L(T)∪S+≥2(T)∪F(T))∩V(Q),where F(T)is the set offirst vertices ofmaximal paths of T consisting of link vertices.As in the proof of Theorem7,it follows from Facts1and2that|W|<4k.Obtain a digraph R by deleting from D[V(Q)]all arcs in which at least one end-vertex is in W and which are not arcs of Q.As in the proof of Theorem7,it follows from Lemma1and1-AE opti-mality of T that there are no forward arcs for Q in R.Let Q=v1v2...v q.For every j∈[q],let V j={v i:i∈[j]}.If for some j the set V j contained k vertices,say{v 1,v 2,···,vk },having in-neighbors in the set{v j+1,v j+2,...,v q},then Dwould contain an out-tree with k leaves formed by the path v j+1v j+2...v q to-gether with a backward arc terminating at v i from a vertex on the path for each 1≤i≤k,a contradiction.Thus vs(UG(D2[P]))≤k.By Proposition2,the pathwidth of UG(R)is at most k.Let(X1,X2,...,X s)be a path decomposition of UG(R)of width at most k.Then(X1∪W,X2∪W,...,X s∪W)is a path decomposition of UG(D[V(Q)])of width less than k+4k.Thus,pw(UG(D[V(Q)]))<5k(2) Now assume that we have proved(1)for j=i and show it for j=i−1. Let Q be a node of layer i−1.If Q is a leaf of T,we are done by(2).So,we may assume that Q has children Q and Q which are nodes of layer i.In the β-decomposition of T given before this theorem,we saw that the vertices of T have at mostλ+1out-neighbors in T and the vertices of T have at mostλ+1 out-neighbors in T .Similarly,we can see that(in theβ-decomposition of this proof)the vertices of Q have at most k out-neighbors in Q and the vertices of Q have at most k out-neighbors in Q (since k≤λ−1).Let Y denote the set of the above-mentioned out-neighbors on Q and Q ;|Y|≤2k.Delete from D[V(Q )∪V(Q )]all arcs in which at least one end-vertex is in Y and which do not belong to Q ∪QSpanning directed trees with many leaves11 Let G denote the obtained digraph.Observe that G is disconnected and G[V(Q )]and G[V(Q )]are components of G.Thus,pw(UG(G))≤b,where b=max{pw(UG(G[V(Q )])),pw(UG(G[V(Q )]))}<2(t−i+4.5)k(3) Let(Z1,Z2,...,Z r)be a path decomposition of G of width at most b.Then (Z1∪Y,Z2∪Y,...,Z r∪Y)is a path decomposition of UG(D[V(Q )∪V(Q )]) of width at most b+2k<2(t−i+2.5)k. Similar to the proof of Corollary1,we obtain the following:Corollary2.For a strongly connected digraph D,the problem k-DMLOB can be solved in time2O(k log2k)·n O(1).6Discussion and Open ProblemsIn this paper,we initiated the algorithmic and combinatorial study of the Di-rected Maximum Leaf Out-Branching problem.In particular,we showed that for every strongly connected digraph D of order n and with minimum in-degree at least3, s(D)=Ω(n1/3).An interesting open combinatorial question here is whether this bound is tight.If it is not,it would be interesting tofind the maximum number r such that s(D)=Ω(n r)for every strongly connected digraph D of order n and with minimum in-degree at least3.It follows from ourresults that13≤r≤12.We also provided an algorithm of time complexity2O(k log2k)·n O(1)which solves the k-DMLOB problem for a strongly connected digraph D.The algo-rithm is based on a combinatorial bound on the pathwidth of the underlying graph of D.Instead of using results from Section5,one can use Bodlaender’s algorithm[9]computing(forfixed k)tree decomposition of width k(if such a decomposition exists)in linear bined with our combinatorial bounds this yields a linear time algorithm for k-DMLOB(for a strongly connected di-graphs).However,the exponential dependence of k in Bodlaender’s algorithm is c k3for some large constant c.Finally,let us observe that while our results are for strongly connected di-graphs,they can be extended to a larger class of digraphs.Notice that (D)≥ s(D)for each digraph D.Let L be the family of digraphs D for which either s(D)=0or s(D)= (D).The following assertion shows that L includes a large number digraphs including all strongly connected digraphs and acyclic di-graphs(and,also,the well-studied classes of semicomplete multipartite digraphs and quasi-transitive digraphs,see[7]for the definitions).Proposition3([5]).Suppose that a digraph D satisfies the following property: for every pair R and Q of distinct strong components of D,if there is an arc from R to Q then each vertex of Q has an in-neighbor in R.Then D∈L.。
Eliminating stack overflow by abstract interpretation

In Proceedings of the3rd International Conference on Embedded Software,Philadelphia,PA,pages306–322,October13–15,2003.c Springer-Verlag. Eliminating stack overflow by abstract interpretationJohn Regehr Alastair Reid Kirk WebbSchool of Computing,University of UtahAbstract.An important correctness criterion for software running on embeddedmicrocontrollers is stack safety:a guarantee that the call stack does not over-flow.We address two aspects of the problem of creating stack-safe embeddedsoftware that also makes efficient use of memory:statically bounding worst-casestack depth,and automatically reducing stack memory requirements.Ourfirstcontribution is a method for statically guaranteeing stack safety by performingwhole-program analysis,using an approach based on context-sensitive abstractinterpretation of machine code.Abstract interpretation permits our analysis toaccurately model when interrupts are enabled and disabled,which is essentialfor accurately bounding the stack depth of typical embedded systems.We haveimplemented a stack analysis tool that targets Atmel A VR microcontrollers,andtested it on embedded applications compiled from up to30,000lines of C.Weexperimentally validate the accuracy of the tool,which runs in a few secondson the largest programs that we tested.The second contribution of this paper isa novel framework for automatically reducing stack memory requirements.Weshow that goal-directed global function inlining can be used to reduce the stackmemory requirements of component-based embedded software,on average,to40%of the requirement of a system compiled without inlining,and to68%of therequirement of a system compiled with aggressive whole-program inlining that isnot directed towards reducing stack usage.1IntroductionInexpensive microcontrollers are used in a wide variety of embedded applications such as vehicle control,consumer electronics,medical automation,and sensor networks. Static analysis of the behavior of software running on these processors is important for two main reasons:–Embedded systems are often used in safety critical applications and can be hard to upgrade once deployed.Since undetected bugs can be very costly,it is useful to attempt tofind software defects early.–Severe constraints on cost,size,and power make it undesirable to overprovision resources as a hedge against unforeseen demand.Rather,worst-case resource re-quirements should be determined statically and accurately,even for resources like memory that are convenient to allocate in a dynamic style.0 KB4 KB Without stack boundingWith static stack bounding Fig.1.Typical RAM layout for an embedded program with and without stack bounding.Without a bound,developers must rely on guesswork to determine the amount of storage to allocate to the stack.In this paper we describe the results of an experiment in applying static analysis techniques to binary programs in order to bound and reduce their stack memory re-quirements.We check embedded programs for stack safety :the property that they will not run out of stack memory at run time.Stack safety,which is not guaranteed by tra-ditional type-safe languages like Java,is particularly important for embedded software because stack overflows can easily crash a system.The transparent dynamic stack ex-pansion that is performed by general-purpose operating systems is infeasible on small embedded systems due to lack of virtual memory hardware and limited availability of physical memory.For example,8-bit microcontrollers typically have between a few tens of bytes and a few tens of kilobytes of RAM.Bounds on stack depth can also be usefully incorporated into executable programs,for example to assign appropriate stack sizes to threads or to provide a heap allocator with as much storage as possible without compromising stack safety.The alternative to static stack depth analysis that is currently used in industry is to ensure that memory allocated to the stack exceeds the largest stack size ever observed during testing by some safety margin.A large safety margin would provide good in-surance against stack overflow,but for embedded processors used in products such as sensor network nodes and consumer electronics,the degree of overprovisioning must be kept small in order to minimize per-unit product cost.Figure 1illustrates the rela-tionship between the testing-and analysis-based approaches to allocating memory for the stack.Testing-based approaches to software validation are inherently unreliable,and test-ing embedded software for maximum stack depth is particularly unreliable because its behavior is timing dependent:the worst observed stack depth depends on what code is executing when an interrupt is triggered and on whether further interrupts trigger before the first returns.For example,consider a hypothetical embedded system where the maximum stack depth occurs when the following events occur at almost the same time:1)the main program summarizes data once a second spending 100microseconds2at maximum stack depth;2)a timer interruptfires100times a second spending100mi-croseconds at maximum stack depth;and3)a packet arrives on a network interface up to10times a second;the handler spends100microseconds at maximum stack depth.If these events occur independently of each other,then the worst case will occur roughly once every10years.This means that the worst case will probably not be discovered during testing,but will probably occur in the real world where there may be many in-stances of the embedded system.In practice,the events are not all independent and the timing of some events can be controlled by the test environment.However,we would expect a real system to spend less time at the worst-case stack depth and to involve more events.Another drawback of the testing-based approach to determining stack depth is that it treats the system as a black box,providing developers with little or no feedback about how to best optimize memory usage.Static stack analysis,on the other hand,identifies the critical path through the system and also the maximum stack consumption of each function;this usually exposes obvious candidates for optimization.Using our method for statically bounding stack depth as a starting point,we have developed a novel way to automatically reduce the stack memory requirement of an em-bedded system.The optimization proceeds by evaluating the effect of a large number of potential program transformations in a feedback loop,applying only transformations that reduce the worst-case depth of the stack.Static analysis makes this kind of opti-mization feasible by rapidly providing accurate information about a program.Testing-based approaches to learning about system behavior,on the other hand,are slower and typically only explore a fraction of the possible state space.Our work is preceded by a stack depth analysis by Brylow et al.[3]that also per-forms whole-program analysis of executable programs for embedded systems.How-ever,while they focused on relatively small programs written by hand in assembly lan-guage,we focus on programs that are up to30times larger,and that are compiled from C to a RISC architecture.The added difficulties in analyzing larger,compiled programs necessitated a more powerful approach based on context-sensitive abstract interpreta-tion of machine code;we motivate and describe this approach in Section2.Section3 discusses the problems in experimentally validating the abstract interpretation and stack depth analysis,and presents evidence that the analysis provides accurate results.In Sec-tion4we describe the use of a stack bounding tool to support automatically reducing the stack memory consumption of an embedded system.Finally,we compare our research to previous efforts in Section5and conclude in Section6.2Bounding Stack DepthEmbedded system designers typically try to statically allocate resources needed by the system.This makes systems more predictable and reliable by providing a priori bounds on resource consumption.However,an almost universal exception to this rule is that memory is dynamically allocated on the call stack.Stacks provide a useful model of storage,with constant-time allocation and deallocation and without fragmentation.Fur-thermore,the notion of a stack is designed into microcontrollers at a fundamental level. For example,hardware support for interrupts typically pushes the machine state onto3the stack before calling a user-defined interrupt handler,and pops the machine state upon termination of the handler.For developers of embedded systems,it is important not only to know that the stack depth is bounded,but also to have a tight bound—one that is not much greater than the true worst-case stack depth.This section describes the whole-program analysis that we use to obtain tight bounds on stack depth.Our prototype stack analysis tool targets programs for the Atmel A VR,a popular family of microcontrollers.We chose to analyze binary program images,rather than source code,for a number of reasons:–There is no need to predict compiler behavior.Many compiler decisions,such as those regarding function inlining and register allocation,have a strong effect on stack depth.–Inlined assembly language is common in embedded systems,and a safe analysis must account for its effects.–The source code for libraries and real-time operating systems are commonly not available for analysis.–Since the analysis is independent of the compiler,developers are free to change compilers or compiler versions.In addition,the analysis is not fragile with respect to non-standard language extensions that embedded compilers commonly use to provide developers withfine-grained control over processor-specific features.–Adding a post-compilation analysis step to the development process presents de-velopers with a clean usage model.2.1Analysis Overview and MotivationThefirst challenge in bounding stack depth is to measure the contributions to the stack of each interrupt handler and of the main program.Since indirect function calls and recursion are uncommon in embedded systems[4],a callgraph for each entry point into the program can be constructed using standard analysis techniques.Given a callgraph it is usually straightforward to compute its stack requirement.The second,more difficult,challenge in embedded systems is accurately estimating interactions between interrupt handlers and the main program to compute a maximum stack depth for the whole system.If interrupts are disabled while running interrupt handlers,one can safely estimate the stack bound of a system containing interrupt handlers using this formula:stack bound depth(main)depth(interrupt)However,interrupt handlers are often run with interrupts enabled to ensure that other interrupt handlers are able to meet real-time deadlines.If a system permits at most one concurrent instance of each interrupt handler,the worst-case stack depth of a system can be computed using this formula:stack bound depth(main)depth(interrupt)4Fig.2.This fragment of assembly language for Atmel A VR microcontrollers motivates our approach to program analysis and illustrates a common idiom in embedded soft-ware:disable interrupts,execute a critical section,and then reenable interrupts only if they had previously been enabledUnfortunately,as we show in Section3,this simple formula often provides unneces-sarily pessimistic answers when used to analyze real systems where only some parts of some interrupt handlers run with interrupts enabled.To obtain a safe,tight stack bound for realistic embedded systems,we developed a two-part analysis.Thefirst must generate an accurate estimate of the state of the proces-sor’s interrupt mask at each point in the program,and also the effect of each instruction on the stack depth.The second part of the analysis—unlike thefirst—accounts for potential preemptions between interrupts handlers and can accurately bound the global stack requirement for a system.Figure2presents a fragment of machine code that motivates our approach to pro-gram analysis.Analogous code can be found in almost any embedded system:its pur-pose is to disable interrupts,execute a critical section that must run atomically with respect to interrupt handlers,and then reenable interrupts only if they had previously been enabled.There are a number of challenges in analyzing such code.First,effects of arithmetic and logical operations must be modeled with enough ac-curacy to track data movement through general-purpose and special-purpose registers. In addition,partially unknown data must be modeled.For example,analysis of the code fragment must succeed even when only a single bit of the CPU status register—the master interrupt control bit—is initially known.Second,dead edges in the control-flow graph must be detected and avoided.For ex-ample,when the example code fragment is called in a context where interrupts are dis-abled,it is important that the analysis conclude that the sei instruction is not executed since this would pollute the estimate of the processor state at subsequent addresses.Finally,to prevent procedural aliasing from degrading the estimate of the machine state,a context sensitive analysis must be used.For example,in some systems the code501 (a)Lattice for each bit in the machine stateand1000101111xor110101(b)Logical operations on abstract bits and combining machine states at merge pointsFig.3.Modeling machine states and operations in the abstract interpretationin Figure2is called with interrupts disabled by some parts of the system and is called with interrupts enabled by other parts of the system.With a context-insensitive ap-proach,the analysis concludes that since the initial state of the interruptflag can vary,thefinal state of the interruptflag can also vary and so analysis of both callers of the function would proceed with the interruptflag unknown.This can lead to large over-estimates in stack bounds since unknown values are propagated to any code that could execute after the call.With a context-sensitive analysis the two calls are analyzed sepa-rately,resulting in an accurate estimate of the interrupt state.The next section describes the abstract interpretation we have developed to meet these challenges.2.2Abstracting the Processor StateThe purpose of our abstract interpretation is to generate a safe,precise estimate of the state of the processor at each point in the program;this is a requirement forfindinga tight bound on stack depth.Designing the abstract interpretation boils down to twomain design decisions.First,how much of the machine state should the analysis model?For programs thatwe have analyzed,it is sufficient to model the program counter,general-purpose regis-ters,and several I/O registers.Atmel A VR chips contain32general-purpose registers and64I/O registers;each register stores eight bits.From the I/O space we model theregisters that contain interrupt masks and the processor status register.We do not model main memory or most I/O registers,such as those that implement timers,analog-to-digital conversion,and serial communication.Second,what is the abstract model for each element of machine state?We chose to model the machine at the bit level to capture the effect of bitwise operations on theinterrupt mask and condition code register—we had initially attempted to model themachine at word granularity and this turned out to lose too much information through conservative approximation.Each bit of machine state is modeled using the lattice de-picted in Figure3(a).The lattice contains the values0and1as well as a bottom element, ,that corresponds to a bit that cannot be proven to have value0or1at a particular program point.Figure3(b)shows abstractions of some common logical operators.Abstractions of operators should always return a result that is as accurate as possible.For example,6when all bits of the input to an instruction have the value0or1,the execution of the instruction should have the same result that it would have on a real processor.In this respect our abstract interpreter implements most of the functionality of a standard CPU simulator.For example,when executing the and instruction with as one argument and as the other argument,the result register will con-tain the value.Arithmetic operators are treated similarly,but re-quire more care because bits in the result typically depend on multiple bits in the input. Furthermore,the abstract interpretation must take into account the effect of instructions on processor condition codes,since subsequent branching decisions are made using these values.The example in Figure2illustrates two special cases that must be accounted for in the abstract interpretation.First,the add-with-carry instruction adc,when both of its arguments are the same register,acts as rotate-left-through-carry.In other words,it shifts each bit in its input one position to the left,with the leftmost bit going into the CPU’s carryflag and the previous carryflag going into the rightmost bit.Second,the exclusive-or instruction eor,when both of its arguments are the same register,acts like a clear instruction—after its execution the register is known to contain all zero bits regardless of its previous contents.2.3Managing Abstract Processor StatesAn important decision in designing the analysis was when to create a copy of the ab-stract machine state at a particular program point,as opposed to merging two abstract states.The merge operator,shown in Figure3(b),is lossy since a conservative approx-imation must always be made.We have chosen to implement a context-sensitive anal-ysis,which means that we fork the machine state each time a function call is made, and at no other points in the program.This has several consequences.First,and most important,it means that the abstract interpretation is not forced to make a conservative approximation when a function is called from different points in the program where the processor is in different states.In particular,when a function is called both with inter-rupts enabled and disabled,the analysis is not forced to conclude that the status of the interrupt bit is unknown inside the function and upon return from it.Second,it means that we cannot show termination of a loop implemented within a function.This is not a problem at present since loops are irrelevant to the stack depth analysis as long as there is no net change in stack depth across the loop.However,it will become a problem if we decide to push our analysis forward to bound heap allocation or execution time.Third, it means that we can,in principle,detect termination of recursion.However,our current implementation rarely does so in practice because most recursion is bounded by values that are stored on the stack—which our analysis does not model.Finally,forking the state at function calls means that the state space of the stack analyzer might become large.This has not been a problem in practice;the largest programs that we have ana-lyzed cause the analyzer to allocate about140MB.If memory requirements become a problem for the analysis,a relatively simple solution would be to merge program states that are identical or that are similar enough that a conservative merging will result in minimal loss of precision.72.4Abstract Interpretation and Stack Analysis AlgorithmsThe program analysis begins by initializing a worklist with all entry points into the program;entry points are found by examining the vector of interrupt handlers that is stored at the bottom of a program image,which includes the address of a startup routine that eventually jumps to main().For each item in the worklist,the analyzer abstractly interprets a single instruction.If the interpretation changes the state of the processor at that program point,items are added to the worklist corresponding to each live control flow edge leaving the instruction.Termination is assured because the state space for a program isfinite and because we never revisit states more than once.The abstract interpretation detects control-flow edges that are dead in a particular context,and also control-flow edges that are dead in all contexts.In many systems we have analyzed,the abstract interpretationfinds up to a dozen branches that are provably not taken.This illustrates the increased precision of our analysis relative to the dataflow analysis that an optimizing compiler has previously performed on the embedded pro-gram as part of a dead code elimination pass.In the second phase,the analysis considers there to be a controlflow edge from every instruction in the program to thefirst instruction of every interrupt handler that cannot be proven to be disabled at that program point.An interrupt is disabled if either the master interrupt bit is zero or the enable bit for the particular interrupt is zero.Once these edges are known,the worst-case stack depth for a program can be found using the method developed by Brylow et al.[3]:perform a depth-first search over controlflow edges,explicit and implicit,keeping track of the effect of each instruction on the stack depth,and also keeping track of the largest stack depth seen so far.A complication that we have encountered in many real programs is that interrupt handlers commonly run with all interrupts enabled,admitting the possibility that a new instance of an interrupt handler will be signaled before the previous instance terminates. From an analysis viewpoint reentrant interrupt handlers are a serious problem:systems containing them cannot be proven to be stack-safe without also reasoning about time. In effect,the stack bounding problem becomes predicated on the results of a real-time analysis that is well beyond the current capabilities of our tool.In real systems that we have looked at reentrant interrupt handlers are so common that we have provided a facility for working around the problem by permitting a de-veloper to manually assert that a particular interrupt handler can preempt itself only up to a certain number of times.Programmers appear to commonly rely on ad hoc real-time reasoning,e.g.,“this interrupt only arrives10times per second and so it cannot possibly interrupt itself.”In practice,most instances of this kind of reasoning should be considered to be designflaws—few interrupt handlers are written in a reentrant fashion so it is usually better to design systems where concurrent instances of a single handler are not permitted.Furthermore,stack depth requirements and the potential for race conditions will be kept to a minimum if there are no cycles in the interrupt preemp-tion graph,and if preemption of interrupt handlers is only permitted when necessary to meet a real-time deadline.82.5Other ChallengesIn this section we address other challenges faced by the stack analysis tool:loads into the stack pointer,self-modifying code,indirect branches,indirect stores,and recursive function calls.These features can complicate or defeat static analysis.However,em-bedded developers tend to make very limited use of them,and in our experience static analysis of real programs is still possible and,moreover,effective.We support code that increments or decrements the stack pointer by constants,for example to allocate or deallocate function-scoped data structures.Code that adds non-constants to the stack pointer(e.g.,to allocate variable sized arrays on the stack)would require some extra work to bound the amount of space added to the stack.We also do not support code that changes the stack pointer to new values in a more general way,as is done in the context switch routine of a preemptive operating system.The A VR has a Harvard architecture,making it possible to prove the absence of self-modifying code simply by ensuring that a program cannot reach a“store program memory”instruction.However,by reduction to the halting problem,self-modifying code cannot be reliably detected in the general case.Fortunately,use of self-modifying code is rare and discouraged—it is notoriously difficult to understand and also pre-cludes reducing the cost of an embedded system by putting the program into ROM.Our analysis must build a conservative approximation of the program’s controlflow graph.Indirect branches cause problems for program analysis because it can be diffi-cult to tightly bound the set of potential branch targets.Our approach to dealing with indirect branches is based on the observation that they are usually used in a structured way,and the structure can be exploited to learn the set of targets.For example,when analyzing TinyOS[6]programs,the argument to the function TOSit contained only14recursive loops.Our approach to dealing with recursion,therefore, is blunt:we require that developers explicitly specify a maximum iteration count for each recursive loop in a system.The analysis returns an unbounded stack depth if the developers neglect to specify a limit for a particular loop.It would be straightforward to port our stack analyzer to other processors:the anal-ysis algorithms,such as the whole-program analysis for worst-case stack depth,operate on an abstract representation of the program that is not processor dependent.However, the analysis would return pessimistic results for register-poor architectures such as the Motorola68HC11,since code for those processors makes significant use of the stack, and stack values are not currently modeled by our tool.In particular,we would proba-bly not obtain precise results for code equivalent to the code in Figure2that we used to motivate our approach.To handle register-poor architectures we are developing an approach to modeling the stack that is based on a simple type system for registers that are used as pointers into stack frames.2.6Using the Stack ToolWe have a prototype tool that implements our stack depth analysis.In its simplest mode of usage,the stack tool returns a single number:an upper bound on the stack depth for a system.For example:$./stacktool-w flybywire.elftotal stack requirement from global analysis=55To make the tool more useful we provide a number of extra features,including switching between context-sensitive and context-insensitive program analysis,creating a graphical callgraph for a system,listing branches that can be proven to be dead in all contexts,finding the shortest path through a program that reaches the maximum stack depth,and printing a disassembled version of the embedded program with annotations indicating interrupt status and worst-case stack depth at each instruction.These are all useful in helping developers understand and manually reduce stack memory consump-tion in their programs.There are other obvious ways to use the stack tool that we have not yet implemented. For example,using stack bounds to compute the maximum size of the heap for a sys-tem so that it stops just short of compromising stack safety,or computing a minimum safe stack size for individual threads in a multi-threaded embedded system.Ideally,the analysis would become part of the build process and values from the analysis would be used directly in the code being generated.3Validating the AnalysisWe used several approaches to increase our confidence in the validity of our analysis techniques and their implementations.103.1Validating the Abstract InterpretationTo test the abstract interpretation,we modified a simulator for A VR processors to dump the state of the machine after executing each instruction.Then,we created a separate program to ensure that this concrete state was“within”the conservative approximation of the machine state produced by abstract interpretation at that address,and that the simulator did not execute any instructions that had been marked as dead code by the static analysis.During early development of the analysis this was helpful infinding bugs and in providing a much more thorough check on the abstract interpretation than manual inspection of analysis results—our next-best validation technique.We have tested the current version of the stack analysis tool by executing at least100,000instructions of about a dozen programs,including several that were written specifically to stress-test the analysis,and did notfind any discrepancies.3.2Validating Stack BoundsThere are two important metrics for validating the bounds returned by the stack tool. Thefirst is qualitative:Does the tool ever return an unsafe result?Testing the stack tool against actual execution of about a dozen embedded applications has not turned up any examples where it has returned a bound that is less than an observed stack depth.This justifies some confidence that our algorithms are sound.Our second metric is quantitative:Is the tool capable of returning results that are close to the true worst-case stack depth for a system?The maximum observed stack depth,the worst-case stack depth estimate from the stack tool,and the(non-computable) true worst-case stack depth are related in this way:worst observed true worst estimated worstOne might hope that the precision of the analysis could be validated straightfor-wardly by instrumenting some embedded systems to make them report their worst ob-served stack depth and comparing these values to the bounds on stack depth.For several reasons,this approach produces maximum observed stack depths that are significantly smaller than the estimated worst case and,we believe,the true worst case.First,the timing issues that we discussed in Section1come into play,making it very hard to ob-serve interrupt handlers preempting each other even when it is clearly possible that they may do so.Second,even within the main function and individual interrupt handlers,it can be very difficult to force an embedded system to execute the code path that pro-duces the worst-case stack depth.Embedded systems often present a narrower external interface than do traditional applications,and it is correspondingly harder to force them to execute certain code paths using test inputs.While the difficulty of thorough test-ing is frustrating,it does support our thesis that static program analysis is particularly important in this domain.The71embedded applications that we used to test our analysis come from three families.Thefirst is Autopilot,a simple cyclic-executive style control program for an autonomous helicopter[10].The second is a collection of application programs that are distributed with TinyOS version0.6.1,a small operating system for networked sensor11。
A phase transition for the diameter of the configuration model Remco van der Hofstad

A phase transition for the diameter of the configuration modelRemco van der Hofstad∗Gerard Hooghiemstra†and Dmitri Znamenski‡August31,2007AbstractIn this paper,we study the configuration model(CM)with i.i.d.degrees.We establisha phase transition for the diameter when the power-law exponentτof the degrees satisfiesτ∈(2,3).Indeed,we show that forτ>2and when vertices with degree2are present withpositive probability,the diameter of the random graph is,with high probability,bounded frombelow by a constant times the logarithm of the size of the graph.On the other hand,assumingthat all degrees are at least3or more,we show that,forτ∈(2,3),the diameter of the graphis,with high probability,bounded from above by a constant times the log log of the size of thegraph.1IntroductionRandom graph models for complex networks have received a tremendous amount of attention in the past decade.See[1,22,26]for reviews on complex networks and[2]for a more expository account.Measurements have shown that many real networks share two fundamental properties. Thefirst is the fact that typical distances between vertices are small,which is called the‘small world’phenomenon(see[27]).For example,in the Internet,IP-packets cannot use more than a threshold of physical links,and if the distances in terms of the physical links would be large,e-mail service would simply break down.Thus,the graph of the Internet has evolved in such a way that typical distances are relatively small,even though the Internet is rather large.The second and maybe more surprising property of many networks is that the number of vertices with degree k falls offas an inverse power of k.This is called a‘power law degree sequence’,and resulting graphs often go under the name‘scale-free graphs’(see[15]for a discussion where power laws occur in the Internet).The observation that many real networks have the above two properties has incited a burst of activity in network modelling using random graphs.These models can,roughly speaking,be divided into two distinct classes of models:‘static’models and’dynamic’models.In static models, we model with a graph of a given size a snap-shot of a real network.A typical example of this kind of model is the configuration model(CM)which we describe below.A related static model, which can be seen as an inhomogeneous version of the Erd˝o s-R´e nyi random graph,is treated in great generality in[4].Typical examples of the‘dynamical’models,are the so-called preferential attachment models(PAM’s),where added vertices and edges are more likely to be attached to vertices that already have large degrees.PAM’s often focus on the growth of the network as a way to explain the power law degree sequences.∗Department of Mathematics and Computer Science,Eindhoven University of Technology,P.O.Box513,5600 MB Eindhoven,The Netherlands.E-mail:rhofstad@win.tue.nl†Delft University of Technology,Electrical Engineering,Mathematics and Computer Science,P.O.Box5031,2600 GA Delft,The Netherlands.E-mail:G.Hooghiemstra@ewi.tudelft.nl‡EURANDOM,P.O.Box513,5600MB Eindhoven,The Netherlands.E-mail:znamenski@eurandom.nlPhysicists have predicted that distances in PAM’s behave similarly to distances in the CM with similar degrees.Distances in the CM have attracted considerable attention(see e.g.,[14,16,17,18]), but distances in PAM’s far less(see[5,19]),which makes it hard to verify this prediction.Together with[19],the current paper takes afirst step towards a rigorous verification of this conjecture.At the end of this introduction we will return to this observation,but let usfirst introduce the CM and present our diameter results.1.1The configuration modelThe CM is defined as follows.Fix an integer N.Consider an i.i.d.sequence of random variables D1,D2,...,DN.We will construct an undirected graph with N vertices where vertex j has degreeD j.We will assume that LN =Nj=1D j is even.If LNis odd,then we will increase DNby1.Thissingle change will make hardly any difference in what follows,and we will ignore this effect.We will later specify the distribution of D1.To construct the graph,we have N separate vertices and incident to vertex j,we have D j stubs or half-edges.The stubs need to be paired to construct the graph.We number the stubs in a givenorder from1to LN .We start by pairing at random thefirst stub with one of the LN−1remainingstubs.Once paired,two stubs form a single edge of the graph.Hence,a stub can be seen as the left-or the right-half of an edge.We continue the procedure of randomly choosing and pairing the stubs until all stubs are connected.Unfortunately,vertices having self-loops,as well as multiple edges between vertices,may occur,so that the CM is a multigraph.However,self-loops are scarce when N→∞,as shown e.g.in[7].The above model is a variant of the configuration model[3],which,given a degree sequence,is the random graph with that given degree sequence.The degree sequence of a graph is the vector of which the k th coordinate equals the fraction of vertices with degree k.In our model,by the law of large numbers,the degree sequence is close to the distribution of the nodal degree D of which D1,...,DNare i.i.d.copies.The probability mass function and the distribution function of the nodal degree law are denoted byP(D=k)=f k,k=1,2,...,and F(x)= xk=1f k,(1.1)where x is the largest integer smaller than or equal to x.We pay special attention to distributions of the form1−F(x)=x1−τL(x),(1.2) whereτ>2and L is slowly varying at infinity.This means that the random variables D j obey a power law,and the factor L is meant to generalize the model.We denote the expectation of D byµ,i.e.,µ=∞k=1kf k.(1.3)1.2The diameter in the configuration modelIn this section we present the results on the bounds on the diameter.We use the abbreviation whp for a statement that occurs with probability tending to1if the number of vertices of the graph N tends to∞.Theorem1.1(Lower bound on diameter)Forτ>2,assuming that f1+f2>0and f1<1, there exists a positive constantαsuch that whp the diameter of the configuration model is bounded below byαlog N.A more precise result on the diameter in the CM is presented in[16],where it is proved that under rather general assumptions on the degree sequence of the CM,the diameter of the CM divided by log N converges to a constant.This result is also valid for related models,such as the Erd˝o s-R´e nyi random graph,but the proof is quite difficult.While Theorem1.1is substantially weaker,the fact that a positive constant times log N appears is most interesting,as we will discuss now in more detail.Indeed,the result in Theorem1.1is most interesting in the case whenτ∈(2,3).By[18, Theorem1.2],the typical distance forτ∈(2,3)is proportional to log log N,whereas we show here that the diameter is bounded below by a positive constant times log N when f1+f2>0and f1<1. Therefore,we see that the average distance and the diameter are of a different order of magnitude. The pairs of vertices where the distance is of the order log N are thus scarce.The proof of Theorem 1.1reveals that these pairs are along long lines of vertices with degree2that are connected to each other.Also in the proof of[16],one of the main difficulties is the identification of the precise length of these long thin lines.Our second main result states that whenτ∈(2,3),the above assumption that f1+f2>0is necessary and sufficient for log N lower bounds on the diameter.In Theorem1.2below,we assume that there exists aτ∈(2,3)such that,for some c>0and all x≥1,1−F(x)≥cx1−τ,(1.4) which is slightly weaker than the assumption in(1.2).We further define for integer m≥2and a real numberσ>1,CF =CF(σ,m)=2|log(τ−2)|+2σlog m.(1.5)Then our main upper bound on the diameter when(1.4)holds is as follows:Theorem1.2(A log log upper bound on the diameter)Fix m≥2,and assume that P(D≥m+1)=1,and that(1.4)holds.Then,for everyσ>(3−τ)−1,the diameter of the configuration model is,whp,bounded above by CFlog log N.1.3Discussion and related workTheorem1.2has a counterpart for preferential attachment models(PAM)proved in[19].In these PAM’s,at each integer time t,a new vertex with m≥1edges attached to it,is added to the graph. The new edges added at time t are then preferentially connected to older edges,i.e.,conditionally on the graph at time t−1,which is denoted by G(t−1),the probability that a given edge is connected to vertex i is proportional to d i(t−1)+δ,whereδ>−m is afixed parameter and d i(t−1)is the degree of vertex i at time t−1.A substantial literature exists,see e.g.[10],proving that the degree sequence of PAM’s in rather great generality satisfy a power law(see e.g.the references in [11]).In the above setting of linear preferential attachment,the exponentτis equal to[21,11]τ=3+δm.(1.6)A log log t upper bound on the diameter holds for PAM’s with m≥2and−m<δ<0,which, by(1.6),corresponds toτ∈(2,3)[19]:Theorem1.3(A log log upper bound on the diameter of the PAM)Fix m≥2andδ∈(−m,0).Then,for everyσ>13−τ,and withCG (σ)=4|log(τ−2)|+4σlog mthe diameter of the preferential attachment model is,with high probability,bounded above by CGlog log t,as t→∞.Observe that the condition m≥2in the PAM corresponds to the condition P(D≥m+1)=1 in the CM,where one half-edge is used to attach the vertex,while in PAM’s,vertices along a pathhave degree at least three when m≥2.Also note from the definition of CG and CFthat distancesin PAM’s tend to be twice as big compared to distances in the CM.This is related to the structure of the graphs.Indeed,in both graphs,vertices of high degree play a crucial role in shortest paths. In the CM vertices of high degree are often directly connected to each other,while in the PAM, they tend to be connected through a later vertex which links to both vertices of high degree.Unfortunately,there is no log t lower bound in the PAM forδ>0and m≥2,or equivalently τ>3.However,[19]does contain a(1−ε)log t/log log t lower bound for the diameter when m≥1 andδ≥0.When m=1,results exists on log t asymptotics of the diameter,see e.g.[6,24].The results in Theorems1.1–1.3are consistent with the non-rigorous physics predictions that distances in the PAM and in the CM,for similar degree sequences,behave similarly.It is an interesting problem,for both the CM and PAM,to determine the exact constant C≥0such that the diameter of the graph of N vertices divided by log N converges in probability to C.For the CM,the results in[16]imply that C>0,for the PAM,this is not known.We now turn to related work.Many distance results for the CM are known.Forτ∈(1,2) distances are bounded[14],forτ∈(2,3),they behave as log log N[25,18,9],whereas forτ>3 the correct scaling is log N[17].Observe that these results induce lower bounds for the diameter of the CM,since the diameter is the supremum of the distance,where the supremum is taken over all pairs of vertices.Similar results for models with conditionally independent edges exist,see e.g. [4,8,13,23].Thus,for these classes of models,distances are quite well understood.The authors in [16]prove that the diameter of a sparse random graph,with specified degree sequence,has,whp, diameter equal to c log N(1+o(1)),for some constant c.Note that our Theorems1.1–1.2imply that c>0when f1+f2>0,while c=0when f1+f2=0and(1.4)holds for someτ∈(2,3).There are few results on distances or diameter in PAM’s.In[5],it was proved that in the PAMand forδ=0,for whichτ=3,the diameter of the resulting graph is equal to log tlog log t (1+o(1)).Unfortunately,the matching result for the CM has not been proved,so that this does not allow us to verify whether the models have similar distances.This paper is organized as follows.In Section2,we prove the lower bound on the diameter formulated in Theorem1.1and in Section3we prove the upper bound in Theorem1.2.2A lower bound on the diameter:Proof of Theorem1.1We start by proving the claim when f2>0.The idea behind the proof is simple.Under the conditions of the theorem,one can,whp,find a pathΓ(N)in the random graph such that this path consists exclusively of vertices with degree2and has length at least2αlog N.This implies that the diameter is at leastαlog N,since the above path could be a cycle.Below we define a procedure which proves the existence of such a path.Consider the process of pairing stubs in the graph.We are free to choose the order in which we pair the free stubs,since this order is irrelevant for the distribution of the random graph.Hence,we are allowed to start with pairing the stubs of the vertices of degree2.Let N(2)be the number of vertices of degree2and SN(2)=(i1,...,i N(2))∈N N(2)the collection of these vertices.We will pair the stubs and at the same time define a permutationΠ(N)=(i∗1, (i)N(2))of SN(2),and a characteristicχ(N)=(χ1,...,χN(2))onΠ(N),whereχj is either0or1.Π(N)andχ(N)will be defined inductively in such a way that for any vertex i∗k ∈Π(N),χk=1,if and only if vertex i∗k is connected to vertex i∗k+1.Hence,χ(N)contains a substring ofat least2αlog N ones precisely when the random graph contains a pathΓ(N)of length at least 2αlog N.We initialize our inductive definition by i∗1=i1.The vertex i∗1has two stubs,we consider the second one and pair it to an arbitrary free stub.If this free stub belongs to another vertex j=i∗1 in SN(2)then we choose i∗2=j andχ1=1,otherwise we choose i∗2=i2,andχ1=0.Suppose forsome1<k≤N(2),the sequences(i∗1, (i)k )and(χ1,...,χk−1)are defined.Ifχk−1=1,then onestub of i∗k is paired to a stub of i∗k−1,and another stub of i∗kis free,else,ifχk−1=0,vertex i∗khastwo free stubs.Thus,for every k≥1,the vertex i∗k has at least one free stub.We pair this stubto an arbitrary remaining free stub.If this second stub belongs to vertex j∈SN (2)\{i∗1, (i)k},then we choose i∗k+1=j andχk=1,else we choose i∗k+1as thefirst stub in SN(2)\{i∗1, (i)k},andχk=0.Hence,we have defined thatχk=1precisely when vertex i∗k is connected to vertexi∗k+1.We show that whp there exists a substring of ones of length at least2αlog N in thefirsthalf ofχN ,i.e.,inχ12(N)=(χi∗1,...,χi∗N(2)/2).For this purpose,we couple the sequenceχ12(N)with a sequence B12(N)={ξk},whereξk are i.i.d.Bernoulli random variables taking value1withprobability f2/(4µ),and such that,whp,χi∗k ≥ξk for all k∈{1,..., N(2)/2 }.We write PNforthe law of the CM conditionally on the degrees D1,...,DN.Then,for any1≤k≤ N(2)/2 ,thePN-probability thatχk=1is at least2N(2)−CN(k)LN −CN(k),(2.1)where,as before,N(2)is the total number of vertices with degree2,and CN(k)is one plus thetotal number of paired stubs after k−1pairings.By definition of CN(k),for any k≤N(2)/2,we haveCN(k)=2(k−1)+1≤N(2).(2.2) Due to the law of large numbers we also have that whpN(2)≥f2N/2,LN≤2µN.(2.3) Substitution of(2.2)and(2.3)into(2.1)then yields that the right side of(2.1)is at leastN(2) LN ≥f24µ.Thus,whp,we can stochastically dominate all coordinates of the random sequenceχ12(N)with ani.i.d.Bernoulli sequence B12(N)of Nf2/2independent trials with success probability f2/(4µ)>0.It is well known(see e.g.[12])that the probability of existence of a run of2αlog N ones convergesto one whenever2αlog N≤log(Nf2/2) |log(f2/(4µ))|,for some0< <1.We conclude that whp the sequence B1(N)contains a substring of2αlog N ones.Since whpχN ≥B12(N),where the ordering is componentwise,whp the sequenceχNalso contains the samesubstring of2αlog N ones,and hence there exists a required path consisting of at least2αlog N vertices with degree2.Thus,whp the diameter is at leastαlog N,and we have proved Theorem 1.1in the case that f2>0.We now complete the proof of Theorem1.1when f2=0by adapting the above argument. When f2=0,and since f1+f2>0,we must have that f1>0.Let k∗>2be the smallest integer such that f k∗>0.This k∗must exist,since f1<1.Denote by N∗(2)the total number of vertices of degree k∗of which itsfirst k∗−2stubs are connected to a vertex with degree1.Thus,effectively, after thefirst k∗−2stubs have been connected to vertices with degree1,we are left with a structure which has2free stubs.These vertices will replace the N(2)vertices used in the above proof.It is not hard to see that whp N∗(2)≥f∗2N/2for some f∗2>0.Then,the argument for f2>0can be repeated,replacing N(2)by N∗(2)and f2by f∗2.In more detail,for any1≤k≤ N∗(2)/(2k∗) , the PN-probability thatχk=1is at least2N∗(2)−C∗N(k)LN −CN(k),(2.4)where C∗N(k)is the total number of paired stubs after k−1pairings of the free stubs incident to the N∗(2)vertices.By definition of C∗N(k),for any k≤N∗(2)/(2k∗),we haveCN(k)=2k∗(k−1)+1≤N∗(2).(2.5)Substitution of(2.5),N∗(2)≥f∗2N/2and the bound on LNin(2.3)into(2.4)gives us that the right side of(2.4)is at leastN∗(2) LN ≥f∗24µ.Now the proof of Theorem1.1in the case where f2=0and f1∈(0,1)can be completed as above.We omit further details. 3A log log upper bound on the diameter forτ∈(2,3)In this section,we investigate the diameter of the CM when P(D≥m+1)=1,for some integer m≥2.We assume(1.4)for someτ∈(2,3).We will show that under these assumptions CFlog log N isan upper bound on the diameter of the CM,where CFis defined in(1.5).The proof is divided into two key steps.In thefirst,in Proposition3.1,we give a bound on the diameter of the core of the CM consisting of all vertices with degree at least a certain power of log N.This argument is very close in spirit to the one in[25],the only difference being that we have simplified the argument slightly.After this,in Proposition3.4,we derive a bound on the distance between vertices with small degree and the core.We note that Proposition3.1only relies on the assumption in(1.4),while Proposition3.4only relies on the fact that P(D≥m+1)=1,for some m≥2.The proof of Proposition3.1can easily be adapted to a setting where the degrees arefixed, by formulating the appropriate assumptions on the number of vertices with degree at least x for a sufficient range of x.This assumption would replace(1.5).Proposition3.4can easily be adapted to a setting where there are no vertices of degree smaller than or equal to m.This assumption would replace the assumption P(D≥m+1)=1,for some m≥2.We refrain from stating these extensions of our results,and start by investigating the core of the CM.We takeσ>13−τand define the core CoreNof the CM to beCoreN={i:D i≥(log N)σ},(3.1)i.e.,the set of vertices with degree at least(log N)σ.Also,for a subset A⊆{1,...,N},we define the diameter of A to be equal to the maximal shortest path distance between any pair of vertices of A.Note,in particular,that if there are pairs of vertices in A that are not connected,then the diameter of A is infinite.Then,the diameter of the core is bounded in the following proposition:Proposition3.1(Diameter of the core)For everyσ>13−τ,the diameter of CoreNis,whp,bounded above by2log log N|log(τ−2)|(1+o(1)).(3.2)Proof.We note that(1.4)implies that whp the largest degree D(N)=max1≤i≤N D i satisfiesD(N)≥u1,where u1=N1τ−1(log N)−1,(3.3) because,when N→∞,P(D(N)>u1)=1−P(D(N)≤u1)=1−(F(u1))N≥1−(1−cu1−τ1)N=1−1−c(log N)τ−1NN∼1−exp(−c(log N)τ−1)→1.(3.4)DefineN (1)={i :D i ≥u 1},(3.5)so that,whp ,N (1)=∅.For some constant C >0,which will be specified later,and k ≥2we define recursively u k =C log N u k −1 τ−2,and N (k )={i :D i ≥u k }.(3.6)We start by identifying u k :Lemma 3.2(Identification of u k )For each k ∈N ,u k =C a k (log N )b k N c k ,(3.7)with c k =(τ−2)k −1τ−1,b k =13−τ−4−τ3−τ(τ−2)k −1,a k =1−(τ−2)k −13−τ.(3.8)Proof .We will identify a k ,b k and c k recursively.We note that,by (3.3),c 1=1τ−1,b 1=−1,a 1=0.By (3.6),we can,for k ≥2,relate a k ,b k ,c k to a k −1,b k −1,c k −1as follows:c k =(τ−2)c k −1,b k =1+(τ−2)b k −1,a k =1+(τ−2)a k −1.(3.9)As a result,we obtain c k =(τ−2)k −1c 1=(τ−2)k −1τ−1,(3.10)b k =b 1(τ−2)k −1+k −2 i =0(τ−2)i =1−(τ−2)k −13−τ−(τ−2)k −1,(3.11)a k =1−(τ−2)k −13−τ.(3.12)The key step in the proof of Proposition 3.1is the following lemma:Lemma 3.3(Connectivity between N (k −1)and N (k ))Fix k ≥2,and C >4µ/c (see (1.3),and (1.4)respectively).Then,the probability that there exists an i ∈N (k )that is not directly connected to N (k −1)is o (N −γ),for some γ>0independent of k .Proof .We note that,by definition,i ∈N (k −1)D i ≥u k −1|N (k −1)|.(3.13)Also,|N (k −1)|∼Bin N,1−F (u k −1) ,(3.14)and we have that,by (1.4),N [1−F (u k −1)]≥cN (u k −1)1−τ,(3.15)which,by Lemma 3.2,grows as a positive power of N ,since c k ≤c 2=τ−2τ−1<1τ−1.We use a concentration of probability resultP (|X −E [X ]|>t )≤2e −t 22(E [X ]+t/3),(3.16)which holds for binomial random variables[20],and gives that that the probability that|N(k−1)|is bounded below by N[1−F(u k−1)]/2is exponentially small in N.As a result,we obtain that for every k,and whpi∈N(k)D i≥c2N(u k)2−τ.(3.17)We note(see e.g.,[18,(4.34)]that for any two sets of vertices A,B,we have thatPN (A not directly connected to B)≤e−D A D BL N,(3.18)where,for any A⊆{1,...,N},we writeD A=i∈AD i.(3.19)On the event where|N(k−1)|≥N[1−F(u k−1)]/2and where LN≤2µN,we then obtain by(3.18),and Boole’s inequality that the PN-probability that there exists an i∈N(k)such that i is not directly connected to N(k−1)is bounded byNe−u k Nu k−1[1−F(u k−1)]2L N≤Ne−cu k(u k−1)2−τ4µ=N1−cC4µ,(3.20)where we have used(3.6).Taking C>4µ/c proves the claim. We now complete the proof of Proposition3.1.Fixk∗= 2log log N|log(τ−2)|.(3.21)As a result of Lemma3.3,we have whp that the diameter of N(k∗)is at most2k∗,because thedistance between any vertex in N(k∗)and the vertex with degree D(N)is at most k∗.Therefore,weare done when we can show thatCoreN⊆N(k∗).(3.22)For this,we note thatN(k∗)={i:D i≥u k∗},(3.23)so that it suffices to prove that u k∗≥(log N)σ,for anyσ>13−τ.According to Lemma3.2,u k∗=C a k∗(log N)b k∗N c k∗.(3.24) Because for x→∞,and2<τ<3,x(τ−2)2log x|log(τ−2)|=x·x−2=o(log x),(3.25) wefind with x=log N thatlog N·(τ−2)2log log N|log(τ−2)|=o(log log N),(3.26) implying that N c k∗=(log N)o(1),(log N)b k∗=(log N)13−τ+o(1),and C a k∗=(log N)o(1).Thus,u k∗=(log N)13−τ+o(1),(3.27)so that,by picking N sufficiently large,we can make13−τ+o(1)≤σ.This completes the proof ofProposition3.1. For an integer m≥2,we defineC(m)=σ/log m.(3.28)Proposition 3.4(Maximal distance between periphery and core)Assume that P (D ≥m +1)=1,for some m ≥2.Then,for every σ>(3−τ)−1the maximal distance between any vertex and the core is,whp ,bounded from above by C (m )log log N .Proof .We start from a vertex i and will show that the probability that the distance between i and Core N is at least C (m )log log N is o (N −1).This proves the claim.For this,we explore the neighborhood of i as follows.From i ,we connect the first m +1stubs (ignoring the other ones).Then,successively,we connect the first m stubs from the closest vertex to i that we have connected to and have not yet been explored.We call the arising process when we have explored up to distance k from the initial vertex i the k -exploration tree .When we never connect two stubs between vertices we have connected to,then the number of vertices we can reach in k steps is precisely equal to (m +1)m k −1.We call an event where a stub on the k -exploration tree connects to a stub incident to a vertex in the k -exploration tree a collision .The number of collisions in the k -exploration tree is the number of cycles or self-loops in it.When k increases,the probability of a collision increases.However,for k of order log log N ,the probability that more than two collisions occur in the k -exploration tree is small,as we will prove now:Lemma 3.5(Not more than one collision)Take k = C (m )log log N .Then,the P N -probab-ility that there exists a vertex of which the k -exploration tree has at least two collisions,before hittingthe core Core N ,is bounded by (log N )d L −2N ,for d =4C (m )log (m +1)+2σ.Proof .For any stub in the k -exploration tree,the probability that it will create a collision beforehitting the core is bounded above by (m +1)m k −1(log N )σL −1N .The probability that two stubs will both create a collision is,by similar arguments,bounded above by (m +1)m k −1(log N )σL −1N2.The total number of possible pairs of stubs in the k -exploration tree is bounded by[(m +1)(1+m +...+m k −1)]2≤[(m +1)m k ]2,so that,by Boole’s inequality,the probability that the k -exploration tree has at least two collisions is bounded by (m +1)m k 4(log N )2σL −2N .(3.29)When k = C (m )log log N ,we have that (m +1)m k 4(log N )2σ≤(log N )d ,where d is defined inthe statement of the lemma. Finally,we show that,for k = C (m )log log N ,the k -exploration tree will,whp connect to the Core N :Lemma 3.6(Connecting exploration tree to core)Take k = C (m )log log N .Then,the probability that there exists an i such that the distance of i to the core is at least k is o (N −1).Proof .Since µ<∞we have that L N /N ∼µ.Then,by Lemma 3.5,the probability that there exists a vertex for which the k -exploration tree has at least 2collisions before hitting the core is o (N −1).When the k -exploration tree from a vertex i does not have two collisions,then there are at least (m −1)m k −1stubs in the k th layer that have not yet been connected.When k = C (m )log log N this number is at least equal to (log N )C (m )log m +o (1).Furthermore,the expected number of stubs incident to the Core N is at least N (log N )σP (D 1≥(log N )σ)so that whp the number of stubs incident to Core N is at least (compare (1.4))12N (log N )σP (D 1≥(log N )σ)≥c 2N (log N )2−τ3−τ.(3.30)By(3.18),the probability that we connect none of the stubs in the k th layer of the k-exploration tree to one of the stubs incident to CoreNis bounded byexp−cN(log N)2−τ3−τ+C(m)log m2LN≤exp−c4µ(log N)2−τ3−τ+σ=o(N−1),(3.31)because whp LN /N≤2µ,and since2−τ3−τ+σ>1.Propositions3.1and3.4prove that whp the diameter of the configuration model is boundedabove by CF log log N,with CFdefined in(1.5).This completes the proof of Theorem1.2.Acknowledgements.The work of RvdH and DZ was supported in part by Netherlands Organ-isation for Scientific Research(NWO).References[1]R.Albert and A.-L.Barab´a si.Statistical mechanics of complex networks.Rev.Mod.Phys.74,47-97,(2002).[2]A.-L.Barab´a si.Linked,The New Science of Networks.Perseus Publishing,Cambridge,Mas-sachusetts,(2002).[3]B.Bollob´a s.Random Graphs,2nd edition,Academic Press,(2001).[4]B.Bollob´a s,S.Janson,and O.Riordan.The phase transition in inhomogeneous randomgraphs.Random Structures and Algorithms31,3-122,(2007).[5]B.Bollob´a s and O.Riordan.The diameter of a scale-free random binatorica,24(1):5–34,(2004).[6]B.Bollob´a s and O.Riordan.Shortest paths and load scaling in scale-free trees.Phys.Rev.E.,69:036114,(2004).[7]T.Britton,M.Deijfen,and A.Martin-L¨o f.Generating simple random graphs with prescribeddegree distribution.J.Stat.Phys.,124(6):1377–1397,(2006).[8]F.Chung and L.Lu.The average distances in random graphs with given expected degrees.A,99(25):15879–15882(electronic),(2002).[9]R.Cohen and S.Havlin.Scale free networks are ultrasmall,Physical Review Letters90,058701,(2003).[10]C.Cooper and A.Frieze.A general model of web graphs.Random Structures Algorithms,22(3):311–335,(2003).[11]M.Deijfen,H.van den Esker,R.van der Hofstad and G.Hooghiemstra.A preferential attach-ment model with random initial degrees.Preprint(2007).To appear in Arkiv f¨o r Matematik.[12]P.Erd¨o s and A.R´e nyi.On a new law of large numbers,J.Analyse Math.23,103–111,(1970).[13]H.van den Esker,R.van der Hofstad and G.Hooghiemstra.Universality forthe distance infinite variance random graphs.Preprint(2006).Available from http://ssor.twi.tudelft.nl/∼gerardh/[14]H.van den Esker,R.van der Hofstad,G.Hooghiemstra and D.Znamenski.Distances inrandom graphs with infinite mean degrees,Extremes8,111-141,2006.。
Upper bounds of the spectral radius of graphs in terms of genus

Let G be a simple graph with n vertices and orientable genus g and non-orien-
In 1978, A. J. Schwenk and R. J. Wilson [6] raised the question of what can be said about the eigenvalues of a planar graph. In 1988, the author [4] proved that the spectral radius of a planar graph with n vertices is less than - 5n&11. In 1993, Cao and Vince [2] proved that the spectral radius
* This research was supported by the national Natural Science Foundation of China under Grant 19671029.
153
0095-8956Â98 25.00
Copyright 1998 by Academic Press All rights of reproduction in any form reserved.
Lemma 1. Let G be a triangulation with n 4 vertices; then
AlgebraicGraphTheory

Algebraic Graph TheoryChris Godsil(University of Waterloo),Mike Newman(University of Ottawa)April25–291Overview of the FieldAlgebraic graph theory comprises both the study of algebraic objects arising in connection with graphs, for example,automorphism groups of graphs along with the use of algebraic tools to establish interesting properties of combinatorial objects.One of the oldest themes in the area is the investigation of the relation between properties of a graph and the spectrum of its adjacency matrix.A central topic and important source of tools is the theory of association schemes.An association scheme is,roughly speaking,a collection of graphs on a common vertex set whichfit together in a highly regular fashion.These arise regularly in connection with extremal structures:such structures often have an unex-pected degree of regularity and,because of this,often give rise to an association scheme.This in turn leads to a semisimple commutative algebra and the representation theory of this algebra provides useful restrictions on the underlying combinatorial object.Thus in coding theory we look for codes that are as large as possible, since such codes are most effective in transmitting information over noisy channels.The theory of association schemes provides the most effective means for determining just how large is actually possible;this theory rests on Delsarte’s thesis[4],which showed how to use schemes to translate the problem into a question that be solved by linear programming.2Recent Developments and Open ProblemsBrouwer,Haemers and Cioabˇa have recently shown how information on the spectrum of a graph can be used to proved that certain classes of graphs must contain perfect matchings.Brouwer and others have also investigated the connectivity of strongly-regular and distance-regular graphs.This is an old question,but much remains to be done.Recently Brouwer and Koolen[2]proved that the vertex connectivity of a distance-regular graph is equal to its valency.Haemers and Van Dam have worked on extensively on the question of which graphs are characterized by the spectrum of their adjacency matrix.They consider both general graphs and special classes,such as distance-regular graphs.One very significant and unexpected outcome of this work was the construction,by Koolen and Van Dam[10],of a new family of distance-regular graphs with the same parameters as the Grassmann graphs.(The vertices of these graphs are the k-dimensional subspaces of a vector space of dimension v over thefinitefield GF(q);two vertices are adjacent if their intersection has dimension k1.The graphs are q-analog of the Johnson graphs,which play a role in design theory.)These graphs showed that the widely held belief that we knew all distance-regular graphs of“large diameter”was false,and they indicate that the classification of distance-regular graphs will be more complex(and more interesting?)than we expected.1Association schemes have long been applied to problems in extremal set theory and coding theory.In his(very)recent thesis,Vanhove[14]has demonstrated that they can also provide many interesting results in finite geometry.Recent work by Schrijver and others[13]showed how schemes could used in combination with semidef-inite programming to provide significant improvements to the best known bounds.However these methods are difficult to use,we do not yet have a feel for we might most usefully apply them and their underlying theory is imperfectly understood.Work in Quantum Information theory is leading to a wide range of questions which can be successfully studied using ideas and tools from Algebraic Graph Theory.Methods fromfinite geometry provide the most effective means of constructing mutually unbiased bases,which play a role in quantum information theory and in certain cryptographic protocols.One important question is to determine the maximum size of a set of mutually unbiased bases in d-dimensional complex space.If d is a prime power the geometric methods just mentioned provide sets of size d+1,which is the largest possible.But if d is twice an odd integer then in most cases no set larger than three has been found.Whether larger sets exist is an important open problem. 3Presentation HighlightsThe talks mostlyfitted into one of four areas,which we discuss separately.3.1SpectraWillem Haemers spoke on universal adjacency matrices with only two distinct eigenvalues.Such matrices are linear combinations of I,J,D and A(where D is the diagonal matrix of vertex degrees and A the usual adjacency matrix).Any matrix usually considered in spectral graph theory has this form,but Willem is considering these matrices in general.His talk focussed on the graphs for which some universal adjacency matrix has only two eigenvalues.With Omidi he has proved that such a graph must either be strong(its Seidel matrix has only two eigenvalues)or it has exactly two different vertex degrees and the subgraph induced by the vertices of a given degree must be regular.Brouwer formulated a conjecture on the minimum size of a subset S of the vertices of a strongly-regular graph X such that no component of X\S was a single vertex.Cioabˇa spoke on his recent work with Jack Koolen on this conjecture.They proved that it is false,and there are four infinite families of counterexamples.3.2PhysicsAs noted above,algebraic graph theory has many applications and potential applications to problems in quantum computing,although the connection has become apparent only very recently.A number of talks were related to this connection.One important problem in quantum computing is whether there is a quantum algorithm for the graph isomorphism problem that would be faster than the classical approaches.Currently the situation is quite open.Martin Roetteler’s talk described recent work[1]on this problem.For our workshop’s viewpoint,one surprising feature is that the work made use of the Bose-Mesner algebra of a related association scheme; this connection had not been made before.Severini discussed quantum applications of what is known as the Lov´a sz theta-function of a graph.This function can be viewed as an eigenvalue bound and is closely related to both the LP bound of Delsarte and the Delsarte-Hoffman bound on the size of an independent set in a regular graph.Severini’s work shows that Lov´a sz’s theta-function provides a bound on the capacity of a certain channel arising in quantum communication theoryWork in quantum information theory has lead to interest in complex Hadamard matrices—these are d×d complex matrices H such that all entries of H have the same absolute value and HH∗=dI.Both Chan and Sz¨o ll˝o si dealt with these in their talks.Aidan Roy spoke on complex spherical designs.Real spherical designs were much studied by Seidel and his coworkers,because of their many applications in combinatorics and other areas.The complex case languished because there were no apparent applications,but now we have learnt that these manifest them-selves in quantum information theory under acronyms such as MUBs and SIC-POVMs.Roy’s talk focussedon a recent 45page paper with Suda [12],where (among other things)they showed that extremal complex designs gave rise to association schemes.One feature of this work is that the matrices in their schemes are not symmetric,which is surprising because we have very few interesting examples of non-symmetric schemes that do not arise as conjugacy class schemes of finite groups.3.3Extremal Set TheoryCoherent configurations are a non-commutative extension of association schemes.They have played a sig-nificant role in work on the graph isomorphism problem but,in comparison with association schemes,they have provided much less information about interesting extremal structures.The work presented by Hobart and Williford may improve matters,since they have been able to extend and use some of the standard bounds from the theory of schemes.Delsarte [4]showed how association schemes could be used to derive linear programs,whose values provided strong upper bounds on the size of codes.Association schemes have both a combinatorial structure and an algebraic structure and these two structures are in some sense dual to one another.In Delsarte’s work,both the combinatorial and the algebraic structure had a natural linear ordering (the schemes are both metric and cometric)and this played an important role in his work.Martin explained how this linearity constraint could be relaxed.This work is important since it could lead to new bounds,and also provide a better understanding of duality.One of Rick Wilson’s many important contributions to combinatorics was his use of association schemes to prove a sharp form of the Erd˝o s-Ko-Rado theorem [15].The Erd˝o s-Ko-Rado theorem itself ([5])can certainly be called a seminal result,and by now there are many analogs and extensions of it which have been derived by a range of methods.More recently it has been realized that most of these extensions can be derived in a very natural way using the theory of association schemes.Karen Meagher presented recent joint work (with Godsil,and with Spiga,[8,11])on the case where the subsets in the Erd˝o s-Ko-Rado theorem are replaced by permutations.It has long been known that there is an interesting association scheme on permutations,but this scheme is much less manageable than the schemes used by Delsarte and,prior to the work presented by Meagher,no useful combinatorial information had been obtained from it.Chowdhury presented her recent work on a conjecture of Frankl and F¨u redi.This concerns families F of m -subsets of a set X such that any two distinct elements of have exactly λelements in common.Frankl and F¨u redi conjectured that the m -sets in any such family contain at least m 2 pairs of elements of X .Chowdhury verified this conjecture in a number of cases;she used classical combinatorial techniques and it remains to see whether algebraic methods can yield any leverage in problems of this type.3.4Finite GeometryEric Moorhouse spoke on questions concerning automorphism groups of projective planes,focussing on connections between the finite and infinite case.Thus for a group acting on a finite plane,the number of orbits on points must be equal to the number of orbits on lines.It is not known if this must be true for planes of infinite order.Is there an infinite plane such that for each positive integer k ,the automorphism group has only finitely many orbits on k -tuples?This question is open even for k =4.Simeon Ball considered the structure of subsets S of a k -dimensional vector space over a field of order q such that each d -subset of S is a basis.The canonical examples arise by adding a point at infinity to the point set of a rational normal curve.These sets arise in coding theory as maximum distance separable codes and in matroid theory,in the study of the representability of uniform matroids (to mention just two applications).It is conjectured that,if k ≤q −1then |S |≤q +1unless q is even and k =3or k =q −1,in which case |S |≤q +2.Simeon presented a proof of this theorem when q is a prime and commented on the general case.He developed a connection to Segre’s classical characterization of conics in planes of odd order,as sets of q +1points such that no three are collinear.There are many analogs between finite geometry and extremal set theory;questions about the geometry of subspaces can often be viewed as q -analogs of questions in extremal set theory.So the EKR-problem,which concerns characterizations of intersecting families of k -subsets of a fixed set,leads naturally to a study of intersecting families of k -subspaces of a finite vector space.In terms of association schemes this means we move from the Johnson scheme to the Grassmann scheme.This is fairly well understood,with thebasic results obtained by Frankl and Wilson[6].But infinite geometry,polar spaces form an important topic. Roughly speaking the object here is to study the families of subspaces that are isotropic relative to some form, for example the subspaces that lie on a smooth quadric.In group theoretic terms we are now dealing with symplectic,orthogonal and unitary groups.There are related association schemes on the isotropic subspaces of maximum dimension.Vanhove spoke on important work from his Ph.D.thesis,where he investigated the appropriate versions of the EKR problem in these schemes.4Outcome of the MeetingIt is too early to offer much in the way of concrete evidence of impact.Matt DeV os observed that a conjecture of Brouwer on the vertex connectivity of graphs in an association scheme was wrong,in a quite simple way. This indicates that the question is more complex than expected,and quite possibly more interesting.That this observation was made testifies to the scope of the meeting.On a broader level,one of the successes of the meeting was the wide variety of seemingly disparate topics that were able to come together;the ideas of algebraic graph theory touch a number of things that would at first glance seem neither algebraic nor graph theoretical.There was a lively interaction between researchers from different domains.The proportion of post-docs and graduate students was relatively high.This had a positive impact on the level of excitement and interaction at the meeting.The combination of expert and beginning researchers created a lively atmosphere for mathematical discussion.References[1]A.Ambainis,L.Magnin,M.Roetteler,J.Roland.Symmetry-assisted adversaries for quantum state gen-eration,arXiv1012.2112,35pp.[2]A.E.Brouwer,J.H.Koolen.The vertex connectivity of a distance-regular graph.European bina-torics30(2009),668–673.[3]A.E.Brouwer,D.M.Mesner.The connectivity of strongly regular graphs.European binatorics,6(1985),215–216.[4]P.Delsarte.An algebraic approach to the association schemes of coding theory.Philips Res.Rep.Suppl.,(10):vi+97,1973.[5]P.Erd˝o s,C.Ko,R.Rado.Intersection theorems for systems offinite sets.Quart.J.Math.Oxford Ser.(2),12(1961),313–320.[6]P.Frankl,R.M.Wilson.The Erd˝o s-Ko-Rado theorem for vector binatorial Theory,SeriesA,43(1986),228–236.[7]D.Gijswijt,A.Schrijver,H.Tanaka.New upper bounds for nonbinary codes based on the Terwilligeralgebra and semidefinite binatorial Theory,Series A,113(2006),1719–1731. [8]C.D.Godsil,K.Meagher.A new proof of the Erd˝o s-Ko-Rado theorem for intersecting families of per-mutations.arXiv0710.2109,18pp.[9]C.D.Godsil,G.F.Royle.Algebraic Graph Theory,Springer-Verlag,(New York),2001.[10]J.H.Koolen,E.R.van Dam.A new family of distance-regular graphs with unbounded diameter.Inven-tiones Mathematicae,162(2005),189-193.[11]K.Meagher,P.Spiga.An Erdos-Ko-Rado theorem for the derangement graph of PGL(2,q)acting onthe projective line.arXiv0910.3193,17pp.[12]A.P.Roy,plex spherical Codes and designs,(2011),arXiv1104.4692,45pp.[13]A.Schrijver.New code upper bounds from the Terwilliger algebra and semidefinite programming.IEEETransactions on Information Theory51(2005),2859–2866.[14]F.Vanhove.Incidence geometry from an algebraic graph theory point of view.Ph.D.Thesis,Gent2011.[15]R.M.Wilson.The exact bound in the Erds-Ko-Rado binatorica,4(1984),247–257.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Improved Upper Bounds on the Reflexivity of Point Sets Eyal Ackerman∗Oswin Aichholzer†Bal´a zs Keszegh‡AbstractGiven a set S of n points in the plane,the reflexivity ofS,ρ(S),is the minimum number of reflex vertices in asimple polygonalization of S.Arkin et al.[4]proved thatρ(S)≤⌈n/2⌉for any set S,and conjectured that thetight upper bound is⌊n/4⌋.We show that the reflexivityof any set of n points is at most312n+O(1)≈0.4167n.1IntroductionGiven a set S of n≥3points in the plane,a polyg-onalization of S is a simple polygon P whose vertices are the points of S.Throughout this paper we assume that the points are in general position,that is,no three of them are collinear.A vertex of a simple polygon is reflex if the(interior)angle of the polygon at that ver-tex is greater thanπ.We denote byρ(P)the number of reflex vertices of a polygon P.The reflexivity of a set of points S,ρ(S),is the smallest number of reflex vertices any polygonalization of S must have.Further, we denote byρ(n)the maximum valueρ(S),such that S is a set of n points.Table1listsρ(n)for n≤10. These values were verified using a computer[2,4].n468100123∗School of Computing Science,Simon Fraser University,Burn-aby,BC,Canada,eyal@cs.sfu.ca†Institute for Software Technology,Graz University of Tech-nology,Austria,oaich@ist.tugraz.at Supported by the Austrian FWF Joint Research Project’Industrial Geometry’S9205-N12.‡Department of Mathematics and its Applications,Central European University,Budapest,Hungary,tphkeb01@phd.ceu.hu This work was done while visiting the School of Computing Sci-ence at Simon Fraser University.notion of reflexivity,its applications,and related prob-lems.Our main result is the following improvement for the upper bound ofρ(n).Theorem1ρ(n)≤3⌊n−212⌋+4.2Modified Reflexivity and Iterative Subdivision Recall that the convex hull of afinite set S of points, CH(S),is composed of the boundary and the interior of a convex polygon.By abuse of notation we will make no distinction between that polygon and CH(S).To prove a stronger variant of Theorem1wefirst introduce some notation.Let S be a set of points and let e be an edge of of CH(S).We denote byρe(S)the minimum possible number of reflex vertices in a polygonalization P of S, such that e is an edge of P.Similarly,¯ρ(S)=maxe is an edge of CH(S)ρe(S)¯ρ(n)=max|S|=n¯ρ(S)Obviouslyρ(n)≤¯ρ(n),so our goal is to derive good upper bounds for¯ρ(n).To this end wefirst provide a central lemma,which allows us to subdivide a point set in a way that we can consider the polygonalizations of the subsets rather independently.Lemma3Given an integer k>2,a set S of n>k points,and two points p,q∈S,such that pq is an edge of CH(S).Then,there exists a point t∈S\{p,q}and two sets L,R⊂S such that:1.L∪R=S,L∩R={t},q∈R,and p∈L;2.The triangle△pqt contains no other points from S;3.CH(R)∩CH(L)={t};1and4.|R|=k.Proof.Assume,w.l.o.g.,that p and q lie on the x-axis, such that p is to the left of q and all the remaining points are above the x-axis.Let t1be the point of S such that the angle∠t1pq is the smallest.Let S1be the set of points to the right of the line e1determined by q and t1.If|S1|>k−2,then define r1∈S1to be the point creating the(k−1)st smallest angle∠r1t1q, and denote by f1the line through t1and r1.Otherwise, if|S1|≤k−2let f1=e1.Set R1={q,t1}∪{p′∈S1|p′is to the right of f1}and L1=(S\R1)∪{t1}. We claim that t1,R1,and L1satisfy properties(1)–(3) of the lemma:(1)This property holds by the definition of R1and L1;(2)By the choice of t1the triangle△pqt1 is empty;(3)All the points in R1are to the right of f1, except for t1and possibly q.All the points in L1are to the left of f1,except for t1and possibly r1.However q and r1cannot both lie on f1.If|S1|≥k−2,then we also have that|R1|=k(either by the choice of r1or because|S1|=k−2,see Figure1for an illustration of the former case).Figure1:More than k−2points to the right of e1Figure2:Exactly k−2points to the right of e j Suppose now that|S1|<k−2.We define t i,e i, and S i for i>1and|S i−1|<k−2recursively.Let t i be the point that minimizes the angle∠t i pq among the points in L i−1\{t i−1}(note that this set of points is not empty if|S i−1|<k−2).Let e i be the line through q and t i,and let S i be the set of points to the right of e i.Similarly,we define r i,f i,R i,and L i.If |S i|>k−2define r i∈S i to be the point creating the (k−1)st smallest angle∠r i t i q,and denote by f i the line through t i and r i.Otherwise,if|S i|≤k−2set f i=e i. Set R i={q,t i}∪{p′∈S i|p′is to the right of f i}and L i=(S\R i)∪{t i}.Let j be the smallest integer such that|S j−1|<k−2and|S j|≥k−2(observe that j≤k−1since S i−1∪{t i−1}⊆S i if|S i|<k−2). We claim that t j,R j,and L j satisfy properties(1)–(4). Properties(1)–(3)are satisfied for the same arguments used for the case i=1.Notice that p must be to the left of f j by the choice of t j and since|S j−1|<k−2.By the choice of j we have|S j|≥k−2and thus,either there are exactly k−2points to the right of e j(see Figure2), or the choice of r j guarantees that|R j|=k. Note that Lemma3implies that pt is an edge of CH(L)and tq is an edge of CH(R),ing this fact we will apply the suggested subdivision in the next section in order to obtain ourfirst main result.3A New Upper BoundFigure3illustrates the subdivision obtained in the pre-vious section.The idea to prove an upper bound on ¯ρ(n)is to iteratively split a set into subsets of constant size,to obtain good polygonalizations for these sets,and then to combine them according to Lemma3.The basecase is covered by the following result.Figure3:The subdivision of S guaranteed by Lemma3 Lemma4Let S be a set of at most8points in the plane.Then¯ρ(S)≤2.Proof.The claim is clearly true for n≤5since any point on CH(S)is a convex vertex of any polygonaliza-tion of S.For6≤n≤8we prove the statement by a case-analysis over the size of the onion layers of S;see the full version of this paper for details.The correctness of the statement was also verified using a computer by checking all possible configurations of at most8points in general position. We are now ready for afirst upper bound on¯ρ(n).Theorem5¯ρ(n)≤3⌊n−27⌋+2=3⌊n−27⌋−1+1=3⌊n−2k−1⌋+l≤l+1111315ρ(n) 3..4 4..5 4..644 4..512⌋+4which implies Theorem2.Obviously determining¯ρ(n) for n≥14could further improve the constant of Corol-lary7,and we leave this for future research.5Further ResultsConjecture3.4in[4]states thatρ(n)=⌊n4⌋≤ρ(n)≤⌈n12⌋+2can be found in O(n log n)time.See the full version for a proof of this claim and an algorithm to generate the required subdivisions. Corollary6makes the following conjecture interest-ing.Conjecture2There is a constant c0such that¯ρ(n)≤ρ(n)+c0.Note that the stronger statement that¯ρ(S)≤ρ(S)+ O(1)for any set S might also hold.Conjecture2,if true,would mean that it is possible to get arbitrarily close to the best possible linear upper bound by checking onlyfinitely many small cases.In other words,suppose the conjecture holds and c is a constant such thatρ(n)≤cn.Then,for anyǫ>0 there is k=k(ǫ)such that if we verify thatρ(k)≤ck, then for n>k we haveρ(n)≤(c+ǫ)n+O(1).Indeed, k large enough such that ck+c0+112⌋+4reflex vertices,and such a polygo-nalization can be found in O(n log n)time.The basic idea of the proof is that by Lemma3we can subdivide S into somefixed-size parts and use a stronger result on each of these parts.It would be interesting tofind other applications of the subdivision suggested in Lemma3. It is challenging to determine the structure of sets maximizing the reflexivity forfixed cardinality.On the one hand we have the sets used in[4]to provide the bound ofρ(n)≥⌊n。