Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.84 KB | None | 0 0
  1. \documentclass[letterpaper,leqno,fleqn]{article}
  2.  
  3. %proofs
  4. %\usepackage{amsthm}
  5.  
  6. \usepackage[parfill]{parskip}
  7.  
  8. % graphs
  9. \usepackage{tkz-graph}
  10.  
  11. %spacing
  12. \usepackage{setspace}
  13.  
  14. % \commandname[option1,option2,...]{argument1}{argument2}...
  15. % # $ % ^ & _ { } ~ \
  16. % \# \$ \% \textasciicircum{} \& \_ \{ \} \~{} \textbackslash{}
  17.  
  18. %\usepackage[cm]{fullpage}
  19. \usepackage[top=3cm, bottom=3cm, left=3cm, right=3cm]{geometry}
  20.  
  21. %use graphics
  22. \usepackage{graphicx}
  23.  
  24. %mathstuff
  25. \usepackage{amsmath}
  26.  
  27. \usepackage{centernot}
  28.  
  29. \newtheorem{thm}{Theorem}[section]
  30. \newtheorem{lemma}[thm]{Lemma}
  31. \newtheorem{prop}[thm]{Proposition}
  32. \newtheorem{cor}[thm]{Corollary}
  33. \newtheorem{defn}[thm]{Definition}
  34. \newtheorem{examp}[thm]{Example}
  35. \newtheorem{conj}[thm]{Conjecture}
  36. \newtheorem{rmk}[thm]{Remark}
  37.  
  38. \usepackage[retainorgcmds]{IEEEtrantools}
  39.  
  40. %mathstuff
  41. \usepackage{amssymb}
  42.  
  43. %\usepackage{wrapfig}
  44.  
  45. %Floats, figures, etc
  46. \usepackage{float}
  47.  
  48. %Lists \begin{enumerate}
  49. \usepackage{enumerate}
  50.  
  51. %Multiple columns \begin{multicols}{N}
  52. \usepackage{multicol}
  53.  
  54. %Side captions
  55. %\usepackage{sidecap}
  56.  
  57. %use subfloats
  58. %\usepackage{subfig}
  59.  
  60. %fancy headers
  61. \usepackage{fancyhdr}
  62.  
  63. %Pretty captions
  64. %\usepackage[labelfont=bf,font=it,labelsep=endash,format=hang,font=small]{caption}
  65.  
  66. %scientific notation
  67. \providecommand{\e}[1]{\ensuremath{\cdot 10^{#1}}}
  68.  
  69. % nice units/fracs
  70. \usepackage[]{units}
  71.  
  72. % commas in numbers
  73. \usepackage[group-separator={,}]{siunitx}
  74.  
  75. % for algorithms
  76. \usepackage[ ]{algorithm,caption}
  77. \usepackage{algpseudocode}
  78.  
  79. % for listings/verbatim
  80. \usepackage{listings}
  81.  
  82. % for urls
  83. \usepackage{hyperref}
  84. %\def\Tiny{ \font\Tinyfont = cmr10 at 8pt \relax \Tinyfont}
  85. \def\Hugee{ \font\Hugeefont = cmr10 at 50pt \relax \Hugeefont}
  86.  
  87. \begin{document}
  88.  
  89. % title page
  90. %\author{Jorge Fernando Gomez\\TA: Oludotun Akinlawon}
  91. %\title{STAT 252 LAB Q2\\Assignment \#1}
  92. %\date{2011.01.31}
  93. %\maketitle
  94. %\thispagestyle{empty}
  95. %\let\thefootnote\relax\footnote{I did not collaborate with anyone.}
  96.  
  97. % no cover page, header
  98. \newpage
  99. \setlength{\headheight}{20.2pt}
  100. \pagestyle{fancy}
  101. \lhead{2012.11.15\\Assignment \#4\\CMPUT 304 LEC A1}
  102. \rhead{1259371\\Jorge Fernando Gomez}
  103. %\captionsetup{font+=it}
  104. \linespread{1.0}
  105.  
  106. % extra for columns
  107. %\setlength{\columnseprule}{0.4pt}
  108. %\ptsize{10}
  109. %\begin{spacing}{1}
  110. \section{Boolean equation}
  111. \begin{align*}
  112. 1. [(C\vee(G\implies F))\implies (E\wedge(G\implies F)\wedge(H\implies C))]\vee\\
  113. 2. [(E\vee F\vee\neg G)]\implies (B\wedge C\wedge\neg D\wedge G)]\vee\\
  114. 3. [(B\vee\neg C\vee D\vee\neg G]\implies (\neg A \wedge (G\implies F) \wedge(H\implies C))].
  115. \\
  116. \\
  117. \\
  118. 1.[(C\vee(G\implies F))\implies (E\wedge(G\implies F)\wedge(H\implies C))]\\\equiv
  119. [(C\vee(\neg G\veeF)) \implies (E \wedge(\neg G \vee F)) \wedge (\neg H\vee C))]\\\equiv
  120. [\neg(C \vee(\neg G\vee F))] \vee (E \wedge (\neg G\vee F)) \wedge (\neg H\vee C))\\\equiv
  121. (\neg C\wedge \neg(\neg G\vee F))\vee (E\wedge (\neg G\vee F)\wedge (\neg H\vee C))\\\equiv
  122. (\neg C \wedge G \wedge\neg F)\vee (E\wedge\neg G\wedge\neg H)\vee (E\wedge\neg G \wedge C)\vee (E\wedge F\wedge\neg H)\vee (E\wedge F\wedge C).
  123. \end{align*}
  124.  
  125. \section{$s$-$t$ Longest-Path Problem} % (fold)
  126. \label{sec:$s$-$t$ Longest-Path Problem}
  127. \begin{enumerate}[a]
  128. \renewcommand\labelenumi{\bfseries\theenumi.}
  129. \item
  130. We define the decision problem of finding the longest path, in terms of number edges,
  131. from $ s $ to $ t $ in
  132. a directed graph $ G $ as
  133. $$ st\mathrm{LPD} = \big\{G=(V,E) :
  134. \text{Exists a path $ p = s \leadsto t $ of length at least $ k $}. \big\} $$
  135.  
  136. \item
  137. We obtain the length $ m $ of our longest
  138. path $ p^* $ by
  139. using our decision problem $ st\mathrm{LPD} $ as an oracle running in $ O(1) $.
  140. We know that $ |p^*|\le |V| - 1 $. We can do a binary search over this length,
  141. using our oracle as a comparison function. The running time of
  142. binary search is $ O(\log_2 |V|) $.
  143.  
  144. \item
  145. We know $ m $ from part b. We can reduce the $ st\mathrm{LP} $ functional
  146. problem to our decision problem by removing some edge $ e $ at a time from our original
  147. $ st\mathrm{LP} $ instance, and using this as an input for $ st\mathrm{LPD} $, along
  148. with $ m $. If a longest path no longer exists when removing $ e $, then we include
  149. $ e $. If a longest path still existed with $ e $ removed, then this edge was not necessary
  150. and we can drop if from our solution.
  151.  
  152. We now construct an actual path $ p^* $, initially being only the 1-tuple $ (s) $.
  153. Let $ S $ denote a current source. Initially $ S \gets s $.
  154. We consider every edge $(S, u)$ incident to $ S $. When we find our necessary $ u $,
  155. we append $ u $ to $ p $, and then set $ S \gets u $. The algorithm stops when $ S = t $,
  156. and our path $ p^* = (s = v_0, v_1,\,\dots\,,v_m = t) $.
  157.  
  158. To obtain the running time, we note that for each $v \in p^* $, we can have potentially
  159. $ |V| - 1 $ incident edges. We remove each of these edges individually and consult our
  160. decision problem in constant time. We do this at most $|V| - 1 $ times, and so we have
  161. a running time of $ O(|V|^2) $.
  162. \end{enumerate}
  163. % section $s$-$t$ Longest-Path Problem (end)
  164.  
  165. \section{2-CNF-SAT} % (fold)
  166. \label{sec:2-CNF-SAT}
  167. From propositional logic,
  168. we know that $(a \lor b) \Leftrightarrow (\lnot a \Rightarrow b)$. This means that for
  169. each disjunction $ (a \lor b) $ we can obtain two pairs of implications $ (\lnot a \Rightarrow b) $ and
  170. $ (\lnot b \Rightarrow a) $. We take each clause in our 2-CNF-SAT instance and transform
  171. them into pairs of implications.
  172.  
  173. We construct a directed
  174. graph $ G = (V, E) $, where each variable $ x $ in the
  175. set of variables of our transformed 2-CNF-SAT instance corresponds to a vertex $ v \in V $, and where each implication
  176. $ p \Rightarrow q $ corresponds to an edge $ e \in E $, where $ p, q $ correspond to some terms
  177. in our transformed instance. We can now determine in time linear in $ |V| $ and $ |E| $
  178. if our 2-CNF-SAT instance is satisfiable, by determining if we can reach a contradiction of the form
  179. $ (x \Leftrightarrow \lnot x )$.
  180.  
  181. \begin{prop}
  182. Let $ A $ be an instance of 2-CNF-SAT with set of clauses $ C $. For each clause $ c \in C $
  183. of the form $ (a \lor b )$,
  184. let $ p(c) = (b \lor a) $, and $ q(c) = (\lnot a \Rightarrow b)$.
  185. Let $ S $ be a set of 2-tuples $(a, b)$, where $(a, b)$ implies there exists an implication
  186. $ (a \Rightarrow b) $ which can be obtained by applying $ q(c) $ or $ (q \circ p)(c) $ for
  187. some $ c \in C $, and let $ T $ be a set defined as
  188. $ T = \{a, b \in T \::\: (a, b) \in S\} $.
  189.  
  190. Let $ G = (V,E) $ be
  191. a directed graph, where
  192. $ V = T $, and $ E = S $. Then we can determine the satisfiability of A in polynomial time
  193. by determining if there exist paths
  194. $ p_1 : v \leadsto \lnot v $ and $ p_2 : \lnot v \leadsto v $,
  195. \mbox{for any $ v \in V $.}
  196. \end{prop}
  197. \paragraph{Proof} % (fold)
  198. \label{par:Proof}
  199. First, we assume that it is enough to find paths $ p_1 $ and $ p_2 $
  200. to determine the satisfiability
  201. of our instance 2-CNF-SAT instance.
  202.  
  203. We can determine if $ v $ reaches $ \lnot v $ and vice versa in linear time by constructing
  204. a BFS tree of $ G $ rooted at $ v $ and rooted at $ \lnot v $. The running time of BFS
  205. is $ O(|V| + |E|) $, where the cardinalities of both $ V $ and $ E $ are both polynomial
  206. in the number of variables in $ A $.
  207.  
  208. % We now show that it is enough to find $ p_1 $ and $ p_2 $ to determine the satisfiability of $ A $.
  209.  
  210. From boolean algebra, we know that for any terms $ p,q $, $ p \land 0 = 0 $, $ p \land \lnot p = 0 $,
  211. $ p \lor p = p $, and $ (p \land q) = (q \land p) $. Therefore,
  212. we have that the only way to force a conjunction to be unsatisfiable, is to arrive at
  213. $ (p \land 0 ) $ or $(p \land \lnot p) $.
  214. It follows that in order for our instance $ A $ to be unsatisfiable, we must be able
  215. to reduce our 2-CNF-SAT to an expression containing $ (t \land \lnot t) $ for some variable $ t $ in
  216. the problem. But we have that $ t = (t\lor t) $, and $ \lnot t = (\lnot t \lor \lnot t) $, and so
  217. $ (t \land \lnot t) \Leftrightarrow ((t\lor t) \land (\lnot t \lor \lnot t))$.
  218. \mbox{Furthermore,
  219. $ ((t\lor t) \land (\lnot t \lor \lnot t)) \Leftrightarrow
  220. ((\lnot t \Rightarrow t) \land (t \Rightarrow \lnot t))$.}
  221. We know that every disjunction in $ A $ can be mapped to an equivalent implication,
  222. and we know implication is transitive. Therefore, if any such expression can be obtained
  223. in our original instance, then we can always obtain the equivalent implications.
  224.  
  225. We can now show that finding the existence of $ p_1 $ and $ p_2 $ in our
  226. implication graph is enough to determine satisfiability.
  227.  
  228. We have that an edge between any two pair of vertices $ u,v $ exists if and only if
  229. an implication $ (u \Rightarrow v) $ existed in our transformed 2-CNF-SAT instance for
  230. corresponding terms of $ u $ and $ v $. Therefore, for any two endpoints $ s, t $ of any path
  231. in $ G $, we have that $ (s \Rightarrow t) $, and so if we can find paths $ p_1 $ and $ p_2 $,
  232. we have will have shown
  233. $(\lnot t \Rightarrow t) $ and $ (t \Rightarrow \lnot t)$. $ \blacksquare $
  234.  
  235. % paragraph Proof (end)
  236.  
  237. % section 2-CNF-SAT (end)
  238.  
  239. \section{Hamiltonian Path} % (fold)
  240. \label{sec:Hamiltonian Path}
  241. \begin{prop}
  242. The hamiltonian-path problem is NP-complete.
  243. \end{prop}
  244. \paragraph{Proof} % (fold)
  245. \label{par:Proof}
  246. We first show that the hamiltonian-path problem belongs to NP. Let a certificate for the problem
  247. be a path $ p = (v_0,\,\dots\, , v_k)$ where $ k = |V| - 1 $.
  248. Then we can verify in polynomial time if for every
  249. \mbox{$ v_{i-1}, v_i \in p $} with $ i \in [1, k] $, there exists edge $ \{v_{i-1}, v_i\} \in E$.
  250.  
  251. To prove that it is NP-complete, we reduce the problem from the hamiltonian-cycle problem which
  252. is NP-complete. Given some instance $ G = (V,E) $ for the hamiltonian-cycle problem, we define
  253. a graph $ G^{\prime} = (V^{\prime}, E^{\prime})$ for the hamiltonian-path problem.
  254. The vertex set $ V^{\prime} $ has an extra vertex $ u $. Vertex $ u $ corresponds to some
  255. vertex $ v \in V $, in the sense that $ \{u, w\} \in E^{\prime} $ if and only if $ \{v, w\} \in E $
  256. for all $ w \in V $. In addition, $ V^{\prime} $ also contains two other vertices $ x $ and $ y $.
  257. These two vertices only have one incident edge each: one connects to $ u $, and the other connects
  258. to $ v $.
  259.  
  260. We must show that hamiltonian cycle exists in $ G $ if and only if a hamiltonian path exists in
  261. $ G^{\prime} $.
  262.  
  263. \begin{enumerate}[a.]
  264. \item
  265. \textbf{Hamiltonian-cycle $ \Rightarrow $ hamiltonian-path}:
  266. We know any hamiltonian-path in $ G^{\prime} $ has to have $ x $ and $ y $ as endpoints
  267. necessarily, since they have degree 1 each.
  268. Suppose we can find the cycle $ c = v\leadsto w \rightarrow v $ in $ G $, then we have
  269. that edge $ \{w, u\}\in E^{\prime} $ since $ \{w, v\} \in E $
  270. In addition, we know $ v $ and $ u $ are each connected
  271. to different endpoints $ x, y $. Therefore, we have that the existence of the cycle
  272. in $ G $ implies a hamiltonian-path
  273. $ p_h = (x \rightarrow v \leadsto w \rightarrow u \rightarrow y) $.
  274.  
  275. \item
  276. \textbf{Hamiltonian-path $ \Rightarrow $ hamiltonian-cycle}:
  277. Suppose we have
  278. $p_h = (x \rightarrow v \leadsto w \rightarrow u \rightarrow y) $.
  279. We know $ u $ corresponds to $ v $, so we know $ \{w, u\} \in E^{\prime} \Rightarrow
  280. \{w, v\}\in E $. Therefore we can remove each endpoint in $ p_h $, and substitute
  281. $ u $ with $ v $, obtaining the cycle $ c = v\leadsto w \rightarrow v $.
  282. \end{enumerate}
  283.  
  284. We show that it is enough to pick only one $ v \in V $ to correspond with $ u \in V^{\prime} $.
  285. We know that any hamiltonian cycle has to have all of the vertices in the vertex set. We also
  286. know that given any hamiltonian cycle, we can obtain a hamiltonian path by removing any edge
  287. in the cycle. Therefore we can start our cycle at any arbitrary $ v $, and still obtain
  288. a hamiltonian path by removing one of its incident edges. Since we have that $ u $ corresponds
  289. to $ v $, then we have that we can choose $ v $ arbitrarily and connect our end points
  290. as described previously.
  291.  
  292. We need to show that we can do this reduction in polynomial time. We copy the vertex set
  293. $ V $ and edge set $ E $ to create $ G^{\prime} $, with the addition of adding three
  294. new vertices, and at most $ 2 + |V|-1 $ edges. Therefore our reduction is polynomial.
  295. $ \blacksquare $
  296. % paragraph Proof (end)
  297.  
  298. % section Hamiltonian Path (end)
  299.  
  300. \section{Matrix Max Strips} % (fold)
  301. \label{sec:Matrix Max Strips}
  302. \begin{enumerate}[a]
  303. \renewcommand\labelenumi{\bfseries\theenumi.}
  304. \item
  305. Define decision problem as
  306. $$ \mathrm{MAXSTRIP} = \{M_{m\times n} \::\:
  307. \text{Exists a permutation of rows of $ M $ where we can obtain at least $ k $ strips.}\}$$
  308.  
  309. \item
  310. \begin{prop}
  311. MAXSTRIP is NP-complete.
  312. \end{prop}
  313. \paragraph{Proof} % (fold)
  314. \label{par:Proof}
  315. A certificate will be a specific instance matrix $ A $, and we can check if it contains
  316. at least $ k $ strips. We can count the strips easily in polynomial time.
  317.  
  318. To prove it is NP-complete, we need to reduce from the hamiltonian path problem.
  319. Could not solve this one \texttt{:(}
  320. % paragraph Proof (end)
  321.  
  322. \end{enumerate}
  323. % section Matrix Max Strips (end)
  324.  
  325. \section{Independent Set} % (fold)
  326. \label{sec:Independent Set}
  327. \begin{enumerate}[a.]
  328. \renewcommand\labelenumi{\bfseries\theenumi.}
  329. \item We define the related decision problem to the independent-set problem
  330. as
  331. $$ \mathrm{INDSET} = \{G=(V, E) \::\: \text{Exists an independent set of $ G $ of cardinality
  332. at least $ k $.}\}$$
  333.  
  334. \begin{prop}
  335. INDSET is NP-complete.
  336. \end{prop}
  337. \paragraph{Proof} % (fold)
  338. \label{par:Proof}
  339. We first show this problem is in NP. We let an arbitrary subset of size $ k $ be a
  340. certificate for this problem. We can verify if it is independent in $ O(|V|^2) $ time
  341. by checking that none of the vertices in the given set are adjacent to any other.
  342.  
  343. To show that it is NP-complete, we reduce from the clique problem, which is NP-complete.
  344. We let $ G $ be an instance of the clique problem, and we let $ G^{\prime} = G^T$.
  345.  
  346. Now we show that $ C \subseteq V $ is a clique in $ G $ if and only if $ C $ is an independent
  347. set in $ G^T $.
  348. \begin{enumerate}[a.]
  349. \item
  350. \textbf{Clique $ \Rightarrow $ independent set}
  351. We have that a clique is a complete subgraph of $ G $. Therefore,
  352. when we transpose $ G $, none of the vertices in a clique will be adjacent
  353. to any other vertex in the clique. That is, the vertices in the clique
  354. will be independent in $ G^T $.
  355. \item
  356. \textbf{Independent set $ \Rightarrow $ clique}
  357. We have that none of the vertices in an independent set are adjacent to any other
  358. vertex in the set. Therefore, when we transpose $ (G^T)^T = G $, we connect
  359. every vertex in the independent set of $ G^T $ to every other vertex in the set.
  360. Therefore, we obtain a complete subgraph of $ G $, or a clique in $ G $.
  361. \end{enumerate}
  362.  
  363. We can do the reduction in time $ O(|V|^2) $.
  364. The vertex sets in both graphs are the same. To construct the edge set,
  365. we pick a vertex $ v\in V $ and check if $ \{v,u\} \in E $ for every other $ u \in V $.
  366. We add those $ \{v, u\} \centernot\in E$ to the edge set of $ G^T $.
  367. $ \blacksquare $
  368. % paragraph Proof (end)
  369.  
  370. \item
  371. We can follow a similar argument as in Question 1, part b and part c. We first obtain the maximum
  372. cardinality $ m $ of a maximum independent set with binary search in $ O(\log_2 |V|) $.
  373.  
  374. We now construct the solution to the functional problem.
  375.  
  376. We create $ W \gets V $, and $ I \gets \emptyset $.
  377. We start by assigning $ w $ an arbitrary vertex in $ W $ that we have not picked before.
  378. We run our blackbox subroutine with
  379. vertex set $ W\backslash\{w\} $. If the answer is no, we know this vertex is an element
  380. of a maximum-cardinality independent set of $ G $. If the answer is yes, we know that
  381. even when we remove this vertex, we can still obtain a maximum-cardinality independent
  382. set. Therefore, if the answer was yes, we assign $ W \gets W\backslash\{w\}$; otherwise,
  383. $ W $ remains unchanged, and $ I \gets I\cup\{w\} $.
  384. We now pick another arbitrary $ w $ from $ W $ not yet picked, and repeat this process
  385. until we have tried every vertex in $ W $.
  386.  
  387. \paragraph{Proof} % (fold)
  388. \label{par:Proof}
  389. We examine every vertex only once, and decide whether to include it or not
  390. in our solution after our blackbox subroutine returns an answer in $ O(1) $.
  391. Therefore, $ I $ is constructed in $ O(|V|) $ time.
  392.  
  393. We have that any $ I \in [0, |V|]$.
  394. Originally, we have that $ W = V $,
  395. The proof that $ I $ indeed corresponds to a solution follows directly from our
  396. decision problem. Every time we pick $w $, we will either remove it from
  397. $ W $, or keep it. We remove it if our subroutine told us that $ w $ was not
  398. necessary to construct maximum independent set from the set $ W\backslash\{w\} $.
  399. We keep it if the subroutine told us we could no longer obtain a maximum independent
  400. set by removing $ w $. Therefore, by the time the execution stops, we have examined
  401. every vertex in $ V $ and removed it or kept it in $ W $. In the end, we have that $ W = I $,
  402. and so $ I $ is maximum.
  403. $ \blacksquare $
  404. % paragraph Proof (end)
  405.  
  406. \item
  407. We claim that if $ G $ is connected, then the size of a maximum independent set $ I $
  408. is $ |I| = \lfloor |V|/ 2 \rfloor $. If $ G $ is not connected, then every vertex
  409. in some component is independent of any other vertex in any other component.
  410.  
  411. Therefore, we find maximum independent sets for every component in $ G $, and
  412. obtain the maximum independent set $ I $ of $ G $ by performing a union over all of them.
  413.  
  414. To obtain the components of $ G $, we pick an arbitrary root $ s \in V$, and construct a
  415. BFS tree $ T $ of $ G $ rooted at $ s $.
  416. If not every vertex belongs to $T $, then we run BFS again with the remaining vertices,
  417. and an arbitrary root from the remaining vertices.
  418. We repeat this process until every $ v \in V $ is part of some BFS tree.
  419.  
  420. We assume we use an adjacency list representation of the graph.
  421. The running time of this process is for the best case, calling BFS once, and for the worst
  422. case, calling BFS $ O(|V|) $ times. However, if we call it $ O(|V|) $ times, we know
  423. all the adjacency lists for all the vertices were empty, and so we can state the running time as
  424. just that of BFS $ O(|V| + |E|) $.
  425.  
  426. For each component, we pick some leaf $ l $
  427. from the corresponding BFS tree, and include every vertex
  428. who is at an even distance from $ l $.
  429. Denote $ I_i $ to be the maximum independent set
  430. of some component $ C_i $. Then we have $ I = \bigcup I_i$. The time to construct each $ I_i $
  431. is linear in the size of the component $ C_i $, and the time to perform the union of all of them
  432. is linear in $ |V| $. Therefore the running time of the whole algorithm is $ O(|V| + |E|) $.
  433.  
  434. \paragraph{Proof} % (fold)
  435. \label{par:Proof}
  436. No vertex is indepedent of any other vertex it is adjacent too. Therefore, if we
  437. have a connected graph, the maximum indepedent set has to necessarily be at most half
  438. the size of the vertex set for that connected component. We take the floor to handle the
  439. cases for odd-valued vertex set cardinalities.
  440.  
  441. That every vertex in some connected component
  442. is independent of every other vertex in a different connected component
  443. follows directly from the definition of connected components.
  444.  
  445. We now show that picking we can pick any leaf $ l $ in a BFS tree to get $ I_i $ for component
  446. $ C_i $. We know that with the constraint of $ d(x) \le 2 $ for any $ x \in V $, a tree
  447. can only have at most 2 leaves. Additionally, we know that either the connected component
  448. is a simple path, or it is a cycle. If we have the case of a cycle, we can pick any arbitrary
  449. vertex $ u $ as part of our indepedenent set approximation, and add every vertex with even distance
  450. to $ u $. If we have a simple path, then we necesarilly want to start from an endpoint
  451. to guarantee we obtain the maximum indepedent set following the same process. In
  452. our BFS tree, picking a leaf $ l $ guarantees we start from this endpoint.
  453. In general, we only check for this case, because in the case of a cycle, we can still pick
  454. $ l $ since we can pick any $ v \in V $ as a starting point.
  455. $ \blacksquare $
  456. % paragraph Proof (end)
  457.  
  458. \item
  459. We know that an upper bound for a maximum size independent set is the whole vertex set
  460. itself. We also know that in a bipartite graph with vertex set $ V = V_1 \cup V_2 $,
  461. the lower bound for the size of a maximum indepedent set is the maximum of $ |V_1| $ and $ |V_2| $.
  462.  
  463.  
  464. \begin{prop}
  465. The cardinality of $ V $ is equal to the sum of
  466. cardinalities of a maximum independent set $ I $
  467. and a maximum matching $ M $ of $ G $.
  468. \end{prop}
  469. \paragraph{Proof} % (fold)
  470. \label{par:Proof}
  471. We start by assuming our bipartite graph has an empty edge set $ E $, and so $ |I| = |V| $.
  472. Now, consider $ |I| = |V| - 1 $. Then this means there is at least one edge in $ E $ connecting
  473. a vertex $ v \in V_1 $ to some other vertex $ u \in V_2 $. Therefore, we cannot include
  474. this vertex $ v $ in $ I $ without having to remove $ u $ first. Now consider
  475. $ |I| = |V| - 2 $. We have the first case, and additionally a second edge connecting
  476. a different $ v^{\prime} \in V_1 $ to a different $ u^{\prime} \in V_2 $, and so
  477. the argument is similar for this pair of vertices.
  478. In general, we can have at most $ \min\{|V_1|,\;|V_2|\} $ such edges.
  479. These edges represent a maximum matching $ M $ in $ G $.
  480. Therefore, we have that
  481. \begin{align*}
  482. &&|I| &= |V| - |M|
  483. \\
  484. &&\Rightarrow \quad |V| &= |I| + |M|
  485. \end{align*}
  486. % paragraph Proof (end)
  487. Didn't have time to prove the construction of the actual set $ I $. The maximum can be obtained
  488. with the reduction of maximum matching from our previous assignment, to a maximum flow problem
  489. by adding a sink and a source.
  490. \end{enumerate}
  491. % section Independent Set (end)
  492.  
  493. %\end{spacing}
  494. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement