<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552%2F%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F%2F%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7</id>
	<title>418531 ภาคต้น 2552/โจทย์ปัญหาอัลกอริทึมเกี่ยวกับกราฟ/เฉลยข้อ 7 - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="http://158.108.32.49/wiki/index.php?action=history&amp;feed=atom&amp;title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552%2F%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F%2F%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7"/>
	<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;action=history"/>
	<updated>2026-05-04T12:39:20Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7447&amp;oldid=prev</id>
		<title>Cardcaptor เมื่อ 13:48, 16 กันยายน 2552</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7447&amp;oldid=prev"/>
		<updated>2009-09-16T13:48:23Z</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=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 13:48, 16 กันยายน 2552&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;แถว 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== การ preprocess ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== การ preprocess ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;}(r) \,&amp;lt;/math&amp;gt; (เรียก &amp;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;} \,&amp;lt;/math&amp;gt; จาก root)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;DFS&lt;/ins&gt;}(r) \,&amp;lt;/math&amp;gt; (เรียก &amp;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;DFS&lt;/ins&gt;} \,&amp;lt;/math&amp;gt; จาก root)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ขั้นตอนนี้ใช้เวลา  &amp;lt;math&amp;gt;O(|V| + |E|) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ขั้นตอนนี้ใช้เวลา  &amp;lt;math&amp;gt;O(|V| + |E|) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&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-l20&quot; &gt;แถว 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;สมมติว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว path จาก &amp;lt;math&amp;gt;r \,&amp;lt;/math&amp;gt; ไปยัง &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; จะต้องผ่าน &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;สมมติว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว path จาก &amp;lt;math&amp;gt;r \,&amp;lt;/math&amp;gt; ไปยัง &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; จะต้องผ่าน &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;} \,&amp;lt;/math&amp;gt; จาก &amp;lt;math&amp;gt;r \,&amp;lt;/math&amp;gt; เราจะได้ว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; จะถูกสำรวจก่อน &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;DFS&lt;/ins&gt;} \,&amp;lt;/math&amp;gt; จาก &amp;lt;math&amp;gt;r \,&amp;lt;/math&amp;gt; เราจะได้ว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; จะถูกสำรวจก่อน &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ฉะนั้น &amp;lt;math&amp;gt;\mathrm{pre}[u] &amp;lt; \mathrm{pre}[v] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ฉะนั้น &amp;lt;math&amp;gt;\mathrm{pre}[u] &amp;lt; \mathrm{pre}[v] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ไปถึง &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; เราจะได้ว่า &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; จะต้องถูกสำรวจเสร็จก่อนที่ &amp;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;} \,&amp;lt;/math&amp;gt; จะสำรวจ &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เสร็จ กล่าวคือ &amp;lt;math&amp;gt;\mathrm{post}[v] &amp;lt; \mathrm{post}[u] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ไปถึง &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; เราจะได้ว่า &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; จะต้องถูกสำรวจเสร็จก่อนที่ &amp;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;DFS&lt;/ins&gt;} \,&amp;lt;/math&amp;gt; จะสำรวจ &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เสร็จ กล่าวคือ &amp;lt;math&amp;gt;\mathrm{post}[v] &amp;lt; \mathrm{post}[u] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ฉะนั้นเราสรุปได้ว่า &amp;lt;math&amp;gt;\mathrm{pre}[u] &amp;lt; \mathrm{pre}[v] &amp;lt; \mathrm{post}[v] &amp;lt; \mathrm{post}[u] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ฉะนั้นเราสรุปได้ว่า &amp;lt;math&amp;gt;\mathrm{pre}[u] &amp;lt; \mathrm{pre}[v] &amp;lt; \mathrm{post}[v] &amp;lt; \mathrm{post}[u] \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7442&amp;oldid=prev</id>
		<title>Cardcaptor: /* การตอบคำถามว่า u \, เป็นลูกหลานของ v \, หรือไม่ */</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7442&amp;oldid=prev"/>
		<updated>2009-09-16T13:39:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;การตอบคำถามว่า u \, เป็นลูกหลานของ v \, หรือไม่&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 13:39, 16 กันยายน 2552&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-l4&quot; &gt;แถว 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ขั้นตอนนี้ใช้เวลา  &amp;lt;math&amp;gt;O(|V| + |E|) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ขั้นตอนนี้ใช้เวลา  &amp;lt;math&amp;gt;O(|V| + |E|) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เป็นลูกหลานของ &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; หรือไม่ ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เป็นบรรพบุรุษของ &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; หรือไม่ ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;กำหนด vertex &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; และ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; สอง vertex ใดๆ ในต้นไม้ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; มาให้ เราสามารถตรวจสอบได้ว่า&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;กำหนด vertex &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; และ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; สอง vertex ใดๆ ในต้นไม้ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; มาให้ เราสามารถตรวจสอบได้ว่า&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ได้หรือไม่ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ได้หรือไม่ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7441&amp;oldid=prev</id>
		<title>Cardcaptor เมื่อ 13:37, 16 กันยายน 2552</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7441&amp;oldid=prev"/>
		<updated>2009-09-16T13:37:48Z</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=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;th&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;←รุ่นแก้ไขก่อนหน้า&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;รุ่นแก้ไขเมื่อ 13:37, 16 กันยายน 2552&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-l6&quot; &gt;แถว 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== การตอบคำถามว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; หรือไม่ ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== การตอบคำถามว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; หรือไม่ ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;กำหนด vertex &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; และ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; สอง vertex ใดๆ ในต้นไม้ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; มาให้ เราสามารถตรวจสอบได้ว่า&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;กำหนด vertex &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; และ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; สอง vertex ใดๆ ในต้นไม้ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; มาให้ เราสามารถตรวจสอบได้ว่า&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เป็นลูกหลานของ &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ได้หรือไม่ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เป็นบรรพบุรุษของ &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ได้หรือไม่ดังต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;] &amp;lt; \mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;]\,&amp;lt;/math&amp;gt; หรือไม่&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;\mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;] &amp;lt; \mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;]\,&amp;lt;/math&amp;gt; หรือไม่&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;การตรวจสอบนี้ใช้เวลา &amp;lt;math&amp;gt;O(1) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;การตรวจสอบนี้ใช้เวลา &amp;lt;math&amp;gt;O(1) \,&amp;lt;/math&amp;gt;&lt;/div&gt;&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-l14&quot; &gt;แถว 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;แถว 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ที่เหลือคือเราต้องพิสูจน์ว่าการทดสอบนี้ถูกต้อง ซึ่งเท่ากับการพิูสูจน์ขอ้ความสองข้อความต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ที่เหลือคือเราต้องพิสูจน์ว่าการทดสอบนี้ถูกต้อง ซึ่งเท่ากับการพิูสูจน์ขอ้ความสองข้อความต่อไปนี้&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เป็นลูกหลานของ &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว &amp;lt;math&amp;gt;\mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;] &amp;lt; \mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;]\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เป็นบรรพบุรุษของ &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว &amp;lt;math&amp;gt;\mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;] &amp;lt; \mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;]\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ไม่ใช่ลูกหลานของ &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว ข้อความ &amp;quot;&amp;lt;math&amp;gt;\mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;] &amp;lt; \mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;] \,&amp;lt;/math&amp;gt;&amp;quot; ไม่เป็นความจริง&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ไม่ใช่บรรพบุรุษของ &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว ข้อความ &amp;quot;&amp;lt;math&amp;gt;\mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;] &amp;lt; \mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;] \,&amp;lt;/math&amp;gt;&amp;quot; ไม่เป็นความจริง&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== ข้อความที่ 1 ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== ข้อความที่ 1 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เป็นลูกหลานของ &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;แล้วจะมี &lt;/del&gt;path &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ใน &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;จาก &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ไปถึง &lt;/del&gt;&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เป็นบรรพบุรุษของ &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;แล้ว &lt;/ins&gt;path &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;จาก &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;r &lt;/ins&gt;\,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ไปยัง &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;จะต้องผ่าน &lt;/ins&gt;&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;เนื่องจาก &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เป็นต้นไม้ DFS tree ของ &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;คือตัว &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เอง&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;ฉะนั้นเมื่อทำ &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\mathrm{DFSALL} \,&amp;lt;/math&amp;gt; จาก &amp;lt;math&amp;gt;r \,&amp;lt;/math&amp;gt; เราจะได้ว่า &amp;lt;math&amp;gt;u &lt;/ins&gt;\,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;จะถูกสำรวจก่อน &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;ฉะนั้น &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\mathrm{pre}[u] &amp;lt; \mathrm{pre}[v] &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;ฉะนั้น path จาก &lt;/del&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ไปยัง &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ใน &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;จึงเป็น path จาก &lt;/del&gt;&amp;lt;math&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ไปยัง&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;นอกจากนี้ เนื่องจากเราสามารถเดินจาก &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ไปถึง &lt;/ins&gt;&amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เราจะได้ว่า &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v &lt;/ins&gt;\,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;จะต้องถูกสำรวจเสร็จก่อนที่ &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\mathrm{DFSALL} &lt;/ins&gt;\,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;จะสำรวจ &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u &lt;/ins&gt;\,&amp;lt;/math&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;เสร็จ กล่าวคือ &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\mathrm{post}[v] &amp;lt; \mathrm{post}[&lt;/ins&gt;u&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ใน DFS tree ด้วย&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;ฉะนั้น &lt;/del&gt;&amp;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;}&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/del&gt;u&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;จะุถูกเรียกหลังจาก &lt;/del&gt;&amp;lt;math&amp;gt;\mathrm{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DFSALL&lt;/del&gt;}&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/del&gt;v&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;เริ่มทำงานแล้ว และจะจบการทำงานก่อน &lt;/del&gt;&amp;lt;math&amp;gt;\&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mathrm{DFSALL}(u) &lt;/del&gt;\,&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;จะจบการทำงานด้วย ฉะนั้นเราจะได้ว่า &lt;/del&gt;&amp;lt;math&amp;gt;\mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/del&gt;] &amp;lt; \mathrm{pre}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/del&gt;] &amp;lt; \mathrm{post}[v&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/del&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;ฉะนั้นเราสรุปได้ว่า &lt;/ins&gt;&amp;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pre}[u] &amp;lt; \mathrm{pre}[v] &amp;lt; \mathrm{post}[v] &amp;lt; \mathrm{post&lt;/ins&gt;}&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;u&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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 สมมูลกับข้อความที่ว่า &amp;quot;ถ้า &lt;/ins&gt;&amp;lt;math&amp;gt;\mathrm{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/ins&gt;}&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[u] &amp;lt; \mathrm{pre}[&lt;/ins&gt;v&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &amp;lt; \mathrm{post}[v] &amp;lt; \mathrm{post}[u] &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;แล้ว &lt;/ins&gt;&amp;lt;math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u &lt;/ins&gt;\&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;สมมติว่า &lt;/ins&gt;&amp;lt;math&amp;gt;\mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u&lt;/ins&gt;] &amp;lt; \mathrm{pre}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;v&lt;/ins&gt;] &amp;lt; \mathrm{post}[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;u] \,&amp;lt;/math&amp;gt; เราได้ว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นบรรพบุรุษของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ใน DFS tree&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;แต่เนื่องจากกราฟตั้งต้น &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; เป็นต้่นไม้อยู่แล้ว &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; จึงเป็น DFS tree ด้วย ดังนั้น &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; จึงเป็นบรรพบุรุษของ &amp;lt;math&amp;gt;&lt;/ins&gt;v &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\,&amp;lt;/math&amp;gt; ใน &amp;lt;math&amp;gt;T &lt;/ins&gt;\,&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
	<entry>
		<id>http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7440&amp;oldid=prev</id>
		<title>Cardcaptor: หน้าที่ถูกสร้างด้วย &#039;== การ preprocess == ให้ทำ &lt;math&gt;\mathrm{DFSALL}(r) \,&lt;/math&gt; (เรียก &lt;math&gt;\mathrm{DFSALL} \,&lt;/math&gt; จาก r…&#039;</title>
		<link rel="alternate" type="text/html" href="http://158.108.32.49/wiki/index.php?title=418531_%E0%B8%A0%E0%B8%B2%E0%B8%84%E0%B8%95%E0%B9%89%E0%B8%99_2552/%E0%B9%82%E0%B8%88%E0%B8%97%E0%B8%A2%E0%B9%8C%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%A5%E0%B8%81%E0%B8%AD%E0%B8%A3%E0%B8%B4%E0%B8%97%E0%B8%B6%E0%B8%A1%E0%B9%80%E0%B8%81%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%A7%E0%B8%81%E0%B8%B1%E0%B8%9A%E0%B8%81%E0%B8%A3%E0%B8%B2%E0%B8%9F/%E0%B9%80%E0%B8%89%E0%B8%A5%E0%B8%A2%E0%B8%82%E0%B9%89%E0%B8%AD_7&amp;diff=7440&amp;oldid=prev"/>
		<updated>2009-09-16T13:16:05Z</updated>

		<summary type="html">&lt;p&gt;หน้าที่ถูกสร้างด้วย &amp;#039;== การ preprocess == ให้ทำ &amp;lt;math&amp;gt;\mathrm{DFSALL}(r) \,&amp;lt;/math&amp;gt; (เรียก &amp;lt;math&amp;gt;\mathrm{DFSALL} \,&amp;lt;/math&amp;gt; จาก r…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== การ preprocess ==&lt;br /&gt;
