<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=211L9Solutions</id>
	<title>211L9Solutions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=211L9Solutions"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=211L9Solutions&amp;action=history"/>
	<updated>2026-04-03T18:38:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=211L9Solutions&amp;diff=284&amp;oldid=prev</id>
		<title>Mark: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=211L9Solutions&amp;diff=284&amp;oldid=prev"/>
		<updated>2008-03-08T22:35:28Z</updated>

		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:35, 8 March 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=211L9Solutions&amp;diff=283&amp;oldid=prev</id>
		<title>Mark at 06:35, 25 September 2006</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=211L9Solutions&amp;diff=283&amp;oldid=prev"/>
		<updated>2006-09-25T06:35:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Lecture 9==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. Prove that if G = (V,E) is a tree then there exists exactly one path from any vertex x in G to any other vertex y in G.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
By definition a tree is connected and contains no cycles.&lt;br /&gt;
&lt;br /&gt;
To prove by contradiction, Say there are two or more paths from a given vertex x to y. If you look at these two paths in isolation, there is a clear cycle. For an n number of paths between two nodes, there are n! loops. This contradicts the property of a tree and therefore there can only be one path between the vertices x and y in G.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. Prove that the following statements for a connected graph G = (V,E) are equivalent:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;(a) The graph G is a tree.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;(b) If an edge is removed from E then the resulting graph is not connected.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;(c) If a new edge is put into E then the resulting graph contains a cycle.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If the graph is a tree, then there is only one path from two vertices in the graph x to y. If an edge between these two is removed, then there is no path between them and they are no longer connected. In other words (a) and (b) are equivalent.&lt;br /&gt;
&lt;br /&gt;
If the graph is a tree, then there is only one path from two vertices in the graph x to y. If an edge is added to this graph, then there  can potentially be two paths from x to y. If it is the case that by adding an edge to the graph and the resulting graph contains a cycle, then it must be the case that the current graph is a tree.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. This exercise extends the SpanningT ree2(G) algorithm. A connected graph G = (V,E) is weighted if every edge e in the graph has exactly one number w(e) associated with it, called the weight of e. Let T = (V,E) be a spanning tree of G. The weight of T , denoted by w(T ), is the sum of all weights of the edges of T . We say T = (V1,E1) is a minimal spanning tree for G if the following conditions are satisfied:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;(a) T is a spanning tree of G.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;(b) The weight of any other spanning tree for G is not smaller that the weight of T .&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Modify the algorithm SpanningTree2(G) to build a minimal spanning tree for a given weighted connected graph G. Prove the correctness of your algorithm.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;4. Consider the bipartite graph in Figure1. On this graph consider the reachability games for the following values of X: {a, b}, {7}, {e, 3, 5}, {a, 1}, and {0, a, b}. For each of these reachability games find the winning vertices for Player 0 by computing their ranks.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
x:{a, b}&lt;br /&gt;
X0 = {a,b}, X1 = {2,6,4}, X2 = {e,f,d}, X3 = {5,3}, X4 = {j,i}, X5 = {7}, X6 = 0.&lt;br /&gt;
&lt;br /&gt;
x:{7}&lt;br /&gt;
X0 = {7}, X1 = 0.&lt;br /&gt;
&lt;br /&gt;
x:{e, 3, 5}&lt;br /&gt;
X0 = {e,3,5}, X1 = {b,j}, X2 = {6,i,m}, X3 = {f}, X4 = {7}, X5 = {7}, X6 = 0.&lt;br /&gt;
&lt;br /&gt;
x:{0, a, b}&lt;br /&gt;
X0 = {0,a,b}, X1 = {2,6,4}, X2 = {e,f,d,3,1}, X3 = {5,m}, X4 = {j,i,k,c}, X5 = {7}, X6 = 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;5. Let 􀀀 be a reachability game on a bipartite graph G = (V0 ∪ V1,E) with set X ⊆ V . Let v0, . . . , vk be a play. We say that this play is produced by k moves made by the players. Prove that rank(v) = n if and only if Player 0 can reach set X in at most n moves made by the players no matter what moves the opponent makes.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Base case. Assume that rank(v) = 0. Then, by the definition of X0, v ∈ X0. Since X0 = X, any play from v is won by Player 0.&lt;br /&gt;
&lt;br /&gt;
*Our inductive assumption is this:&lt;br /&gt;
All the vertices q such that rank(q) ≤ k are winning for Player 0.&lt;br /&gt;
&lt;br /&gt;
Now, let the rank of v be k + 1. For the vertex v there are two cases. Using the inductive hypothesis we want to show that v is a winning vertex for Player 0.&lt;br /&gt;
*Case 1: v ∈ V1. In this case, for every edge (v, u) it must be the case that rank(u) ≤ k. Thus, all moves of Player 1 from v go to vertices of strictly smaller ranks. All the vertices of smaller ranks are, by inductive hypothesis, winning for Player 0. Therefore, no matter where Player 1 moves from v, the move goes to a vertex that is a winning vertex for Player 0. Therefore v is a winning vertex for Player 0.&lt;br /&gt;
*Case 2: v ∈ V0. In this case there must exist an edge (v, u) such that rank(u) = k since rank(v) = k +1. Thus, Player 0 does the following. From vertex v, the player moves to u. Since rank(u) = k, we can apply the inductive hypothesis by which Player 0 can guarantee a win from u. Therefore v is a winning vertex for Player 0. Thus, we have proved that every ranked vertex is a winning vertex for Player 0.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;6. Write down an algorithm that takes as input a reachability game and outputs the winning vertices for Player 0 and winning vertices for Player 1. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;7. Let G be a reachability game. Fix a positive integer n. We say that a vertex v is n-winning if Player 0 can guarantee that the set X is reached at least n times no matter what the opponent does. Design an algorithm that finds all n-winning vertices. Prove correctness of your algorithm.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Basis. &lt;br /&gt;
Set X0 = X. For all v ∈ X0, declare rank(v) = 0.&lt;br /&gt;
*Inductive Step. &lt;br /&gt;
Our induction hypotheses assumes that we have the following:&lt;br /&gt;
1. We have built sets X0, X1, . . ., Xn.&lt;br /&gt;
2. For every vertex v, if v ∈ Xi then rank(v) = i. In case v does not belong to any of the sets&lt;br /&gt;
X0, X1, . . ., Xn, the rank(v) has not yet been defined.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>