MID SWEDEN UNIVERSITY NAT Examination 20 MA098G Discrete Mathematics (English) Time: 5 hours Date: 3 May 20 Pia Heidtmann The compulsory part of this examination consists of 8 questions. The maximum number of points available is 24. The points for each part of a question are indicated at the end of the part in [ ]-brackets. The final grade on the course is determined by how well the candidates demonstrate that they have met the learning outcomes on the course. Provided all learning outcomes have been met, the following guide values will be used to set the course grade: E: 9p D: 0p C: 4p B: 8p A: 22p The final question on the paper is the Aspect Question, it is optional and carries no value in terms of marks, but a good solution of this Aspect Question may raise a candidates grade by one grade. The candidates are advised that they must always show their working, otherwise they will not be awarded full marks for their answers. The candidates are further advised to start each of the nine questions on a new page and to clearly label all their answers. This is a closed book examination. No books, notes or mobile telephones are allowed in the examination room. Note that a collection of formulas is attached to the paper. Electronic calculators may be used provided they cannot handle formulas. The make and model used must be specified on the cover of your script. GOOD LUCK!! c NAT, Mid Sweden University MA098G
Question (a) Express the number t = 8 + 8 2 + 8 3 + 8 6 + 8 7 + 8 8 (i) in base 8; (ii) as a binary number; (iii) as a hexadecimal number. (b) Write the sum s = + 3 8 2 + 5 8 4 + 7 8 6 +... + 999 8 998 by using Σ-notation. (c) Showing your working, compute 20 (8n 5). n=0 Question 2 (a) Let A,B and C be subsets of the universal set U and consider the sets X = (A C) B and Y = (A B) (B C). (i) Shade the region corrsponding to X on a Venn diagram (ii) Justifying your answer, decide whether X = Y for all choices of A, B and C. [.5p] (b) Give the set by using rules of inclusion. M = {, 3, 5, 7, 9,, 3,...} [0.5p] c NAT, Mid Sweden University 2 MA098G
Question 3 (a) Consider the following proposition concerning an integer n 2. If 2 n is a composite number then n a composite number. (i) Write down the contrapositive of this statement. (ii) Is the proposition true? Justify your answer! [.5p] (b) Let f : Z + N be the function f(x) = (x )/2. (i) Compute f(5) and f(0). (ii) Is f one-to-one? (iii) Is f onto? (iv) Is f O(x)? Justify your answers! [2.5p] Question 4 (a) Explain what it means for a relation R on a set S to be (i) symmetric; (ii) transitive. (b) Let R be the relation on the set S = {v, w, x, y, z} given by R = {(v, v), (w, w), (v, w), (w, v), (x, y), (y, x), (z, y), (y, z), (x, z), (z, x)}. (i) Draw the relation digraph of R. (ii) Is the relation R symmetric? (iii) Is the relation R reflexive? (iv) Is the relation R transitive? Justify your answers! [2p] c NAT, Mid Sweden University 3 MA098G
Question 5 The sequence {u n } is given by the recurrence relation u n+ = u n 2 for n =, 2, 3,..., and the initial term u =. (a) Showing your working, use the recurrence relation to compute u 2, u 3, u 4 and u 5. (b) Prove by induction that m u n = m 2 for all m. n= [2p] Question 6 (a) (i) Define what it means to say that a b (mod 2). (ii) Which elements of Z 2 have a multiplicative inverse? (iii) Compute [5] [4] in Z 2. [,5p] (b) Showing your working, use Euclid s algorithm to find two integers s and t such that 376s + 673t =. (c) Justifying your answer, find all solutions [x] Z 673 to the equation [376] [x] = [4]. [0,5p] c NAT, Mid Sweden University 4 MA098G
Question 7 (a) Give an example of a bipartite, connected, 3-regular graph on 8 vertices. Show that your graph is bipartite by giving a 2-colouring of its vertices. (b) Use either Prim s or Kruskal s Algorithm to find a minimal spanning tree for the weighted graph below. Show carefully how the algorithm constructs the minimal spanning tree and give also the weight of the tree. [2p] a 2 5 x 3 d 2 6 4 g b 3 c 8 5 e 8 f 2 k 6 6 8 4 h 4 i Question 8 (a) Let X = {, 3, 5,..., 999}. How many elements are there in the set P(X)? [0,5p] (b) Suppose that we have a group consisting of 4 women and 8 men. In how many ways can a committee consisting of 5 people be chosen from this group if (i) all 4 women must be in it? (ii) at least one woman must be in it? (c) Suppose we must choose a set of random numbers from the set {, 2, 3,..., 600}. How many numbers must be chosen if we want to ensure that we always have among them a number divisible by either 3, 4 or 0? [,5p] Aspect Question (OPTIONAL) Let a, b and p be positive integers and assume that p is a prime. Prove that p a or p b if p ab. c NAT, Mid Sweden University 5 END OF EXAMINATION
MITTUNIVERSITETET NAT Tentamen 20 MA098G Diskret matematik (svenska) Skrivtid: 5 timmar Datum: 3 maj 20 Pia Heidtmann Den obligatoriska delen av denna tenta omfattar 8 frågor, där varje fråga kan ge 3 poäng. Delfrågornas poäng står angivna i marginalen inom [ ]-parenteser. Maximalt poängantal är 24. Betyg sätts efter hur väl lärandemålen är uppfyllda. Riktvärde för betygen är: E: 9p D: 0p C: 4p B: 8p A: 22p Därutöver innehållar skrivningen en frivillig aspektuppgift som kan höja betyget om den utförs väl med god motivering. Behandla högst en uppgift på varje papper! Till alla uppgifter skall fullständiga lösningar lämnas. Resonemang, ekvationslösningar och uträkningar får inte vara så knapphändiga, att de blir svåra att följa. Brister i framställningen kan ge poängavdrag även om slutresultatet är rätt! Hjälpmedel: Medföljande formelblad, skriv- och ritmaterial samt miniräknare som ej är symbolhanterande. Ange märke och modell på din miniräknare på omslaget till tentamen. LYCKA TILL!! c NAT, Mittuniversitetet MA098G
Uppgift (a) Uttryck talet t = 8 + 8 2 + 8 3 + 8 6 + 8 7 + 8 8 (i) i basen 8; (ii) som ett binärt tal; (iii) som ett hexadecimalt tal. (b) Ange summan s = + 3 8 2 + 5 8 4 + 7 8 6 +... + 999 8 998 m.h.a. summatecken. (c) Beräkna summan Visa dina uträkningar! 20 (8n 5). n=0 Uppgift 2 (a) Låt A,B och C vara delmängder av grundmängden U och betrakta mängderna X = (A C) B och Y = (A B) (B C). (i) Markera området för X i ett Venndiagram. (ii) Avgör om X = Y för alla val av A, B och C. Bevisa ditt svar. (b) Ange mängden M = {, 3, 5, 7, 9,, 3,...} med hjälp av inklusionsregler. [,5p] [0,5p] c NAT, Mittuniversitetet 2 MA098G
Uppgift 3 (a) Betrakta följande påstående om ett heltal n 2: Om 2 n är ett sammansatt tal så är n ett sammansatt tal. (i) Ange det kontrapositiva påståendet. (ii) Är påståendet sant? Bevisa ditt svar. [,5p] (b) Låt f : Z + N vara funktionen f(x) = (x )/2. (i) Beräkna f(5) och f(0). (ii) Är f injektiv? (iii) Är f surjektiv? (iv) Är f O(x)? Motivera dina svar! [2,5p] Uppgift 4 (a) Förklara vad som menas med att en relation R på en mängd S är (i) symmetrisk; (ii) transitiv. (b) Låt R vara följande relation på mängden S = {v, w, x, y, z}. R = {(v, v), (w, w), (v, w), (w, v), (x, y), (y, x), (z, y), (y, z), (x, z), (z, x)} (i) Rita relationsdigrafen för R. (ii) (iii) (iv) Är relationen R symmetrisk? Är relationen R reflexiv? Är relationen R transitiv? Motivera dina svar! [2p] c NAT, Mittuniversitetet 3 MA098G
Uppgift 5 En talföljd {u n } definieras genom rekursionsformeln u n+ = u n 2 för n =, 2, 3,..., och begynnelsevillkoret u =. (a) Använd rekursionsformeln för att beräkna u 2, u 3, u 4 och u 5. Visa dina uträkningar. (b) Bevisa med induktion att m u n = m 2 för alla m. n= [2p] Uppgift 6 (a) (i) Definiera vad som menas med att a b (mod 2). (ii) Vilka element i Z 2 har en multiplikativ invers? (iii) Beräkna [5] [4] i Z 2. [,5p] (b) Använd Euklides algoritm för att hitta två heltal s och t sådana att 376s + 673t =. Visa dina uträkningar! (c) Bestäm alla lösningar [x] Z 673 till ekvationen [376] [x] = [4]. Visa dina uträkningar! [0,5p] c NAT, Mittuniversitetet 4 MA098G
Uppgift 7 (a) Ge ett exempel på en bipartit, sammanhängande, 3-reguljär graf med 8 hörn. Visa att din graf är bipartit genom att ange en 2-färgning av hörnen. (b) Använd Prims eller Kruskals algoritm för att hitta ett minimalt uppspännande träd i den viktade grafen nedan. Redovisa stegen i algoritmen och ange vikten på trädet. [2p] a 2 5 x 3 d 2 6 4 g b 3 c 8 5 e 8 f 2 k 6 6 8 4 h 4 i Uppgift 8 (a) Låt X = {, 3, 5,..., 999}. Hur många element finns det i mängden P(X)? [0,5p] (b) En grupp består av 4 kvinnor och 8 män. På hur många sätt kan man välja en kommitte bestående av 5 personer från denna grupp om (i) alla 4 kvinnor skall ingå? (ii) minst en kvinna skall ingå? (c) Hur många olika heltal måste man välja från mängden {, 2, 3,..., 600} för att säkert få minst ett heltal som är delbart med något av talen 3, 4 eller 0? [,5p] Aspektuppgift (FRIVILLIG) Låt a, b och p vara positiva heltal och anta att p är ett primtal. Visa att p a eller p b om p ab. c NAT, Mittuniversitetet 5 SLUT PÅ TENTAMEN
MA098G Discrete Mathematics A Formulas and Symbols Some Symbols for Relations Between Numbers a = b a is equal to b a b a is not equal to b a < b a is strictly less than b a > b a is strictly greater than b a b a is less than or equal to b a b a is greater than or equal to b a b the integer a divides the integer b Some Laws of Integer Arithmetic Associative Laws: (a + b) + c = a + (b + c) (ab)c = a(bc) Commutative Laws: a + b = b + a ab = ba Distributive Law: a(b + c) = ab + ac Zero-Divisor Law: If ab = 0 then a = 0 or b = 0 Some Sets of Numbers the empty set { } Z the set of integers {..., 2,, 0,, 2,...} Z + the set of positive integers {, 2, 3,...} Z the set of negative integers {... 3, 2, } N the set of natural numbers {0,, 2,...} {x Z P } the set of all x in Z satisfying the property P {x Z : P } is the same as {x Z P } Q the set of rational numbers {p/q : p, q Z, q 0} Q + the set of positive rational numbers {x Q : x > 0} Q the set of negative rational numbers {x Q : x < 0} R the set of real numbers R + the set of positive real numbers {x R : x > 0} R the set of negative real numbers {x R : x < 0} [a, b] the closed interval from a to b, that is {x R : a x b} ]a, b[ the open interval from a to b, that is {x R : a < x < b} Some Set Theory Symbols A = B A is equal to B A B A is not equal to B a A the element a is in the set A a A the element a is not in the set A A B the union of A and B, that is {x : x A or x B} A B the intersection of A and B, that is {x : x A and x B} A B the set difference between A and B, that is {x A : x B} B the set complement of B, that is if B is a subset of the universal set U then B = {x U : x B} A B A is a subset of B, i.e. x A x B A B A is a proper subset of B, i.e. A B and A B A B the Cartesian product of A and B, i.e. the set of all ordered pairs (a, b) such that a A and b B P(A) the power set of A, i.e. the set of all subsets of A
Some Laws of Set Theory Associative Laws: (A B) C = A (B C) (A B) C = A (B C) Commutative Laws: A B = B A A B = B A Distributive Laws: A (B C) = (A B) (A C) A (B C) = (A B) (A C) De Morgan s Laws: A B = A B A B = A B Some Logic Symbols p not p p q p or q p q p and q p q p implies q p q p is equivalent with q Some Laws of Logic Associative Laws: (p q) r p (q r) (p q) r p (q r) Commutative Laws: p q q p p q q p Distributive Laws: p (q r) (p q) (p r) p (q r) (p q) (p r) De Morgan s Laws: (p q) p q (p q) p q Some Logical Equivalences for Proofs Proving that p q is equivalent to proving that p q and q p Proving that p q is equivalent to proving that q p Solving Quadratic Equations The quadratic equation ax 2 + bx + c = 0 where a 0 has the roots x = b ± b 2 4ac 2a Some Summation Formulas n r = r= n r 2 = r= n r=0 n(n + ) 2 n(n + )(2n + ) 6 x r = xn+ x where the real number x The positive primes 00 2, 3, 5, 7,, 3, 7, 9, 23, 29, 3, 37, 4, 43, 47, 53, 59, 6, 67, 7, 73, 79, 83, 89, 97