MID SWEDEN UNIVERSITY Pia Heidtmann NAT Examination 2012 MA095G/MA098G Discrete Mathematics (English) Duration: 5 hours Date: 13 March 2012 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: 10p C: 14p B: 18p 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 candidate s 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 label all their answers clearly. This is a closed book examination. No books, notes or mobile telephones are allowed in the examination room. Note that Mathematical Formula Collection Edition 2 is allowed on this tenta and will be available in the examination room. 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 1 PLEASE TURN OVER
Question 1 (a) Express the binary number (10101011100101) 2 (i) in base 10; (ii) as a hexadecimal number. [1] (b) Let p and q be the following propositions concerning positive integers n. p : n < 20 q : gcd(n, 20) < 20. Say whether the following propositions are true or false, and give a counterexample to each false proposition. (i) p q; (ii) q p; (iii) p if q; (iv) p only if q. [2] Question 2 Let R be the relation on S = {w, x, y, z} which only contains the following related pairs: wrw, wrx, wry, wrz, xrx, yrw, yrz, zrw. (a) Draw a directed graph modelling the relation R. (b) The relation R is not symmetric. Which minimal set of pairs should be added to R to make it symmetric? (c) The relation R is not reflexive. Which minimal set of pairs should be added to R to make it reflexive? (d) The relation R is not transitive. Which minimal set of pairs should be added to R to make it transitive? [2] Question 3 Consider the sequence defined by the recurrence relation x n = 4(x n 1 x n 2 ) for n 2, and initial terms x 0 = 1 and x 1 = 1. (a) Showing your working, compute x 2, x 3, x 4 and x 5. [0.5] (b) Prove by induction that x n = (2 n)2 n 1 for all n 0. [2] c NAT, Mid Sweden University 2 MA095G/MA098G
Question 4 (a) A PIN-code for a credit card consists of an ordered sequence of 4 digits from the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. How many such PIN-codes have precisely two identical digits? [1] (b) How many partitions of the set {1, 2,..., 10} exist with each part containing exactly two elements? [1] (c) How many positive integers less than 700 are (i) a multiple of 7? (ii) a multiple of 3, 5 or 7? [1] Question 5 Use Dijkstra s algorithm to find the shortest path from vertex x to vertex y in the following weighted graph. Show carefully the order in which the vertices are being processed by the algorithm, how the vertices are labelled and how these labels change. Give also the length of the shortest path. [2] a 1 b 3 c 2 2 6 1 1 7 6 x d 6 1 e 7 f 1 y 4 1 1 4 6 7 2 g 4 h 4 i Question 6 (a) Consider the function f : Z Z given by the rule f(x) = 3x 17. (i) Give the range of f. (ii) Show that f is O(x). [1.5] (b) (i) State the Pigeonhole Principle. (ii) Suppose that A and B are finite sets such that A > B. Explain why there does not exist a function g : A B which is one-to-one (injective). [1.5] c NAT, Mid Sweden University 3 PLEASE TURN OVER
Question 7 (a) Use Euclid s Algorithm to show that there are integers s and t such that 3021s + 1203t = 6. [2] (b) Showing your working, find all solutions [x] Z 3012 to the equation [1203] [x] = [6]. [1] (c) Say whether the following propositions are true or false, giving a counterexample to each false proposition. (i) For all positive integers a, b we have that if 3021 ab then 3021 a or 3021 b. (ii) If 15x 15y (mod 3021) then x y (mod 3021); (iii) If 15x 15y (mod 1013) then x y (mod 1013). Question 8 [1.5] (a) For each of the following statements, decide whether it is true or false. Justify your answers. (i) There exists a simple graph with degree sequence 2,2,3,3,3,4,4; (ii) There exists a simple graph on 7 vertices and 20 edges. [1] (b) When is a graph called a tree? [0.5] (c) Suppose that G is a connected, simple graph on n vertices. How many edges are there in a spanning tree of G? [0.5] (d) Let G be a connected, simple graph on n vertices and n 1 edges. Explain why G is a tree. [1.5] (e) Construct an example of a simple graph H on 7 vertices and 6 edges that is not a tree. [0.5] Uppgift A Prove that your answer to Question 8(c) is correct. c NAT, Mid Sweden University 4 END OF EXAMINATION
Pia Heidtmann MITTUNIVERSITETET NAT Tentamen 2012 MA095G/MA098G Diskret Matematik (svenska) Skrivtid: 5 timmar Datum: 13 mars 2012 Den obligatoriska delen av denna tenta omfattar 8 frågor. 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ärden för betygen är: E: 9p D: 10p C: 14p B: 18p A: 22p Därutöver innehåller 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: Matematisk Formelsamling (delas ut), 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 1 VÄND
Uppgift 1 (a) Uttryck det binära talet (10101011100101) 2 (i) i basen 10; (ii) som ett hexadecimaltal. [1] (b) Låt p och q vara följande två påståenden om positiva heltal n: p : n < 20 q : sgd(n, 20) < 20. Ange om följande påståenden är sanna eller falska och ge ett motexempel till alla falska påståenden. (i) p q; (ii) q p; (iii) p om q; (iv) p endast om q. [2] Uppgift 2 Låt R vara relationen på mängden S = {w, x, y, z} som endast innehåller följande relaterade par: wrw, wrx, wry, wrz, xrx, yrw, yrz, zrw. (a) Rita en riktad graf som beskriver relationen R. (b) Relationen R är inte symmetrisk. Ange den minsta mängden av par som måste läggas till R för att R skall bli symmetrisk. (c) Relationen R är inte reflexiv. Ange den minsta mängden av par som måste läggas till R för att R skall bli reflexiv. (d) Relationen R är inte transitiv. Ange den minsta mängden av par som måste läggas till R för att R skall bli transitiv. [2] Uppgift 3 En talföljd definieras genom rekursionsformeln x n = 4(x n 1 x n 2 ) där n 2, och begynnelsevillkoren x 0 = 1 och x 1 = 1. (a) Bestäm x 2, x 3, x 4 och x 5. Visa dina uträkningar. [0.5] (b) Bevisa med induktion att x n = (2 n)2 n 1 för alla n 0. [2] c NAT Mittuniversitetet 2 MA095G/MA098G
Uppgift 4 (a) En PIN-kod för ett kreditkort består av en ordnad sekvens av 4 siffror från mängden {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Hur många PIN-koder har precis två siffror som är lika? [1] (b) Hur många partitioner finns det av mängden {1, 2,..., 10} om varje del ska innehålla precis två element? [1] (c) Hur många positiva heltal mindre än 700 är (i) en multipel av 7? (ii) en multipel av 3, 5 eller 7? [1] Uppgift 5 Använd Dijkstras algoritm för att bestämma en kortaste stig från hörn x till hörn y i följande viktade graf. Redovisa gången i lösningen, dvs. ur din lösning ska det framgå i vilken ordning hörnen behandlas, hur hörnen märks och hur märkena ändras när du arbetar dig igenom algoritmen. Ange också kortaste stigens längd. [2] a 1 b 3 c 2 x 2 6 1 1 7 6 6 d 1 e 7 f 1 y 4 1 1 4 6 7 2 g 4 h 4 i Uppgift 6 (a) Låt f : Z Z vara funktionen f(x) = 3x 17. (i) Ange värdemängden till f. (ii) Visa att f är O(x). [1.5] (b) (i) Formulera Dirichlets Lådprincip. (ii) Antag att A och B är ändliga mängder sådana att A > B. Förklara varför det inte existerar en funktion g : A B som är injektiv. [1.5] c NAT Mittuniversitetet 3 VÄND
Uppgift 7 (a) Använd Euklides algoritm för att visa att det finns heltal s och t sådana att 3021s + 1203t = 6. [2] (b) Bestäm alla lösningar [x] Z 3012 till ekvationen [1203] [x] = [6]. Visa dina uträkningar. [1] (c) Ange om följande påståenden är sanna eller falska och ge ett motexempel till alla falska påståenden. (i) För alla positiva heltal a, b gäller att om 3021 ab så 3021 a eller 3021 b. (ii) Om 15x 15y (mod 3021) så är x y (mod 3021); (iii) Om 15x 15y (mod 1013) så är x y (mod 1013). [1.5] Uppgift 8 (a) Ange om följande påståenden är sanna eller falska. Motivera dina svar. (i) Det finns en enkel graf med gradföljden 2,2,3,3,3,4,4; (ii) Det finns en enkel graf med 7 hörn och 20 kanter. [1] (b) Definiera vad som menas med att en graf är ett träd. [0.5] (c) Antag att G är en sammanhängande enkel graf med n hörn. Hur många kanter finns det i ett uppspännande träd för G? [0.5] (d) Antag att G är en sammanhängande enkel graf med n hörn och n 1 kanter. Förklara varför G är ett träd. [1.5] (e) Konstruera en enkel graf H med 7 hörn och 6 kanter som inte är ett träd. [0.5] Uppgift A Bevisa att ditt svar på uppgift 8(c) är korrekt. c NAT Mittuniversitetet 4 SLUT PÅ TENTAMEN