Attribution Non-Commercial (BY-NC)

173 views

Attribution Non-Commercial (BY-NC)

- MATHEMATICAL COMBINATORICS (INTERNATIONAL BOOK SERIES), Volume 4 / 2011
- Swinging Ball Problem
- Grounding-Slope Method-Additional Methods for Tight Spaces-Part1-Intersecting Curves.pdf
- r059210502-mathematical-foundation-of-computer-science
- Graph Theory 0.3
- graphs1-130126021226-phpapp01
- New Upper Bounds on the Order of Cages
- lecture23_dr3
- graph theory
- Admin English
- Dynamic programming
- isp
- BFS
- Louis H. Kauffman- Wang Algebra and the Spanning Trees of a Graph
- Anahi Gajardo- A symbolic projection of Langton’s Ant
- 10.1.1.18
- 37 Slides
- SM 15591 TimeWork II
- Greedy Techniques
- icpc08jak.pdf

You are on page 1of 4

Question 1

Let G be a circular directed weighted graph with n nodes (n being the amount

of gas stations), s.t. the sum of all weights is exactly 0.

We can correspond each gas station to a node such that:

• each two nodes are neighbours i their matching gas stations are neigh-

bours

• the weight of a node is the distance which could be travelled with the gas

in the station less the length of the road to the next station

X

∃e ∈ G s.t. ∀e0 ∈ G : w (e? ) ≥ 0

e? ∈[e,e0 ]

where w is the weight function and [e, e0 ] is the (unanimously dened) simple

0

line between e and e.

Let us assume that no such e exists, thus that

X

∀e ∈ G : ∃e0 ∈ G s.t w (e? ) < 0

e? ∈[e,e0 ]

For the simplicity of the proof well say that e is negatively distant from e0 .

Let e0 ∈ G be any node, according to our assumption there is an e1 which is

negatively distant from e0 , and an e2 which is negatively distant from e1 and

so on.

Let us create a succession of n+1 such nodes, since there are only n gas stations,

we know that ∃i, j s.t. i 6= j and ei = ej .

1

Thus the succession (ei , ..., ej ) starts and ends at the same place, and let us

assume it goes over the entire circle k times, thus, the total weight traversed

along this succession is

X

k w(e)

e∈G

X X X X

k w(e) = w (e? ) + ... + w (e? ) < 0 =⇒ w(e) < 0

e∈G e? ∈[ei ,ei+1 ] e? ∈[ej−1 ,ej ] e∈G

Question 2

I suggest this algorithm (which I like to call a reverse Kruskal):

• Go over the edges in that order, and remove it from the graph i it doesn't

divide it into two connectivity components (could be checked in o(|E|))

Correctness proof :

First we must prove that RK indeed returns a tree. The constraints promise

that the output graph is simply connected.

Let us assume that the output contains a circle, and let us denote vj as the

heaviest edge in the circle. Since vj is the rst edge traversed by RK, it's still

containt in a circle, which means removing it will not divide the graph into

two connectivity components, thus having the algorithm remove it, which is a

contradiction.

This proves the output is indeed a spanning tree, let us prove that it has a

minimal maximal edge.

The correctness is trivial in case removing a1 (or any ai s.t. w(ai ) = w(a1 ))

divides the graph into two connectivity components, as a1 (or one of it's dopel-

gangers) must stay thus making any spanning tree a solution.

Assuming that is not the case, let us denote a solution as the ordered set of

edges removed from the graph, and denote the output of our algorithm as RK .

Let B be the set of optimal solutions and let S ∈ B , there is a maximal j s.t.

∀j ≤ i : vj ∈ S , assuming that RK is not optimal means that there exists a

minimal j ≤ i s.t. vj ∈

/ RK .

2

But since S is a solution we know that after removing v1 , ..., vj−1 from G, we get

a connected graph, and furthermore, since vj ∈ S we know that G − {v1 , ..., vj }

is still connected.

Hence, after removing the edges {v1 , ..., vj−1 } RK would remove vj , proving

that vj ∈ RK , in contradiction.

Question 3

Let us consider a spanning tree of G, and let v∈G be a leaf in that tree.

doesn't contain v , and by proxy it doesn't contain any of the edges it's connected

to.

Thus, removing v and all if it's edges, doesn't harm the connectivity of the

graph.

Question 4

• Go over each of the numbers in the array from x1 to xn , if the current

number isn't contained in any segment add it to the output set.

Proof of correctness:

Since the algorithm will add any number not yet covered it's obvious that the

output covers all numbers in the array.

Let B be a set of optimal solutions, and let us assume that A∈

/ B.

The assumption implies that the optimal solution is of size m < k.

Let j be the maximal value such that ∃S ∈ B s.t. {y1 , ..., yj } ⊂ S , thus S =

{y1 , ..., yj , cj+1 , ..., cm }.

Let us denote by xl the minimal element of the input which isn't contained in

any of the segments described by {y1 , ..., yj }.

