Discrete Mathematics Third Exam (Alternative ... - Emmanuel Briand

Jun 1, 2015 - for Problem 5 and reminders of some SAGE commands. Graph algorithms. Problem 1 (3.75 pts). Consider the bipartite graph with 30 vertices.
98KB taille 1 téléchargements 499 vues
Discrete Mathematics Third Exam (Alternative evaluation). June 1st, 2015

The file exam3.sws available in enseñanza virtual provides thye data for Problem 5 and reminders of some SAGE commands.

Graph algorithms Problem 1 (3.75 pts). Consider the bipartite graph with 30 vertices in Figure 1. 1. Find all vertices that are farthest from vertex 1 (in number of edges) in this graph. Explain how you found them, and give also the distance from vertex 1. 2. Is this graph eulerian? Justify your answer. 3. What is the minimum number of colors that can be used for a proper edge coloring of this graph? Justify your answer. (Remark: you do not need to provide such a coloring; it is enough to give the number of colors with a proper justification). 4. Find, by hand, a matching of maximal size for this graph. Show all the steps in your solution. Problem 2 (1 pt). In a city, there are five lines of tourist buses with the following circuits: • Line 1: A-B-C-D-E-F-G-A • Line 2: A-C-E-G-A • Line 3: B-D-F-G-B • Line 4: I-J-G-I • Line 5: F-H-I-F A, B, . . . , J are stops. The must-see sights are not at the stops, but on the routes. The ticket allows you to go on and down from the buses as many times as you want (hop on, hop off). Is it possible to design a tour to see all parts of the circuits (like A-B, B-C, . . . , I-F), without repeating any? How?

Matemática Discreta. Grados en Ingeniería Informática. ETSII. Universidad de Sevilla 2014–2015. Emmanuel Briand

discrete mathematics third exam (alternative evaluation).

2

Problem Solving Problem 3 (1.25 pts). Consider the graph C whose vertices are the length 6 bitstrings (000000, 001000, 101001, . . . ), with an edge between two bitstrings when they differ by exactly one bit (for instance between 101000 and 001000 because they differ only by their first bit). Describe a proper vertex coloring that uses the minimum possible number of colors (you should find a short and efficient way to do it, in particular without listing explicitly the vertices). Problem 4 (2 pts). You are given: • a set of r = 5 coins, all of the same weight, except maybe one that is counterfeit, either lighter of heavier. • an additional “test” coin , that is marked, and has the correct weight. • A scale. You want to design a process to know whether or not there is a counterfeit coin among the r coins, and if so, to isolate it and know whether it is lighter or heavier than the true coins. 1. Use a quick argument from graph theory to give a lower bound on the number of weighings in such a process (an inequality saying that the process must use at least XXX weighings). 2. Design a process that solves the problem with the smallest possible number of weighings.

Computer questions Problem 5 (2 pts). The file exam3.sws available in “enseñana virtual” contains a matrix M with 1000 rows (numbered from 0 to 999) and 10 columns (numbered from 0 to 9). • Use the computer to find a path from the top left corner (row 0, colum 0) to the bottom right corner (row 999, column 9), by only moving to right (column index increased by one) and to down (row index increased by one), such that the sum of the corresponding entries is minimal (take into account the entries at starting and final points). • Same question but starting in any cell in the left column (column 0) and ending in any cell in the last column (column 9). Try to solve this efficiently. In your answers, indicate: • How you solved the solution with the computer (with your code). • the path you obtained (like for instance (0, 0) − (0, 1) − . . . − (7, 9)) and its sum.

Hint: it may be unwise to try to enter this graph in the computer, due to the short time time available to solve the problem.

discrete mathematics third exam (alternative evaluation).

1 : ['E', 'J', 'M', 'N', 'A'] 2 : ['D', 'K'] 3 : ['D', 'H'] 4 : ['K', 'L', 'P'] 5 : ['F', 'H', 'K', 'L', 'M', 'N'] 6 : ['B', 'C', 'G', 'A'] 7 : ['M', 'P'] 8 : ['D', 'H', 'K', 'N'] 9 : ['H', 'K', 'L'] 10 : ['F', 'K', 'L'] 11 : ['F', 'M'] 12 : ['C', 'G', 'I', 'L'] 13 : ['F', 'L'] 14 : ['I', 'M', 'N'] 15 : ['D', 'F', 'K'] A : [1, 6] B : [6] C : [6, 12] D : [2, 3, 8, 15] E : [1] F : [5, 10, 11, 13, 15] G : [6, 12] H : [3, 5, 8, 9] I : [12, 14] J : [1] K : [2, 4, 5, 8, 9, 10, 15] L : [4, 5, 9, 10, 12, 13] M : [1, 5, 7, 11, 14] N : [1, 5, 8, 14] . P : [4, 7]

3

15

P

14

N

13

M

12

L

11

K

10

J

9

I

8

H

7

G

6

F

5

E

4

D

3

C

2

B

1

A Figure 1: The bipartite graph of problem 1.