0% found this document useful (0 votes)
65 views5 pages

Discrete Mathematics I: Solution

The document describes an exercise involving a directed graph representing tasks that two lazy inn-keepers, Arthor and Benedar, must complete to save their kingdom from White Walkers. It lists the tasks and their durations, with dependencies between tasks represented by edges in the graph. It then asks questions about determining the minimum time needed to complete all tasks given constraints on how Arthor and Benedar can work in parallel. The key questions are about calculating lower bounds on the time using different approaches, and determining the actual minimum time when accounting for the fact that each person can only work on one task at a time.

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views5 pages

Discrete Mathematics I: Solution

The document describes an exercise involving a directed graph representing tasks that two lazy inn-keepers, Arthor and Benedar, must complete to save their kingdom from White Walkers. It lists the tasks and their durations, with dependencies between tasks represented by edges in the graph. It then asks questions about determining the minimum time needed to complete all tasks given constraints on how Arthor and Benedar can work in parallel. The key questions are about calculating lower bounds on the time using different approaches, and determining the actual minimum time when accounting for the fact that each person can only work on one task at a time.

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Discrete Mathematics I

Exercise sheet 9 2023

Exercise 1. Given a directed graph G = (V (G), E(G)), with v some node in V (G), let I/Odeg(v)
( in-out degree) be a function that gives back the sum of all the edges with v as tail plus all the
edges with v as head. That is,

I/Odeg(v) = indeg(v) + outdeg(v).


Let’s say that a graph is "two-ended" if it has exactly two nodes with in-out degree 1 and all its
other vertices have in-out degree 2. For example, here is one such graph:

A line graph is a graph whose vertices can be listed in a sequence (e.g. {a1 , a2 , ..., an }) with
edges between consecutive vertices only (the only edges are (ai , ai+1 ) or (ai+1 , ai )). So the two-
ended graph above is also a line graph of length 4.

1. Prove that the following theorem is false by giving or drawing a counterexample. False
Theorem: Every two-ended graph is a line graph.

Solution:
The following graph is a counterexample. A, B and C are all of in-out degree 2, and D and
E are of degree 1, so it’s a two-ended graph. However, it’s not a line graph since you cannot
list all the vertices in a sequence of consecutive edges (because the ABC and the DE parts
are not connected).

A
D

E
C B

2. Point out the first erroneous statement in the following bogus proof of the false theorem and
describe the error.
Bogus proof. We use induction on n. To prove that for all n ≥ 1 every two-ended graph with
n edges is a line graph.

Base Case (n = 1): The only two-ended graph with a single edge consists of two vertices
joined by an edge:

Sure enough, this is a line graph.

Induction Hypothesis: We assume that for some n ≥ 1 every two-ended graph with n
edges is a line graph.

Inductive Step: We prove that every two-ended graph with n+1 edges is a line graph using
our induction hypothesis. Let gn be any two-ended graph with n edges. By the inductive
hypothesis, gn is a line graph. Now suppose that we create a two-ended gn+1 by adding one
more edge to gn . This can be done in only one way: the new edge must join an endpoint of
gn to a new vertex; otherwise, gn+1 would not be two-ended.

2023 1
Discrete Mathematics I
Exercise sheet 9 2023

Clearly, gn+1 is also a line graph.


Therefore, we can conclude using the principle of mathematical induction that for all n ≥ 1
every two-ended graph with n edges is a line graph. □

Solution:
The problem with this proof is that it gives a construction for a two-ended graph of size n + 1
and implicitly assumes it’s the only one possible, but as we can see from the counterexample
above, it is also possible to construct a two-ended graph of size n + 1 (if n + 1 ≥ 4) by
re-arranging some of the vertices into a cycle on one side and having a line graph on the
other side. So the first erroneous statement is that the induction hypothesis holds for all
graphs with n + 1 edges.

2023 2
Discrete Mathematics I
Exercise sheet 9 2023

