Sie sind auf Seite 1von 19

Technische Universität München (I7) M.

Luttenberger

Discrete Structures (INHN0004) – 21w


Endterm – Variante 1

Nachname Vorname

Matrikelnummer Unterschrift

Hörsaal/Raum Reihe Sitz/Platznummer

ˆ Diese Klausur umfasst 10 Aufgaben mit insgesamt 40 Punkten. Bitte kontrollieren Sie, dass Sie einen vollständigen
Bogen erhalten haben.
ˆ Tragen Sie alle relevanten Informationen in die obigen Felder (Name, Vorname, . . . ) ein. Lassen Sie die unten folgenden
Felder (Punkte, Zeiten, . . . ) leer.
ˆ Bearbeiten Sie alle Aufgaben auf den jeweils hierfür vorgesehenen Blättern des Antwortbogens. Sollte der Platz nicht
reichen, können Sie zusätzliches Papier anfordern; vermerken Sie dann deutlich, wo der Rest Ihrer Antwort zu finden ist.
ˆ Das Heraustrennen von Seiten aus dem Antwortbogen ist untersagt.
ˆ Soweit nicht explizit anders angegeben, werden nur Antworten mit Lösungsweg/Begründung gewertet.
ˆ Schreiben Sie nur in Schwarz oder Blau und mit dokumentenechten Stiften. D.h. insbesondere:
Verwenden Sie keine Bleistifte, keine Tintenkiller und kein TippEx, andernfalls besteht kein Anspruch auf Wertung Ihrer
Antwort. Verwenden Sie nicht die Farben Rot, Grün, Violett.
ˆ Streichen Sie Text durch, der nicht gewertet werden soll.
ˆ Mehrfachantworten zu einer (Teil-)Aufgabe werden mit 0 Punkten bewertet.
ˆ
ˆ Schalten Sie alle mitgeführten elektronischen Geräte, die nicht explizit als Hilfsmittel erlaubt sind, vollständig aus.
Dies betrifft insbesondere Handys, Smartwatches, etc. Verstauen Sie diese Geräte in Ihrer Tasche und verschließen Sie
diese.
ˆ Falls Sie nachträglich etwas aus Ihrer Tasche benötigen, signalisieren Sie dies zunächst einer Aufsicht, ansonsten kann
dies als Betrugsversuch gewertet werden.

P
P 1 P 2 P 3 P 4 P 5 P 6 P 7 P 8 P 9 P 10

EK

ZK

NK

Hörsaal verlassen

Vorzeitige Abgabe

Anmerkungen
Exercise 1.1 5
Write down your answers in the corresponding text fields on the left side. You can also provide sketches on the right side.
Only answering with “Yes” or “No” will grant 0 points! You must provide an argument e.g. a
(counter-)example where applicable.
(a) Is every simple graph with degree sequence (1, 1, 2, 2, 2, 2) a tree?

Answer: (noerid)

(b) Provide two non-isomorphic realisations of the degree sequence (1, 1, 1, 1, 1, 2, 2, 3). To this end, draw the two graphs by
using the provided templates below.

3 3

4 2 4 2

5 1 5 1

6 8 6 8

7 7
(c) Is every simple graph with degree sequence (1, 1, 1, 2, 2, 3, 4) planar?

Answer: (noerid)

(d) Does every simple graph with degree sequence (2, 2, 2, 2, 2, 2, 2) have a node colouring with a maximum of 2 colours?

Answer: (noerid)
(e) Does a simple graph with degree sequence (1, 1, 1, 1, 1, 1, 3, 3) exist which has a Hamiltonian cycle?

Answer: (noerid)
Exercise 1.2 4
(a) Fill in the following truth table with the correct truth values of the formula and its subformulas.
You do not have to fill in the columns of atomic subformulas.
If the truth value of a non-atomic (sub)formula is already explicitly determined by the truth value of its left subformula
for a given minimal assignment, you don’t have to evaluate the right subformula. Only in this case, you may leave the
corresponding cell empty; in all other cases, a truth value ({0, 1}) has to be filled in.

x y z ((z ∧ ¬ x) ↔ (¬ z ⊕ (x → y)))

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
(b) Consider the following propositional formula in clause set representation:

G = {{p, q, r, s}, {p, ¬q, ¬r, s}, {¬p, q, ¬s}}

Represent the truth values of G using the following KV map:


r

To this end, fill in the fields with the corresponding truth values ({0, 1}).
(c) The following KV map represents the truth values of a formula F where a grey field represents the truth value 1:
p

Provide a clause set representation of a formula in CNF with a minimal number of clauses which is semantically equivalent
to F .
If you edit the PDF directly, you may use a minus symbol for the negation symbol (− instead of ¬).
Answer: (noerid)

(d) Convert the propositional formula


H = ((r → s) → ((p ∨ q) ↔ r))
into a formula in DNF using semantic equivalences while adhering to the method described in the lecture.
Provide the results of the three main steps in the fields below.
If you edit the PDF directly, you may write & instead of ∧, | instead of ∨, and − instead of ¬.
ˆ After conversion to standard basis {∧, ∨, ¬}. Answer: (noerid)