ให้ทำ &amp;lt;math&amp;gt;\mathrm{DFSALL}(r) \,&amp;lt;/math&amp;gt; (เรียก &amp;lt;math&amp;gt;\mathrm{DFSALL} \,&amp;lt;/math&amp;gt; จาก root)&lt;br /&gt;
&lt;br /&gt;
ขั้นตอนนี้ใช้เวลา  &amp;lt;math&amp;gt;O(|V| + |E|) \,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== การตอบคำถามว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; หรือไม่ ==&lt;br /&gt;
กำหนด vertex &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; และ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; สอง vertex ใดๆ ในต้นไม้ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; มาให้ เราสามารถตรวจสอบได้ว่า&lt;br /&gt;
&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ได้หรือไม่ดังต่อไปนี้&lt;br /&gt;
&lt;br /&gt;
: ตรวจสอบว่า &amp;lt;math&amp;gt;\mathrm{pre}[v] &amp;lt; \mathrm{pre}[u] &amp;lt; \mathrm{post}[u] &amp;lt; \mathrm{post}[v]\,&amp;lt;/math&amp;gt; หรือไม่&lt;br /&gt;
&lt;br /&gt;
การตรวจสอบนี้ใช้เวลา &amp;lt;math&amp;gt;O(1) \,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ที่เหลือคือเราต้องพิสูจน์ว่าการทดสอบนี้ถูกต้อง ซึ่งเท่ากับการพิูสูจน์ขอ้ความสองข้อความต่อไปนี้&lt;br /&gt;
&lt;br /&gt;
# ถ้า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว &amp;lt;math&amp;gt;\mathrm{pre}[v] &amp;lt; \mathrm{pre}[u] &amp;lt; \mathrm{post}[u] &amp;lt; \mathrm{post}[v]\,&amp;lt;/math&amp;gt;&lt;br /&gt;
# ถ้า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ไม่ใช่ลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้ว ข้อความ &amp;quot;&amp;lt;math&amp;gt;\mathrm{pre}[v] &amp;lt; \mathrm{pre}[u] &amp;lt; \mathrm{post}[u] &amp;lt; \mathrm{post}[v] \,&amp;lt;/math&amp;gt;&amp;quot; ไม่เป็นความจริง&lt;br /&gt;
&lt;br /&gt;
=== ข้อความที่ 1 ===&lt;br /&gt;
สมมติว่า &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; เป็นลูกหลานของ &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; แล้วจะมี path ใน &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; จาก &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ไปถึง &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
เนื่องจาก &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; เป็นต้นไม้ DFS tree ของ &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; คือตัว &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; เอง&lt;br /&gt;
&lt;br /&gt;
ฉะนั้น path จาก &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ไปยัง &amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ใน &amp;lt;math&amp;gt;T \,&amp;lt;/math&amp;gt; จึงเป็น path จาก &amp;lt;math&amp;gt;v \,&amp;lt;/math&amp;gt; ไปยัง&lt;br /&gt;
&amp;lt;math&amp;gt;u \,&amp;lt;/math&amp;gt; ใน DFS tree ด้วย&lt;br /&gt;
&lt;br /&gt;
ฉะนั้น &amp;lt;math&amp;gt;\mathrm{DFSALL}(u) \,&amp;lt;/math&amp;gt; จะุถูกเรียกหลังจาก &amp;lt;math&amp;gt;\mathrm{DFSALL}(v) \,&amp;lt;/math&amp;gt; เริ่มทำงานแล้ว และจะจบการทำงานก่อน &amp;lt;math&amp;gt;\mathrm{DFSALL}(u) \,&amp;lt;/math&amp;gt; จะจบการทำงานด้วย ฉะนั้นเราจะได้ว่า &amp;lt;math&amp;gt;\mathrm{pre}[v] &amp;lt; \mathrm{pre}[u] &amp;lt; \mathrm{post}[u] &amp;lt; \mathrm{post}[v] \,&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cardcaptor</name></author>
		
	</entry>
</feed>