Exam 2024 (A)

1a

Let G=(V,E) be a simple graph1.Define tree2.Define distance between u,vV3.Define path4.Define cycle5.Define connected componentSolution:3.Path is a sequence of vertices: (v1,v1,,vk+1) such that:i[1,k]:{vi,vi+1}E,ij[1,k]:{vi,vi+1}{vj,vj+1}Length of the path is the number of edges in it, which is k4. Cycle is a path such that: v1=vk+12.Distance between vertices u,vVd(u,v) is the length of the shortest path between themIf there is no path between vertices, then d(u,v)=5.Let  be a relation on V such that:u,vV:uvd(u,v)<In other words: uv There is a path between u,v is an equivalence relation and its equivalence classes are called connected componentsConnected components induce subgraphs: Gu={[u],Eu}where Eu={{v,w}|v,w[u]}1.Connected graph is a graph with exactly one connected componentAcyclic graph is a graph with no cyclesTree is a connected acyclic graph

1b

Let G=(V,E) be a simple graphDefine the complement G of graph GTo be G=(V,E):E={{u,v}|u,vV,{u,v}E}Prove: for any simple graph with n5 vertices either G or G has a cycleProof:|E|=n(n1)2|E|Let |E|nG has a cycleLet |E|<n|E|>n(n1)2n=n2n2n2=n(n3)2n5n3222=1n(n3)2n|E|>nG has a cycle

2

A is a set,|A|1Let f:P(A)×P(A)P(P(A))B,CA:f(B,C)={D|DBC}Prove or disprove:1.It is possible that f is injective2.It is possible that f is surjectiveDisproof for 1:Let AAaAf(,{a})=f({a},)=P()={}A:f is not injectiveDisproof for 2:Let AAaA{a}P(A){{a}}P(P(A))X:P(X)B,CA:f(B,C)=P(BC)f(B,C)f(B,C){{a}}A:f is nor surjectiveLet A be a set, |A|1f:P(A)×P(A)P(P(A)),f(B,C)={D|DBC}In other words f(B,C)=P(BC)Dom(f)=P(A)×P(A)Range(f)=P(P(A))Prove or disprove: It is possible for f to be injectiveIn other words A:f is injectiveDisproof:Let A,|A|1Let aAf({a},)=f(,{a})={}A:f is not injectiveProve or disprove: It is possible for f to be surjectiveIn other words A:f is surjectiveDisproof:P(P(A))f(B,C)=P(BC)f(B,C)f(B,C)Range(f),Im(f)Im(f)Range(f)A:f is not surjective

3

Let A be a setLet f:AALet BALet B1=B,nN:Bn+1=f1[Bn]1.Prove: if for any BA:nNBn= then f has no fixed points2.Prove or disprove: f has no fixed pointsBA:nNBn=Proof for 1:If A is an empty set, then f is an empty function which has no fixed pointsLet ALet BA:nNBn=Let f has a fixed point xLet B={x}xf[B]Base case. Let n=1xBxB1Induction step. Let xBnBn+1=f1[Bn]xBn,f(x)=xxf1[Bn]=Bn+1By induction: xnNBnnNBnContradiction!f has no fixed pointsDisproof for 2:Let A=NLet f(n)=2nLet B=NBase case. Let n=1B1=B=NInduction step. Let Bn=NBn+1=f1[Bn]=f1[N]Let xf1[N]xNf1[N]NLet xN2xNf(x)=2xxf1[{2x}]f1[N]Nf1[N]Bn+1=f1[N]=NBy Induction nN:Bn=NnNBn=N

4

5

Let A be a setA is called transitive if xA:yx:yA

5a

Find an example of a transitive and a non-transitive setsSolution:Let A1=A1 is vacuously transitiveLet A={{1}}1Ax={1}A:y=1x:yAA is not transitive

5b

Let {Ai}iI be family of transitive setsProve: iIAi is transitiveProof:Let xiIAiiI:xAiiI:yx:yAiyx:yiIAiiIAi is transitive

5c

Let A be a setLet A1=ALet nN:An+1=An{y|xAn:yx}

5c.1

Prove: nNAn is transitiveProof:Let xnNAnnN:xAnxAnyx:yAn+1ynNAnnNAn is transitive

5c.2

Let B be transitive and ABProve: nNAnBProof:Base case. Let n=1A1=AA1BInduction step. Let AnBAn+1=An{y|xAn:yx}B is transitivexB:yx:yBAnBxAn:yx:yB{y|xAn:yx}BAn+1=An{y|xAn:yx}BBy Induction: nN:AnBnNAnB