Discrete-math 23

Discrete-math 23

Forest #definition

Acyclic graph is called a forest

Tree #definition

Connected acyclic graph is called a tree

Leaf #definition

Vertex of degree 1 is called a leaf

Leaves of a tree #lemma

Let T be a tree with n2 verticesThen T has at least two leaves Proof:Let P be the longest simple path in TT has at least one edgeLength of this path is at least 1P=(v0,v1,,vk),v0v1Suppose by contradiction deg(v0)>1Then v0 has at least one more neighbor, let’s call it vT has no cyclesv is not in P(v,v0,,vk) is longer than P Contradiction!The same can be done for vkdeg(v0)=deg(vk)=1v0,vk are leaves of T

Paths between vertices #lemma

Let G=(V,E) be a simple graphLet v,uVThen there is a path from v to u iff there is a simple path from v to uProof:One direction is trivial, a simple path is a path and we are doneLet P(v,u)=(v0,v1,,vk),v=v0,u=vkLet w appear twice in the path, e.g. vi=w=vj,i<jThen P(v,u)=(v0,v1,,vi,vj+1,,vk)This process can be repeated until there are no repeating vertices in the pathNamely, until we get a simple path

Properties of the tree #theorem

G=(V,E)1.G is a tree2.G is maximal acyclic graph3.v,uV:!P(v,u) that is simple4.G is a minimal connected graphProve: 1234Proof for 12Let G be a treeG is connectedIt has at least n1 edgesAdding an edge would make mn which means that G{e} will have a cycleG is a maximal acyclic graphProof for 23Let G be a maximal acyclic graphLet v,uVSuppose that there is no path between v and uThen adding edge {v,u} will not create a cycleContradiction!P(v,u)P(v,u) that is simpleSuppose that there are two paths from v to u(v0,v1,,vk)(u0,u1,,uk)v0=uk=vu0=vk=uP(v,v):(v0,v1,,vk,u1,,uk) which is a cycleContradiction!!P(v,u) that is simpleProof for 34Let !P(v,u) that is simpleG is connectedSuppose {v,u}E:G{{v,u}} is connectedP(v,u)P(v,u)Two simple paths from v to uContradiction!G is a minimal connected graphProof for 41Let G be a minimal connected graphG is connectedSuppose G has a cycleRemoving any edge from this cycle would still leave G connectedContradiction!G has no cyclesG is a tree123411234

Number of edges in a tree #theorem

G=(V,E)1.G is a tree2.G is acyclic, |E|=n13.G is connected, |E|=n1Prove: 123Proof:Let G be a treeG is a treeG is connected and acyclic|E|n1If |E|n then G has a cycle|E|<n|E|=n112,13Let G be connected,|E|=n1Removing any edge will make the graph disconnectedG is a minimal connected graphG is a tree31Let G be acyclic,|E|=n1Suppose G is not connected# of components is at least 2Let Gv,Gu be two connected components of GThere is no path from v to uAdding edge {v,u} will make number of edges equal to n and not create a cycleG{{v,u}} has no cycleContradiction!G is connectedG is a tree211223123