From the correctness of the algorithms we know that xl ∈ [cj+1 , cj+1 + 1] and

xl ∈ [yj+1 , yj+1 + 1].

But if we examine the elements larger than xl which are contained in the same

segments, we realize that in case of A they are all contained in [xi , yj+1 + 1] and

in case of S they are all contained in [xi , cj+1 + 1].

But from the denition of our algorithm we get that xi = cj+1 thus [xi , yj+1 +

1] ⊆ [xi , cj+1 + 1] (as the length of the rightmost segment is 1, which is the

maximal length, and they both have the same starting point).

3

This proves that {y1 , ..., yj+1 , cj+2 , ..., cm } as also a solution, in contradiction

with j being maximal.

- MATHEMATICAL COMBINATORICS (INTERNATIONAL BOOK SERIES), Volume 4 / 2011Uploaded byAnonymous 0U9j6BLllB
- Swinging Ball ProblemUploaded byanniemarieevans
- Grounding-Slope Method-Additional Methods for Tight Spaces-Part1-Intersecting Curves.pdfUploaded bybillionsweepsanon2349
- r059210502-mathematical-foundation-of-computer-scienceUploaded bySrinivasa Rao G
- Graph Theory 0.3Uploaded bysd83online
- graphs1-130126021226-phpapp01Uploaded byAliImran
- New Upper Bounds on the Order of CagesUploaded byapi-26401608
- lecture23_dr3Uploaded byapi-3834272
- Admin EnglishUploaded byMoldoveanu Alexandru
- graph theoryUploaded byعبدالرحمنابوطلحة
- Dynamic programmingUploaded byHugo Conceicao
- ispUploaded byKait Reinhardt
- BFSUploaded byAntony Albert
- Louis H. Kauffman- Wang Algebra and the Spanning Trees of a GraphUploaded byOkomm
- Anahi Gajardo- A symbolic projection of Langton’s AntUploaded byIrokk
- 10.1.1.18Uploaded bykashifnasr
- 37 SlidesUploaded byJerick Mari A. Tancinco
- SM 15591 TimeWork IIUploaded bypavan kumar kvs
- Greedy TechniquesUploaded bySiddhant Singh
- icpc08jak.pdfUploaded byPhạm Hữu Thạnh Đạt
- Sample Ques - ELQ, CompUploaded byRaghavender Reddy
- Lecture FunctionUploaded byLyrad Magpantay
- Weakly Hull Number of a GraphUploaded byfhao2k12
- Symphonie Trader SystemUploaded byntora
- Skew Slab mesh checkUploaded bynathan
- LecturePPT Chapter 09 GraphUploaded by一鸿
- Ninth and Tenth Order Virial Coefficients for Hard Spheres in DUploaded bymohitepavan
- Data Structures Using c Ec362 Makeup Exam Feb 2017Uploaded byvinayak
- IJARCCE 57.pdfUploaded byChowdary Vines
- Paper of Discrete MathematicsUploaded byEnrico M Toruan17

- Action Potential ShUploaded byAmin Shah
- Common ABAP Dumps and Their MeaningUploaded byKishore Kumar
- Attacks on Stream Ciphers and the One Time PadUploaded byJonathan Alvarado
- Exercise-induced myocardial ischaemia detectedUploaded byFizzah Hassan
- FPC Testing PresentationUploaded byjacquesmayol
- Recriutment and SelectionUploaded bykiranaisha
- resume for edgeUploaded byapi-389785065
- VW_91102_ENUploaded byNaveen Kumar
- Magnetic Resonance Imaging Based Correction and Reconstruction of Positron Emission Tomography ImagesUploaded byjdoinca
- PHP 5 Introduction.pdfUploaded bymasterpatel
- Action Research Mam Myrna Colorful Visual Aids in Math(1)Uploaded byYopej Edlareb
- AMP QB.Uploaded bysvkarthik83
- Bahai Canada Nov-Dec 2010Uploaded byBaquia
- Chapter 8 Ver3Uploaded bySaipul Iza
- Rules in Diagnosing Computer System.docxUploaded byJerry Ilustre
- CANalyzer User Guide V3_1Uploaded byvlsishekar
- Tube Fitters ManualUploaded bycderin2000
- Gordon Gekko EffectUploaded byKal_C
- Tcpdump Examples.pdfUploaded bythiagopollachini
- Massimo Colombo_Founders Human Capital_competence-based ViewUploaded byValeria Popa
- Resume GauravUploaded bygaurav purohit
- loadUploaded byRASSAL KARIM
- A2 Chemistry Answer BookUploaded byHarrys Oustapasidis
- Exp 1 Flakiness and Elongation IndexUploaded byTousif Mahmood
- Free Scale TestingUploaded byRex Jim
- care plan fvdUploaded byapi-283213958
- future_geo_energyUploaded bybenlid
- Prandtl BookUploaded byShrinidhi
- Lagunzad vs Gonzales.pdfUploaded byCharlie Bartolome
- Hoja de Datos TelurometroUploaded bycimats

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.