Exercise 2. A pair of lazy inn-keepers from the land of Westeros, Arthor and Benedar, have had
a sudden spur of courage and decided to devote some of their spare time to prevent the rumored
White Walkers from taking over their kingdom and eradicating their families. Recognizing this as
an ambitious project, they worked out the following table of tasks:

1. Devise a banner for their army of salvation - 8 days.


2. Recruit soldiers for their army - 18 days.
3. Overthrow the usurper of the throne - 9 days, after task #1.
4. Groom Felix, their cat mascot - 11 days, after task #1.
5. Brew beer to motivate their soldiers - 10 days, after task #3
6. Convince the Mother of Dragons to lend them a couple of dragons - 4 days, after task
#3,#4 and #5.
7. Defeat the Night King, leader of the White Walkers, in a duel - 6 days, after tasks #2
and #6.
8. March North to meet and defeat the White Walkers - 8 days, after tasks #2 and #6.

We picture this information in the figure below by drawing a point for each task, and labelling it
with the name and duration of the task. An edge between two points indicates that the task for the
higher point must be completed before beginning the task for the lower one (so the top tasks must
be completed first).

Devise banner,8 Recruit soldiers,18

Overthrow usurper,9 Groom Felix,11

Brew beer,10

Convince Mother of Dragons,4

March North,8
Defeat Night King,6

1. Give some valid order in which the tasks might be completed (i.e. give one topological sort).

Solution:
One of the topological sorts for the DAG is the listing given in the question. Another list
which works too is:

2023 3
Discrete Mathematics I
Exercise sheet 9 2023

Devise banner
Groom Felix
Overthrow usurper
Brew beer
Recruit soldiers
Convince Mother of Dragons
March North
Defeat Night King

Arthor and Benedar want to complete all these tasks in the shortest possible time. However,
they have agreed on some constraining work rules.
• Only one person can be assigned to a particular task; they cannot work together on a
single task to finish it faster.
• Once a person is assigned to a task, that person must work exclusively on the assignment
until it is completed. So, for example, Arthor cannot work on recruit soldiers for a few
days, take a break to groom Felix, and then get back to recruiting soldiers.
2. Arthor and Benedar want to know how long saving the kingdom will take. Arthor suggests
dividing the total number of days of work by the number of workers, which is two.
What lower bound on the time to conquer to save the kingdom does this give, and why might
the actual time required be greater?

Solution:
The total time is 8 + 18 + 9 + 11 + 10 + 4 + 6 + 8 = 74, which divided by two gives us:
74/2 = 37.
A feasible schedule will most likely take more time due to the pre-requirements constraints
of some tasks.
3. Benedar proposes a different method for determining the duration of their project. He
suggests looking at the duration of the critical path, the most time-consuming sequence
of tasks such that each depends on the one before.
What lower bound does this give, and why might it also be too low?

Solution:
The critical path is:
Devise banner → Overthrow usurper → Brew beer → Convince Mother of Dragons → March
North
And this critical path takes 8 + 9 + 10 + 4 + 8 = 39 days. An actual schedule might however
take more time because there are only two workers and it’s not guaranteed that the second
worker can accomplish all of the other tasks while one of them does the critical path.

4. What is the minimum number of days that Arthor and Benedar need to save the kingdom?
You do not need to prove your answer here.

Solution:
They can save in kingdom in 40 days by organizing the tasks between them as follows:

2023 4
Discrete Mathematics I
Exercise sheet 9 2023

Arthor’s schedule: Benedar’s schedule:


Day 0: Devise banner Day 0: Recruit soldiers

Day 8: Overthrow usurper


18

Day 17: Groom Felix


Day 18: Brew beer

11
10

Day 28: Convince Mother of Dragons Day 28: Wait

4 4

Day 32: March North Day 32: Defeat Night King

6
8

Day 38: Wait


2
Day 40: End Day 40: End

2023 5

You might also like