ˆ After conversion to negation normal form (¬ only in front of atomic formulas). Answer: (noerid)

ˆ After conversion to disjunctive normal form (DNF). Answer: (noerid)


Exercise 1.3 5
In the following, you always have to provide (i) a short reasoning for your answer and (ii) the result as an arithmetic term by
using the combinatorial coefficients from the lecture.
Remark: It suffices to provide the sought values as arithmetic terms using the combinatorial coefficients from the lecture.
However, the terms have to be simplified as much as possible and an elaborate reason has to be provided.
(a) Let the digit sum of a natural number be the sum of all its digits (in decimal representaiton), e.g. the digit sum of 5404
is 5 + 4 + 0 + 4 = 13.
 
(i) How many numbers in 104 have digit sum 6?
 
(ii) How many numbers in 104 have digit sum 19?
Answer: (noerid)

(b) In how many ways can we distribute 7 jobs to 3 servers if both servers and jobs are indistinguishable?
Answer: (noerid)
 
(c) Determine the number of natural numbers in 105 which are divisible by 3, 5 or 23.
Answer: (noerid)

(d) In how many ways can we distribute 9 jobs to 4 servers if both servers and jobs are distinguishable, but each server
should receive at least one job?
Answer: (noerid)
(e) In how many ways can we distribute 7 jobs to 13 servers if only servers are distinguishable, but each server should receive
at most one job?
Answer: (noerid)
Exercise 1.4 3
Given are the following relations R and S over the set [5], both in graphical and matrix representation:
R S
2 2

3 3

1 1

4 4

5 5

(s,t) 1 2 3 4 5 (s,t) 1 2 3 4 5
1 0 0 0 0 0 1 0 1 0 0 0
2 1 0 0 1 0 2 1 0 0 0 1
3 0 0 0 0 0 3 0 1 0 0 1
4 0 0 1 0 1 4 0 0 0 0 0
5 0 0 1 0 0 5 0 1 0 0 0
(a) Determine the relation defined by
(S + )+

To this end
ˆ either use the following table on the left to state its adjacency matrix where it suffices to fill in those fields (s, t)
with 1 which are part of the sought relation.
ˆ or draw its representation as a directed graph using the template on the right.
Only provide either the drawn graph or the adjacency matrix, not both!

2
(s,t) 1 2 3 4 5
1 3

2
3 1
4
5
4

5
(b) Determine the Hasse diagram of the least partial order Y w.r.t. ⊆ with R ⊆ Y .
To this end
ˆ either use the following table on the left to state its adjacency matrix where it suffices to fill in those fields (s, t)
with 1 which are part of the sought relation.
ˆ or draw its representation as a directed graph using the template on the right.
Only provide either the drawn graph or the adjacency matrix, not both!

2
(s,t) 1 2 3 4 5
1 3

2
3 1
4
5
4

Further determine all minimal and maximal elements wrt. Y :


ˆ Minimal elements:
ˆ Maximal elements:
(c) Determine the quotient [5]/Z1 with Z1 := S ∗ ∩ (S ⊤ )∗ .
Answer: (noerid)

Determine the quotient [5]/Z2 with Z2 := (S ∪ S ⊤ )∗ .


Answer: (noerid)
Exercise 1.5 4
We define the sequence (ai )i∈N0 as follows:

a0 = 5, a1 = 2, a2 = 4 and in general for i ∈ N0 ai+3 = 14 · ai+2 − 63 · ai+1 + 90 · ai

Using induction on i ∈ N0 , show that for i ∈ N0 it holds:

ai = −38 · 5i + 21 · 6i + 22 · 3i

Structure your proof by induction according to the tutorial sessions.


You may write n ** (k) for nk and a (i) for ai .
Hint :
(x − 5)(x − 6)(x − 3) = x3 − 14 · x2 + 63 · x − 90
Answer: (noerid)
Exercise 1.6 3
Given are the following isomorphic graphs Gl (left) and Gr (right):

3 C

4 2 D B

5 1 E A

6 8 F H

7 G

(a) Fill in any graph isomorphism ι from Gl to Gr into the following table:

x 1 2 3 4 5 6 7 8
ι(x)

(b) State which of the following permutations are graph automorphisms of Gl . To this end, fill in a 1 into the text fields
below the permutations in case they are a graph automorphism of Gl ; otherwise, fill in a 0.

(8, 6)(5, 7) (8, 6)(2, 1) (8, 6) (8, 6, 7)(2, 1) (8, 6)(2, 3, 1) Id

(2, 1) (2, 1)(7, 3) (8, 6)(5, 2) (8, 6)(5, 4)(2, 1) (8, 7, 6)(2, 1) (8, 7)(2, 1)

(c) Fill out the following table with the results of the composition ρ ◦ σ, where the permutation ρ corresponds to the field’s
row and the permuation σ to the field’s column. Provide your answer in cycle notation.

