<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://algorist.com/algowiki_v2/index.php?action=history&amp;feed=atom&amp;title=TADM2E_5.13</id>
		<title>TADM2E 5.13 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://algorist.com/algowiki_v2/index.php?action=history&amp;feed=atom&amp;title=TADM2E_5.13"/>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;action=history"/>
		<updated>2026-04-30T22:17:30Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=1131&amp;oldid=prev</id>
		<title>Matt: Undo revision 1062 by FuckMatt (talk)</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=1131&amp;oldid=prev"/>
				<updated>2020-08-01T01:02:07Z</updated>
		
		<summary type="html">&lt;p&gt;Undo revision 1062 by &lt;a href=&quot;/algowiki_v2/index.php/Special:Contributions/FuckMatt&quot; title=&quot;Special:Contributions/FuckMatt&quot;&gt;FuckMatt&lt;/a&gt; (&lt;a href=&quot;/algowiki_v2/index.php?title=User_talk:FuckMatt&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:FuckMatt (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:02, 1 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1) We can determine that leafs should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2) We consider again the leafs, each is degree 1. For each leaf, if we consider its parent, its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent, mark the leafs as included, and recurse as in 1) above.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3) We know we will be able to remove at most one every other node, so we use a two-coloring technique (Red/Black) and perform a post-order traversal. Let's assume we will remove all the Black node.&amp;#160; When we process a node, we also store with each node the sum over its immediate children of the respective Red and Black weight for the subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If not all of the children are Red, we need to mark the current node as Red. But we also have the option to reverse the coloring of all the Red-children's subtree. So we look at the sum over the red-children for &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Red and Black, and compare the difference of these sum to the current node's weight. If the current node's weight is above, we swap the coloring for these subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The current node will record the Black and Red sum of its children's subtree, and add its own weight to its color.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=1062&amp;oldid=prev</id>
		<title>FuckMatt: Blanked the page</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=1062&amp;oldid=prev"/>
				<updated>2020-07-31T09:36:58Z</updated>
		
		<summary type="html">&lt;p&gt;Blanked the page&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:36, 31 July 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1) We can determine that leafs should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2) We consider again the leafs, each is degree 1. For each leaf, if we consider its parent, its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent, mark the leafs as included, and recurse as in 1) above.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3) We know we will be able to remove at most one every other node, so we use a two-coloring technique (Red/Black) and perform a post-order traversal. Let's assume we will remove all the Black node.&amp;#160; When we process a node, we also store with each node the sum over its immediate children of the respective Red and Black weight for the subtree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If not all of the children are Red, we need to mark the current node as Red. But we also have the option to reverse the coloring of all the Red-children's subtree. So we look at the sum over the red-children for &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Red and Black, and compare the difference of these sum to the current node's weight. If the current node's weight is above, we swap the coloring for these subtree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The current node will record the Black and Red sum of its children's subtree, and add its own weight to its color.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>FuckMatt</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=944&amp;oldid=prev</id>
		<title>Matt: Undo revision 846 by Mgits (talk)</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=944&amp;oldid=prev"/>
				<updated>2020-07-23T15:53:47Z</updated>
		
		<summary type="html">&lt;p&gt;Undo revision 846 by &lt;a href=&quot;/algowiki_v2/index.php/Special:Contributions/Mgits&quot; title=&quot;Special:Contributions/Mgits&quot;&gt;Mgits&lt;/a&gt; (&lt;a href=&quot;/algowiki_v2/index.php?title=User_talk:Mgits&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Mgits (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:53, 23 July 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC&lt;/del&gt;)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC&lt;/del&gt;)&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)-&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;UTC&lt;/del&gt;)-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;-[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)&lt;/del&gt;--&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;We can determine that leafs should never be included into the cover. Therefore all leaves should be unmarked&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;together with all of their edges. We then repeat this process on the modified tree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;We consider again the leafs&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;each is degree 1. For each leaf&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;if we consider its parent&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mark the leafs as included&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and recurse as in 1&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;above.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;We know we will be able to remove at most one every other node&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;so we use a two&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;coloring technique &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Red/Black&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and perform a post&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;order traversal. Let's assume we will remove all the Black node.&amp;#160; When we process a node&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;we also store with each node the sum over its immediate children of the respective Red and Black weight for the subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;If not all of the children are Red&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;we need to mark the current node as Red. But we also have the option to reverse the coloring of all the Red&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;children's subtree. So we look at the sum over the red&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;children for &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Red and Black&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and compare the difference of these sum to the current node's weight. If the current node's weight is above&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;we swap the coloring for these subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The current node will record the Black and Red sum of its children's subtree&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and add its own weight to its color.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=846&amp;oldid=prev</id>
		<title>Mgits at 00:17, 20 July 2020</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=846&amp;oldid=prev"/>
				<updated>2020-07-20T00:17:51Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:17, 20 July 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We can determine that leafs should never be included into the cover. Therefore all leaves should be unmarked&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;together with all of their edges. We then repeat this process on the modified tree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)-&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;UTC&lt;/ins&gt;)-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;-[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)&lt;/ins&gt;--&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)--[[User:Mgits|Mgits]] ([[User talk:Mgits|talk]]) 00:17, 20 July 2020 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We consider again the leafs&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;each is degree 1. For each leaf&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if we consider its parent&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mark the leafs as included&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and recurse as in 1&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;above.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;3&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We know we will be able to remove at most one every other node&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;so we use a two&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;coloring technique &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Red/Black&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and perform a post&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;order traversal. Let's assume we will remove all the Black node.&amp;#160; When we process a node&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we also store with each node the sum over its immediate children of the respective Red and Black weight for the subtree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If not all of the children are Red&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we need to mark the current node as Red. But we also have the option to reverse the coloring of all the Red&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;children's subtree. So we look at the sum over the red&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;children for &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Red and Black&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and compare the difference of these sum to the current node's weight. If the current node's weight is above&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we swap the coloring for these subtree.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The current node will record the Black and Red sum of its children's subtree&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and add its own weight to its color.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mgits</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=486&amp;oldid=prev</id>
		<title>Joky: quick description of the Red-black solution for problem 3.</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=486&amp;oldid=prev"/>
				<updated>2017-01-01T01:20:59Z</updated>
		
		<summary type="html">&lt;p&gt;quick description of the Red-black solution for problem 3.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:20, 1 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2) We consider again the leafs, each is degree 1. For each leaf, if we consider its parent, its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent, mark the leafs as included, and recurse as in 1) above.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2) We consider again the leafs, each is degree 1. For each leaf, if we consider its parent, its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent, mark the leafs as included, and recurse as in 1) above.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3) We know we will be able to remove at most one every other node, so we use a two-coloring technique (Red/Black) and perform a post-order traversal. Let's assume we will remove all the Black node.&amp;#160; When we process a node, we also store with each node the sum over its immediate children of the respective Red and Black weight for the subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If not all of the children are Red, we need to mark the current node as Red. But we also have the option to reverse the coloring of all the Red-children's subtree. So we look at the sum over the red-children for &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Red and Black, and compare the difference of these sum to the current node's weight. If the current node's weight is above, we swap the coloring for these subtree.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The current node will record the Black and Red sum of its children's subtree, and add its own weight to its color.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joky</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=485&amp;oldid=prev</id>
		<title>Joky: Part 2</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=485&amp;oldid=prev"/>
				<updated>2017-01-01T00:43:56Z</updated>
		
		<summary type="html">&lt;p&gt;Part 2&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:43, 1 January 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(a&lt;/del&gt;) We can determine that &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;leaf &lt;/del&gt;should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/ins&gt;) We can determine that &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;leafs &lt;/ins&gt;should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2) We consider again the leafs, each is degree 1. For each leaf, if we consider its parent, its degree is the number of children + 1. It means that we have to choose between removing the n children of degree one or the parent of degree n+1. We remove the parent, mark the leafs as included, and recurse as in 1) above&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joky</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=302&amp;oldid=prev</id>
		<title>Cptsudoku at 15:41, 25 March 2015</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=302&amp;oldid=prev"/>
				<updated>2015-03-25T15:41:09Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:41, 25 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(b) Since the degree of the parent of a leaf is sum of degrees of all leaves + 1 we see that, again, the leaves should be left unmarked. The process after that, as shown above, is straightforward.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cptsudoku</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=300&amp;oldid=prev</id>
		<title>Cptsudoku at 15:16, 25 March 2015</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=300&amp;oldid=prev"/>
				<updated>2015-03-25T15:16:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:16, 25 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(b) Since the degree of the parent of a leaf is sum of degrees of all leaves + 1 we see that, again, the leaves should be left unmarked. The process after that, as shown above, is straightforward.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(b) Since the degree of the parent of a leaf is sum of degrees of all leaves + 1 we see that, again, the leaves should be left unmarked. The process after that, as shown above, is straightforward.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cptsudoku</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=299&amp;oldid=prev</id>
		<title>Cptsudoku at 15:15, 25 March 2015</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=299&amp;oldid=prev"/>
				<updated>2015-03-25T15:15:19Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:15, 25 March 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(b) Since the degree of the parent of a leaf is sum of degrees of all leaves + 1 we see that, again, the leaves should be left unmarked. The process after that, as shown above, is straightforward.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cptsudoku</name></author>	</entry>

	<entry>
		<id>https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=298&amp;oldid=prev</id>
		<title>Cptsudoku: Created page with &quot;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we...&quot;</title>
		<link rel="alternate" type="text/html" href="https://algorist.com/algowiki_v2/index.php?title=TADM2E_5.13&amp;diff=298&amp;oldid=prev"/>
				<updated>2015-03-25T15:04:31Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;(a) We can determine that leaf should never be included into the cover. Therefore all leaves should be unmarked, which means that all of their parents should be marked. Now we remove all leaves from the tree and all of their parents, together with all of their edges. We then repeat this process on the modified tree.&lt;/div&gt;</summary>
		<author><name>Cptsudoku</name></author>	</entry>

	</feed>