ρ◦σ (H, B)(E, F )(D, A)(G, C) (H, A)(E, D)(B, G)(F, C) (H, D, F, G)(E, A, B, C)
(H, B)(E, F )(D, A)(G, C)
(H, A)(E, D)(B, G)(F, C)
(H, D, F, G)(E, A, B, C)
Exercise 1.7 3
Let F0 be a propositional formula with variables p, r, s, u, y, z in clause set representation:

F0 := {{p, s}, {p, ¬u}, {¬p, ¬s}, {¬p, ¬y}, {¬r}, {s, ¬y}, {¬s, ¬u}, {¬u, ¬y}, {z}}

Use the DPLL algorithm (with OLR and PLR) to determine a satisfying assignment:
To this end, produce a sequence of clause sets F0 , F1 , F2 , . . . , Fl starting with F0 such that Fi+1 is generated from Fi using
either OLR, PLR or case distinction:
ˆ If Fi allows the application of multiple rules, “OLR before PLR before case distiction” should be applied, as done in the
lecture and exercises.
ˆ If there are multiple literals to which a rule can be applied, the literal with the lexicographically lowest variable has to
be chosen.
ˆ If a case distinction is applied, you may choose a truth value that leads to a satisfying assignment.
i.e. F0 , F1 , . . . , Fl should describe a path of the computation tree of the DPLL algorithm.
Provide the path using the fields below (you may not need all fields). Write down both Fi+1 and the rule applied to Fi including
the literal. Eventually, provide the computed satisfying assignment; if a variable stays unassigned, fill in the truth value ’∗’
instead. If you edit the PDF directly, use - instead of ¬, e.g.:
F0 ={{p,s},{p,-u},{-p,-s},{-p,-y},{-r},{s,-y},{-s,-u},{-u,-y},{z}}
Answer: : n o
F1 :=

from F0 using rule/literal:


n o
F2 :=

from F1 using rule/literal:


n o
F3 :=

from F2 using rule/literal:


n o
F4 :=

from F3 using rule/literal:


n o
F5 :=

from F4 using rule/literal:


n o
F6 :=

from F5 using rule/literal:


n o
F7 :=

from F6 using rule/literal:


n o
F8 :=

from F7 using rule/literal:

Satisfying assignment:
Exercise 1.8 4
In the following exercises, you always have to provide a short reasoning (e.g. explicit calculations where you state which results
were used) and, if applicable, the concrete numerical value. However, only providing the numerical value does not
count as a sufficient answer!
The following list of prime numbers might be helpful:

3, 11, 29, 73, 89, 1493

(a) Determine |Z∗N | for N = 94743.


Answer: (noerid)

(b) Evaluate the following arithmetic expression:

(201558)155172 + (295610)162630 mod 1493




Answer: (noerid)
(c) We consider the multiplicative group ⟨Z∗N , ·N , 1⟩ modulo N = 6497.
Determine the multiplicative inverse of a = 3215 modulo N = 6497 by means of the extended euclidean algorithm.
To this end, use the table given below:

a b ⌊b/a⌋ α β

Now state the multiplicative inverse of a = 3215 modulo N = 6497:


Answer: (noerid)
Exercise 1.9 3
Let G = (V, E) denote the graph that consists of three connected components (short: CCs) where one CC is isomorphic with
the simple path graph P6 , while each of the remaining two CCs is isomorphic with the simple complete graph K5 .
7 12
2 1
8 13

6 11
3 0

9 14

4 5 10 15

(a) Determine the number of automorphisms (“self-symmetries”) of G and briefly explain your answer.
Answer: (noerid)

(b) Explicitly state at most 6 automorphisms of G in cycle notation such that every automorphism of G can be written as a
finite product (w.r.t. function composition ◦) of the stated automorphisms. Again, provide a short explanation.
Answer: (noerid)

(c) State two automorphisms π1 , π2 of G in cycle notation such that π1 ◦π2 ̸= π2 ◦π1 . Prove your claim by explicitly providing
the compositions π1 ◦ π2 and π2 ◦ π1 .
Answer: (noerid)
Exercise 1.10 6
For all of the following questions a sufficiently detailed proof is expected:
(a) Let F be a propositional formula and p, q two variables that occur in F . Further, let G := F [q/p] be the formula we
obtain from F be replacing every occurrence of p by q.
E.g.: If F = (p ∧ q ∧ r), then G = F [q/p] = (q ∧ q ∧ r).
Show or disprove by means of a counter-example:
ˆ If F is satisfiable, then also G is satisfiable.
Answer: (noerid)

ˆ If F is valid, then also G is valid.


Answer: (noerid)
(b) Let G = (V, E) be a simple connected planar graph where every node has degree at least 3. Fix any planar embedding of
G and let F be the set of faces the planar embedding divides the plane into.
Show that G has a face that is bounded by at most 5 edges.
Answer: (noerid)

Das könnte Ihnen auch gefallen