<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Holik in everything! &#187; Research</title>
	<atom:link href="http://holik.org/category/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://holik.org</link>
	<description>Jihoon&#039;s Life story.</description>
	<lastBuildDate>Tue, 02 Nov 2010 02:26:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>3G 통신 속도를 향상시키기 위한 접근 방법</title>
		<link>http://holik.org/2010/10/07/3g-%ed%86%b5%ec%8b%a0-%ec%86%8d%eb%8f%84%eb%a5%bc-%ed%96%a5%ec%83%81%ec%8b%9c%ed%82%a4%eb%a0%a4%eb%8a%94-%eb%85%b8%eb%a0%a5/</link>
		<comments>http://holik.org/2010/10/07/3g-%ed%86%b5%ec%8b%a0-%ec%86%8d%eb%8f%84%eb%a5%bc-%ed%96%a5%ec%83%81%ec%8b%9c%ed%82%a4%eb%a0%a4%eb%8a%94-%eb%85%b8%eb%a0%a5/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 16:33:15 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Mobile Computing]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless Network]]></category>

		<guid isPermaLink="false">http://holik.org/?p=1241</guid>
		<description><![CDATA[SKT의 콸콸콸콸 정책을 시작으로 3G 통신이 무제한으로 풀리면서 많은 사람들이 3G 망을 사용하고 있다. 3G 통신은 핸드폰의 전파가 잡히는 곳이면 어디에서든 사용할 수 있으므로 굉장히 유용한 통신 방법이다. 하지만 Wi-Fi 통신보다 현저히 느린 속도는 큰 단점이다. 다음의 표는 Wi-Fi로 대표되는 WLAN과 3G로 대표되는 WWAN를 비교하여 보여준다. 3G 망의 속도 문제는 사용자의 수가 증가하면서 더욱 심각해졌다. [...]]]></description>
			<content:encoded><![CDATA[<p>SKT의 콸콸콸콸 정책을 시작으로 3G 통신이 무제한으로 풀리면서 많은 사람들이 3G 망을 사용하고 있다. 3G 통신은 핸드폰의 전파가 잡히는 곳이면 어디에서든 사용할 수 있으므로 굉장히 유용한 통신 방법이다. 하지만 Wi-Fi 통신보다 현저히 느린 속도는 큰 단점이다. 다음의 표는 Wi-Fi로 대표되는 WLAN과 3G로 대표되는 WWAN를 비교하여 보여준다.</p>
<div id="attachment_1268" class="wp-caption aligncenter" style="width: 635px"><a href="http://holik.org/wp-content/uploads/2010/10/wwan_vs_wlan.png"><img class="size-full wp-image-1268" title="wwan_vs_wlan" src="http://holik.org/wp-content/uploads/2010/10/wwan_vs_wlan.png" alt="" width="625" height="114" /></a><p class="wp-caption-text">WWAN vs WLAN</p></div>
<p style="text-align: center;">
<p>3G 망의 속도 문제는 사용자의 수가 증가하면서 더욱 심각해졌다. 특히 사용자가 밀집된 지역에서 속도 저하는 매우 크다.</p>
<p>이를 해결하기 위한 여러 방법들이 연구되어 왔다. COMBINE<sup><a href="http://holik.org/2010/10/07/3g-%ed%86%b5%ec%8b%a0-%ec%86%8d%eb%8f%84%eb%a5%bc-%ed%96%a5%ec%83%81%ec%8b%9c%ed%82%a4%eb%a0%a4%eb%8a%94-%eb%85%b8%eb%a0%a5/#footnote_0_1241" id="identifier_0_1241" class="footnote-link footnote-identifier-link" title="Ananthanarayanan, G., Padmanabhan, V. N., Ravindranath, L., and Thekkath, C. A. 2007. COMBINE: leveraging the power of wireless peers through collaborative downloading. In Proceedings of the 5th international Conference on Mobile Systems, Applications and Services (San Juan, Puerto Rico, June 11 &amp;#8211; 13, 2007). MobiSys &amp;#8217;07. ACM, New York, NY, 286-298. DOI= http://doi.acm.org/10.1145/1247660.1247693">1</a></sup>은 그 대표적인 방법 중의 하나이다.</p>
<div id="attachment_1270" class="wp-caption aligncenter" style="width: 536px"><a href="http://holik.org/wp-content/uploads/2010/10/COMBINE1.png"><img class="size-full wp-image-1270" title="COMBINE" src="http://holik.org/wp-content/uploads/2010/10/COMBINE1.png" alt="" width="526" height="383" /></a><p class="wp-caption-text">Example of COMBINE</p></div>
<p style="text-align: center;">
<p style="text-align: center;">
<p>COMBINE의 기본 접근 방법은 모바일 기기들이 갖고 있는 여러 네트워크 인터페이스를 함께 사용하는 것이다. 그림처럼 한 사용자가 WWAN을 통해 서버에게 데이터 요청을 할 때, WLAN을 통해서 주위의 다른 사용자들에게 협력을 요청한다. 협력 요청을 받은 사용자들은 같은 데이터를 함께 서버에게 요청하고, 서버는 요청받은 데이터를 WWAN을 통해서 사용자들에게 전송한다. 마지막으로 협력 요청을 받았던 사용자들이 WLAN을 통해 협력 요청자에게 서버로부터 받은 데이터를 전송한다.</p>
<p>물론 여기에는 서버로부터 효율적으로 데이터를 전송받기 위한 데이터 요청 분산 방법이나 모바일 사용자들의 이동 등을 고려한 데이터 교환 방법등이 고려되어 있다. 따라서 이 방법을 사용하면 여러 기기가 협동하여 하나의 데이터를 전송 받음으로써 통신 속도가 느린 WWAN의 단점을 보완할 수 있다.</p>
<p>하지만 여기에는 해결되어야만하는 다양한 문제가 존재한다.</p>
<p>가장 큰 문제점은 프라이버시 문제이다. WWAN을 통해 교환하는 데이터는 웹페이지 같은 public 데이터도 있지만, 이메일과 같은 사적인 데이터도 많다. 이런 데이터는 암호화나 데이터 분산 정책 등을 통하여 프라이버시 문제를 해결해야 할 것이다. 두번째로 큰 문제점은 전력 문제이다. 네트워크 통신에는 많은 전력이 사용된다. 만약 협력하는 사용자들의 전력 소모가 심하다면, 아무도 협력하지 않을 수 밖에 없다. 이 밖에도 용량 문제나 이기적인 사용자들과 같은 여러 문제가 남아있다.</p>
<p>여러 문제가 있음에도 불구하고, 이 기술은 WWAN의 느린 속도를 극복할 수 있는 유용한 방법임에 틀림없다. 훗날 모바일 기기들에도 WiBro와 같은 초고속 모바일 인터페이스가 장착되겠지만, 그전까지는 보다 효율적으로 통신할 수 있는 하나의 대안이 될 듯 싶다.</p>
<ol class="footnotes"><li id="footnote_0_1241" class="footnote">Ananthanarayanan, G., Padmanabhan, V. N., Ravindranath, L., and Thekkath, C. A. 2007. COMBINE: leveraging the power of wireless peers through collaborative downloading. In <em>Proceedings of the 5th international Conference on Mobile Systems, Applications and Services </em>(San Juan, Puerto Rico, June 11 &#8211; 13, 2007). MobiSys &#8217;07. ACM, New York, NY, 286-298. DOI= http://doi.acm.org/10.1145/1247660.1247693</li></ol><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2010/10/07/3g-%ed%86%b5%ec%8b%a0-%ec%86%8d%eb%8f%84%eb%a5%bc-%ed%96%a5%ec%83%81%ec%8b%9c%ed%82%a4%eb%a0%a4%eb%8a%94-%eb%85%b8%eb%a0%a5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linear Equations in Linear Algebra (2)</title>
		<link>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-2/</link>
		<comments>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-2/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 08:22:38 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Linear Algebra]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[선형대수]]></category>

		<guid isPermaLink="false">http://holik.org/?p=1170</guid>
		<description><![CDATA[Row Reduction and Echelon Forms Given a matrix, a leading entry of a row refers to the leftmost nonzero entry in a nonzero row. Echelon form and reduced echelon form A rectangular matrix is in echelon form (or row echelon form) if it has the following three properties. All nonzero rows are above any rows [...]]]></description>
			<content:encoded><![CDATA[<h1>Row Reduction and Echelon Forms</h1>
<p>Given a matrix, a <em>leading entry</em> of a row refers to the leftmost nonzero entry in a nonzero row.</p>
<h3>Echelon form and reduced echelon form</h3>
<p>A rectangular matrix is in <em>echelon form (or row echelon form)</em> if it has the following three properties.</p>
<ul>
<li>All nonzero rows are above any rows of all zeros.</li>
<li>Each leading entry of a row is in a column to the right of the leading entry of the row above it.</li>
<li>All entries in a column below a leading entry are zeros.</li>
</ul>
<p>If a matrix in echelon form satisfies the following additional conditions, then it is in <em>reduced echelon form (or reduced row echelon form)</em>.</p>
<ul>
<li>The leading entry in each nonzero row is 1.</li>
<li>Each leading 1 is the only nonzero entry in its column.</li>
</ul>
<p>Example)</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-ad82e552a49c1c4dc1c8e7e79398bf8e_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>2 &amp; -3 &amp; 2 &amp; 1 \\</p>
<p>0 &amp; 1 &amp; -4 &amp; 8 \\</p>
<p>0 &amp; 0 &amp; 0 &amp; 5/2</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p style="text-align: center;">A matrix in echelon form</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-055eae54fa15d34284748e5072def50c_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>1 &amp; 0 &amp; 0 &amp; 29 \\</p>
<p>0 &amp; 1 &amp; 0 &amp; 16 \\</p>
<p>0 &amp; 0 &amp; 1 &amp; 3</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p style="text-align: center;">A matrix in reduced echelon form</p>
<p><strong><span style="text-decoration: underline;">Theorem 1. </span></strong><strong><span style="text-decoration: underline;">Uniqueness of the Reduced Echelon Form</span></strong></p>
<p>Each matrix is row equivalent to one and only one reduced echelon matrix.</p>
<h2>Pivot Positions</h2>
<p>A <em>pivot position</em> in a matrix <em>A</em> is a location in <em>A</em> that corresponds to a leading 1 in the reduced echelon form of <em>A</em>. A <em>pivot column</em> is a column of <em>A</em> that contains a pivot position.</p>
<p>A <em>pivot</em> is a nonzero number in a pivot position that is used as needed to create zeros via row operations.</p>
<h2>The Row Reduction Algorithm</h2>
<p>This algorithm produces a matrix in echelon form.</p>
<ol>
<li>Begin with the leftmost nonzero column. This is a pivot column. The pivot position is at the top.</li>
<li>Select a nonzero entry in the pivot column as a pivot. If necessary, interchange rows to move this entry into the pivot position.</li>
<li>Use row replacement operations to create zeros in all positions below the pivot.</li>
<li>Cover (or ignore) the row containing the pivot position and cover all rows, if any, above it. Apply steps 1-3 to the submatrix that remains. Repeat the process until there are no more nonzero rows to modify.</li>
<li>Beginning with the rightmost pivot and working upward and to the left, create zeros above each pivot. If a pivot is not 1, make it 1 by a scaling operation.</li>
</ol>
<p>Example</p>
<p>Step 1. Pivot column is the leftmost column which contains {0, 3, 3}.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-4593cab024592dea7a4596c6730aaf53_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \\</p>
<p>3 &amp; -7 &amp; 8 &amp; -5 &amp; 8 &amp; 9 \\</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Step 2. Interchange rows 1 and 3. Pivot is the &#8217;3&#8242; of row 1.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-90500d6519099cd59a27f4cb07e16fa1_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15 \\</p>
<p>3 &amp; -7 &amp; 8 &amp; -5 &amp; 8 &amp; 9 \\</p>
<p>0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Step 3. Add -1 times row 1 to row 2.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-89979e82f149903a137b17e1fc2b4d0f_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15 \\</p>
<p>0&amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\</p>
<p>0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Step 4. Cover row 1 because it contains the pivot position. The next pivot is &#8217;2&#8242; of row 2 for step 2.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-1343ccabd37ae3dca25908a3a2aa89a3_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15 \\</p>
<p>0&amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\</p>
<p>0 &amp; 0 &amp; 0&amp; 0 &amp; 1 &amp; 4</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Add -3/2 times the row 2 to the row 1 for step 3, and repeat the process until there are no more nonzero rows to modify.</p>
<p>Step 5. Create zeros above the rightmost pivot in row 3 by applying row 1 + (-6)*row 3 and row 2 + (-2)*row 3.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-8d4512cee81ae1c65c6874635b50fbc1_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 0 &amp; -9 \\</p>
<p>0&amp; 2 &amp; -4 &amp; 4 &amp; 0 &amp; -14 \\</p>
<p>0 &amp; 0 &amp; 0&amp; 0 &amp; 1 &amp; 4</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Makes the next pivot 1. Scale the row 2 by 1/2.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-6241c4d39c78e605c52c034191c6c2cb_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; -9 &amp; 12 &amp; -9 &amp; 0 &amp; -9 \\</p>
<p>0&amp; 1 &amp; -2 &amp; 2 &amp; 0 &amp; -7 \\</p>
<p>0 &amp; 0 &amp; 0&amp; 0 &amp; 1 &amp; 4</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Create a zero above the pivot by adding 9 times row 2 to row 1.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-5ee5ef325af65dcbb7617fc32696585a_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>3 &amp; 0 &amp; -6 &amp; 9 &amp; 0 &amp; -72 \\</p>
<p>0&amp; 1 &amp; -2 &amp; 2 &amp; 0 &amp; -7 \\</p>
<p>0 &amp; 0 &amp; 0&amp; 0 &amp; 1 &amp; 4</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>Scale row 1 to make the last pivot 1.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-f2972a155324a199d5315c94586d2ad9_l2.gif" alt="</p>
<p>\begin{bmatrix}</p>
<p>1 &amp; 0 &amp; -2 &amp; 3 &amp; 0 &amp; -24 \\</p>
<p>0&amp; 1 &amp; -2 &amp; 2 &amp; 0 &amp; -7 \\</p>
<p>0 &amp; 0 &amp; 0&amp; 0 &amp; 1 &amp; 4</p>
<p>\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<h2>Solutions of Linear Systems</h2>
<h3>Basic variables and free variables</h3>
<p>Consider the following linear system.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-29a8edc66a8ee6d7606fb15c1d06a834_l2.gif" alt="</p>
<p>\begin{bmatrix}<br />
1&amp;0&amp;-5&amp;1\\</p>
<p>0&amp;1&amp;1&amp;4\\</p>
<p>0&amp;0&amp;0&amp;0<br />
\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>The variables <img src="http://holik.org/wp-content/ql-cache/quicklatex.com-737549809ddc33a1fdeb46c078e2d2c9_l2.gif" alt="x_{1}"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/> and <img src="http://holik.org/wp-content/ql-cache/quicklatex.com-ec272a1d4ab29889f3366dcd057c9410_l2.gif" alt="x_{2}"title="Rendered by QuickLaTeX.com" style="vertical-align: -3px; border: none;"/> corresponding to pivot columns in the matrix are called <em>basic variables</em>. The other variable, x_{3}, is called a <em>free variable</em>.</p>
<p>The above system has the following solution which gives an explicit description of all solutions. These solutions are called <em>general solutions</em>.</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-0677f1a397e357f80130bd95aae7b4fa_l2.gif" alt="</p>
<p>\begin{array}{cc}</p>
<p>x_{1} = 1 + 5x_{3}\\</p>
<p>x_{2} = 4 &#8211; x_{3}\\</p>
<p>x_{3} $ is free$</p>
<p>\end{array}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -25px; border: none;"/></p>
<h2>Existence and Uniqueness Questions</h2>
<p><strong><span style="text-decoration: underline;">Theorem 2. Existence and Uniqueness Theorem</span></strong></p>
<p>A linear system is consistent if and only if the rightmost column of the augmented matrix is not a pivot column &#8211; that is, if and only if an echelon form of the augmented matrix has no row of the form</p>
<p style="text-align: center;">[ 0 ... 0 <em>b </em>] with <em>b</em> nonzero</p>
<p>If a linear system is consistent, then the solution set contains either (i) a unique solution, when there are no free variables, or (ii) infinitely many solutions, when there is at least one free variable.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linear Equations in Linear Algebra (1)</title>
		<link>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-1/</link>
		<comments>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-1/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 07:41:12 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Linear Algebra]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[선형대수]]></category>

		<guid isPermaLink="false">http://holik.org/?p=1080</guid>
		<description><![CDATA[Systems of Linear Equations Basic Notations Linear equation An equation that can be written in the following form &#8230; A system of linear equations (linear system) Collection of one or more linear equations involving the same variables ex) Solution of a linear system A list (&#8230;) of numbers that makes each equation a true statement [...]]]></description>
			<content:encoded><![CDATA[<h1>Systems of Linear Equations</h1>
<h2>Basic Notations</h2>
<h3>Linear equation</h3>
<p>An equation that can be written in the following form</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-155cb43fe7c7997a529cc110e9f24d57_l2.gif" alt="a_{1}x_{1} + a_{2}x_{2} +"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/> &#8230; <img src="http://holik.org/wp-content/ql-cache/quicklatex.com-5db0ba9c510036e7fe80c17c08f3b734_l2.gif" alt="+ a_{n}x_{n} = b"title="Rendered by QuickLaTeX.com" style="vertical-align: -3px; border: none;"/></p>
<h3>A system of linear equations (linear system)</h3>
<p>Collection of one or more linear equations involving the same variables</p>
<p>ex)</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-1815b4e87f4a8a2b56bc6b53285e9ac6_l2.gif" alt="</p>
<p>\begin{array}{cc}</p>
<p>2x_{1} &#8211; x_{2} + 1.5x_{3} = 8 \\<br />
x_{1} &#8211; 4x_{3} = -7</p>
<p>\end{array}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -15px; border: none;"/></p>
<h3>Solution of a linear system</h3>
<p>A list (<img src="http://holik.org/wp-content/ql-cache/quicklatex.com-88057ffa7915a7272e0c0e3c73a81a26_l2.gif" alt="s_{1}, s_{2},"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/>&#8230;<img src="http://holik.org/wp-content/ql-cache/quicklatex.com-34516fa025e4dc987147a5cdd826c220_l2.gif" alt=", s_{n}"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/>) of numbers that makes each equation a true statement when the values <img src="http://holik.org/wp-content/ql-cache/quicklatex.com-1bf0101b127b2c4a7544e7631c5a295d_l2.gif" alt="s_{1},"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/>&#8230;<img src="http://holik.org/wp-content/ql-cache/quicklatex.com-34516fa025e4dc987147a5cdd826c220_l2.gif" alt=", s_{n}"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/> are substituted for <img src="http://holik.org/wp-content/ql-cache/quicklatex.com-4e904465b7074331830a5a625e1d45f2_l2.gif" alt="x_{1},"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/>&#8230;<img src="http://holik.org/wp-content/ql-cache/quicklatex.com-45476e19ecc5c10e61600aa605b63155_l2.gif" alt=", x_{n}"title="Rendered by QuickLaTeX.com" style="vertical-align: -4px; border: none;"/> respectively.</p>
<h3>Equivalent</h3>
<p>Two linear systems are called <em>equivalent</em> if they have the same solution set.</p>
<h3>Consistency and inconsistency</h3>
<p>A linear system is <em>consistent</em> if it has either one or infinitely many solutions; a system is <em>inconsistent</em> if it has no solution.</p>
<h2>Matrix Notations</h2>
<h3>Coefficient matrix and augmented matrix</h3>
<p>Given the system</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-bf23be3489c9c9fd169f2a2f42199afc_l2.gif" alt="</p>
<p>\begin{array}{cc}</p>
<p>x_{1} &#8211; 2x_{2} + x_{3} = 0 \\</p>
<p>2x_{2} &#8211; 8x_{3} = 8 \\</p>
<p>-4x_{1} + 5x_{2} + 9x_{3} = -9</p>
<p>\end{array}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -26px; border: none;"/></p>
<p>the matrix</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-6cbb3f223e7c681fefb2e82c4ee0def4_l2.gif" alt="</p>
<p>\begin{bmatrix}<br />
1&amp;-2&amp;1\\</p>
<p>0&amp;2&amp;-8\\</p>
<p>-4&amp;5&amp;9<br />
\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>is called the <em>coefficient matrix</em> of the above system, and</p>
<p style="text-align: center;"><img src="http://holik.org/wp-content/ql-cache/quicklatex.com-89d1299f4b57a22535c2ee55318f6669_l2.gif" alt="</p>
<p>\begin{bmatrix}<br />
1&amp;-2&amp;1&amp;0\\</p>
<p>0&amp;2&amp;-8&amp;8\\</p>
<p>-4&amp;5&amp;9&amp;-9<br />
\end{bmatrix}</p>
<p>"title="Rendered by QuickLaTeX.com" style="vertical-align: -28px; border: none;"/></p>
<p>is called the <em>augmented matrix</em> of the system.</p>
<h2>Solving a Linear System</h2>
<p>The basic strategy to solve a linear system is to <em>replace one system with an equivalent system that is easier to solve</em>.</p>
<p><strong>Elementary Row Operations</strong></p>
<ol>
<li>(Replacement) Replace one row by the sum of itself and a multiple of another row.</li>
<li>(Interchange) Interchange two rows.</li>
<li>(Scaling) Multiply all entries in a row by a nonzero constant.</li>
</ol>
<p>Given two matrices, if there is a sequence of elementary row operations that transforms one matrix into the other, they are <em>row equivalent</em>.</p>
<p><em>If the augmented matrices of two linear systems are row equivalent, then the two systems have the same solution set.</em></p>
<h2>Existence and Uniqueness Questions</h2>
<p>It is needed to determine that a particular linear system contains either no solution, one solution, or infinitely many solutions.</p>
<p>If the system has one or infinitely many solutions, the system is consistent. Otherwise, it is inconsistent.</p>
<p style="text-align: center;"><a href="http://holik.org/wp-content/uploads/2010/09/consistency.png"><img class="aligncenter size-full wp-image-1200" title="consistency" src="http://holik.org/wp-content/uploads/2010/09/consistency.png" alt="" width="590" height="239" /></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2010/09/14/linear-equations-in-linear-algebra-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>시맨틱 웹</title>
		<link>http://holik.org/2010/06/06/semantic-web/</link>
		<comments>http://holik.org/2010/06/06/semantic-web/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 13:28:07 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://holik.org/?p=768</guid>
		<description><![CDATA[웹은 태어난 이래로 지속적으로 발전하여 오늘날에는 이 세상에서 가장 일상과 떼어놓을 수 없는 존재가 되었다. 웹은 특히 웹 2.0의 등장으로 일반 사용자들이 웹 컨텐츠를 직접 제작함으로써 웹 상의 데이터는 폭발적으로 증가하였다. 그리고 현재 웹 어플리케이션의 등장은 기존의 하드디스크에 존재하던 데이터마저 웹으로 옮기고 있다. 즉, 웹은 점점 세계의 데이터 저장소가 되어가고 있다. 이러한 웹 데이터의 폭발적인 [...]]]></description>
			<content:encoded><![CDATA[<p>웹은 태어난 이래로 지속적으로 발전하여 오늘날에는 이 세상에서 가장 일상과 떼어놓을 수 없는 존재가 되었다. 웹은 특히 웹 2.0의 등장으로 일반 사용자들이 웹 컨텐츠를 직접 제작함으로써 웹 상의 데이터는 폭발적으로 증가하였다. 그리고 현재 웹 어플리케이션의 등장은 기존의 하드디스크에 존재하던 데이터마저 웹으로 옮기고 있다. 즉, 웹은 점점 세계의 데이터 저장소가 되어가고 있다. 이러한 웹 데이터의 폭발적인 증가로 인해, 기존의 단순 텍스트 검색 결과만으로는 사용자들이 원하는 정보를 충분히 제공하기가 힘들게 되었다. 이런 변화로 인해 나온 것이 시맨틱 웹이다. (사실 시맨틱 웹은 팀 버너스리가 처음부터 계획했던 것이다. 하지만 그간의 시도들을 구현하기엔 웹 환경이 너무 열악했다.)</p>
<p>시맨틱 웹(Semantic Web)을 알기 위해선 먼저 시맨틱의 의미를 정확하게 알아야 한다. 컴퓨터 공학에서 시맨틱의 의미는 신택스(syntax)와 상반된 개념으로, 신택스가 어떤 문구 자체를 가리키는데 반해, 시맨틱은 문구 안에 포함된 개념을 의미한다. 예를 들어 &#8220;I like a Rooney.&#8221;라는 문장이 있으면, 이 문장은 신택스 적으로 &#8216;영어로 작성되었으며 틀린 문법을 사용하고 있다&#8217;고 말하고, 시맨틱 적으로 &#8216;나는 루니를 좋아한다&#8217;는 뜻을 가진다고 말한다.</p>
<p>시맨틱 웹은 웹에 시맨틱을 부여한 것이다. 즉, 웹을 단순히 링크로 연결된 페이지들의 집합으로 보는 것이 아니라, 각각의 페이지들과 페이지들 간의 링크에 의미를 부과하고 나아가서 웹 상의 데이터들을 연결하고 그것들에 의미를 부과하는 것이다. 예를 들어 &#8220;Korea University is in Seoul.&#8221; 이라는 데이터와 &#8220;I&#8217;m a student of Korea University.&#8221;라는 데이터가 웹에 존재할 때, 이런 데이터들을 연결하여 &#8220;I&#8217;m in Seoul.&#8221;이라는 새로운 데이터를 추론할 수 있다.</p>
<p>시맨틱 검색은 웹의 시맨틱을 검색하는 것이다. 시맨틱 검색을 위해서 여러 방법들이 제안되고 있다. 다음은 전형적인 시맨틱 데이터 관리 시스템의 구조를 보여준다.</p>
<div id="attachment_958" class="wp-caption aligncenter" style="width: 588px"><a href="http://holik.org/wp-content/uploads/2010/05/ontology.png"><img class="size-full wp-image-958 " title="ontology" src="http://holik.org/wp-content/uploads/2010/05/ontology.png" alt="" width="578" height="299" /></a><p class="wp-caption-text">Architecture of the Semantic Data Management System</p></div>
<p>위의 그림처럼 시맨틱 데이터 관리 시스템은 크게 4가지 부분으로 구성된다. 각 부분은 다음과 같은 역할을 한다.</p>
<ul>
<li>Crawling: 웹 상에 퍼져있는 데이터를 크로울링을 통해 모은다. 데이터는 보통 RDF 형태로 배포되는데, 여기서 구조화되지 않은 데이터를 어떻게 구조화시킬 것이냐는 것에 대한 이슈가 있다. 일반적으로 사람이 직접 데이터를 구조화시켜 배포하고 크로울러가 지능적으로 데이터를 구조화시키는 방법에 대한 연구가 이루어지고 있지만, 데이터의 양과 종류가 워낙 크고 다양하기 때문에 거의 불가능한 것으로 본다.</li>
<li>Storing: 크로울링을 통해 모아진 데이터를 저장소에 저장한다. 모아진 데이터의 양은 상상을 뛰어넘을 정도로 엄청나게 많다. 이런 대용량의 데이터를 다루기 위해 Column Store와 같은 기법들이 연구되고 있다.</li>
<li>Reasoning: 저장소에 저장된 데이터에 기반하여 새로운 지식을 추론하고, 추론된 지식을 다시 데이터 저장소에 저장한다. 기존에 모아진 데이터의 양만 해도 엄청났지만, reasoning을 통해 새롭게 얻어지는 데이터의 양은 훨씬 크다. 따라서 효과적으로 reasoning하는 방법과 새롭게 얻어진 데이터를 효율적으로 저장하는 방법에 대해 연구가 이뤄지고 있다.</li>
<li>Accessing: 사용자가 접근하여 데이터를 다룰 수 있도록 인터페이스를 제공한다.</li>
</ul>
<p>하지만 기존의 시스템은 한 시스템에 데이터를 저장한다는 단점을 지니고 있었다. 이것은 scalability 면에서 매우 취약하다. 반면에, 웹 상에 존재하는 데이터는 무한히 증가하고 있다. 이에 따라 출현한 것이 <a href="http://linkeddata.org/" target="_blank">Linked Data</a> 이다. 이 작업을 통해 시맨틱 데이터를 분산 관리하려는 노력이 이루어지고 있다.</p>
<div class="wp-caption aligncenter" style="width: 621px"><img class="    " title="Linked Data" src="http://richard.cyganiak.de/2007/10/lod/lod-datasets_2009-07-14.png" alt="" width="611" height="459" /><p class="wp-caption-text">Linked Data</p></div>
<p>Linked Data 시스템에선 한 대상에 대한 데이터가 여러 서버에 나누어 저장된다. 예를 들어, &#8216;광주 시&#8217;에 대한 지리 정보는 한국 지리 정보 시스템이나 광주 시 정보 시스템 등에 저장된다. 하지만 &#8216;화려한 휴가&#8217;라는 영화의 배경이 광주이기 때문에, 영화 데이터베이스 또한 &#8216;광주 시&#8217;에 대한 데이터를 갖는다. 물론 이 경우는 광주 시의 자세한 데이터가 아닌 identifier를 비롯한 메타데이터만 저장된다. 기존 시스템에서는 이렇게 나뉘어 저장된 데이터에 대해 사용자가 직접 따로 검색해야 했지만, Linked Data 시스템에서는 이들을 연결함으로써 &#8216;광주 시&#8217;에 대해 검색하면 시에 대한 지리, 역사, 문화 등의 정보 뿐만아니라 &#8216;화려한 휴가&#8217;의 배경지라는 정보도 쉽게 얻을 수 있다.</p>
<p>이런 작업들의 최종 목표는 바로 이 세계의 데이터화이다. 이 세계를 구성하는 사물 하나 하나까지 전부 데이터화해서 저장하고 검색할 수 있도록 만들겠다는 것이다. 이것이 바로 데이터베이스 학문의 궁극적인 목표이긴 하지만, 조금 무서운 생각도 든다.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2010/06/06/semantic-web/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>무선 네트워크에서의 통념(Myth) 하나가 깨지다.</title>
		<link>http://holik.org/2010/04/22/%eb%ac%b4%ec%84%a0-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac%ec%97%90%ec%84%9c%ec%9d%98-%ed%86%b5%eb%85%90myth-%ed%95%98%eb%82%98%ea%b0%80-%ea%b9%a8%ec%a7%80%eb%8b%a4/</link>
		<comments>http://holik.org/2010/04/22/%eb%ac%b4%ec%84%a0-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac%ec%97%90%ec%84%9c%ec%9d%98-%ed%86%b5%eb%85%90myth-%ed%95%98%eb%82%98%ea%b0%80-%ea%b9%a8%ec%a7%80%eb%8b%a4/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:40:30 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Talk]]></category>
		<category><![CDATA[Myth]]></category>
		<category><![CDATA[Wireless Network]]></category>

		<guid isPermaLink="false">http://holik.org/?p=807</guid>
		<description><![CDATA[무선 네트워크에서 무선 기기들은 공기를 매개체로 통신한다. 그런데 공기는 케이블에 비해서 에러가 발생할 확률이 엄청나게 높다. 전파가 전송되던 중 충돌이 일어나거나, Noise에 의해 전파 모양이 다르게 변하거나, 신호가 약해서 목적지까지 닿지 않는 등 다양한 이유로 인해 패킷 전송 실패가 일어난다. 따라서 무선 네트워크의 통신 프로토콜들은 에러를 다루기 위해 신경을 많이 쓴다. 가장 기본적인 에러 처리 [...]]]></description>
			<content:encoded><![CDATA[<p>무선 네트워크에서 무선 기기들은 공기를 매개체로 통신한다. 그런데 공기는 케이블에 비해서 에러가 발생할 확률이 엄청나게 높다. 전파가 전송되던 중 충돌이 일어나거나, Noise에 의해 전파 모양이 다르게 변하거나, 신호가 약해서 목적지까지 닿지 않는 등 다양한 이유로 인해 패킷 전송 실패가 일어난다. 따라서 무선 네트워크의 통신 프로토콜들은 에러를 다루기 위해 신경을 많이 쓴다. 가장 기본적인 에러 처리 방법은 에러가 발생한 패킷을 재전송하는 것이다. 하지만 충돌이 일어난 무선 기기들이 동시에 패킷을 재전송한다면 또 다른 패킷 충돌이 일어날 것이고 이것 만으로는 문제를 해결할 수 없다. 이를 해결하기 위해 충돌이 일어난 무선 기기들은 랜덤한 대기 시간(backoff time)동안 기다렸다가 패킷을 재전송한다.</p>
<p>대기 시간을 결정하는 방법은 다음과 같다. 모든 무선 기기들은 경합 시간 범위(contention window, cw)라는 값을 갖고 있는데, 충돌이 일어나면 무선 기기들은 0부터 cw 사이에서 랜덤하게 고른 하나의 수의 시간 만큼 대기한다.</p>
<p>두 무선 기기가 같은 랜덤 대기 시간을 결정할 확률은 매우 작으므로 둘 사이에 또 다시 패킷 충돌이 일어날 확률 또한 매우 작아지지만, 여전히 충돌이 일어날 가능성은 남아있다. 따라서 두 번째 충돌 부터는 cw의 값을 증가시켜 같은 대기 시간을 선택할 확률을 더욱 낮춘다. (일반적으로 충돌이 일어날 때마다 cw를 2배씩 증가시키는 Binary Exponential Backoff 알고리즘을 사용한다.)</p>
<p>이러한 접근에는 &#8216;<strong>무선 네트워크에서 둘 이상의 무선 기기가 동시에 패킷을 전송할 경우 반드시 충돌이 발생하여 두 패킷 모두 사용할 수 없다.</strong>&#8216; 라는 전제가 깔려있다. 하지만 이 전제는 실제와 다르다. 실제 네트워크에서는 전파 충돌이 발생하여도 세기가 강한 전파는 형태를 유지하여 전송될 확률이 높다. (Capture effect 라고 하며, 물리에서 파동의 간섭 현상을 생각하면 된다.) 뿐만아니라, 다중 패킷 수신(Multipacket Reception<em>)</em>이라는 한 무선 기기가 둘 이상의 전파를 동시에 수신할 수 있는 기술 또한 개발되어왔다. 이와 같이, 실질적인 기술은 무선 네트워크에서 일반적으로 받아들여지던 전제를 뒤짚음으로써 새로운 방향을 제시하였다.</p>
<p>그리고 마침내, 최근에 발표된 <strong>MAC for Networks with Multipacket Reception Capability and Spatially Distributed Nodes</strong><strong><sup>1</sup></strong> 라는 논문에서 무선 네트워크에서 backoff 시간에 대한 통념이 깨어졌다.</p>
<p style="text-align: center;"><a href="http://holik.org/wp-content/uploads/2010/04/예제.png"><img class="aligncenter size-full wp-image-830" title="예제" src="http://holik.org/wp-content/uploads/2010/04/예제.png" alt="" width="260" height="257" /></a></p>
<p>저자들은 논문에서 다음과 같이 주장한다. 수신 노드로부터 멀리 위치한 노드들은 가까이 위치한 노드들보다 전송하는 신호의 세기가 약하므로, capture effect에 의해서 수신 노드로부터 멀리 위치한 노드일수록 전송 확률이 낮아진다. 예를 들어, 위의 그림과 같이 S1 ~ S5 5개의 노드들이 동시에 R1에게 데이터를 전송하고 있는 네트워크를 가정해보자. R1은 다중 패킷 수신이 가능하다. 하지만 S1이 다른 노드들에 비해 R1에 가까이 위치하므로 다른 노드들보다 전송 확률이 높다. 만약 다른 노드들이 패킷 전송에 실패한다면, 이들은 backoff 시간 동안 대기한 후 패킷을 재전송 할 것이다. 하지만 가까이 위치한 S1이 여전히 높은 확률로 패킷을 전송하고 있으므로 다른 노드들은 모두 패킷 전송에 실패할 확률이 높다. 이런 현상은 전반적으로 전혀 공평하지 못하다. 오히려 전송 실패가 일어났을 때 빠른 시간 안에 에러를 처리할 수 있도록, 실패가 일어날수록 cw의 값을 감소시켜 먼저 전송할 확률을 증가시켜야 한다는 것이다.</p>
<p>이러한 접근들은 최근에 DB 분야에도 있었다. 가장 효율적인 데이터 저장 방식이라고 알려졌던 row store는 대용량 데이터 처리가 필요함에 따라 column store보다 비효율적일 수 있다는 연구 결과가 나왔고, 심지어 가장 효율적인 데이터 구성 방식이라고 알려졌던 Relational DB 또한 용도에 맞게 <a href="http://holik.org/2009/12/18/nosql/">다른 종류의 구성 방식을 사용해야 한다</a>는 주장이 제기되고 있다.</p>
<p>시대를 넘어선 불변의 법칙은 존재하지 않는다. 시간이 흐르면서 기존에는 절대 받아들여질 수 없었던 통념들이 뛰어난 방법으로 받아들여질 수도 있다.</p>
<p>자신이 가장 굳게 믿고 있는 통념 하나를 반대로 생각해보자. 엄청난 결과를 얻을지도 모른다.</p>
<h4>참고 문헌</h4>
<p>1. Celik, G. D., Zussman, G., Khan, W. F., and Modiano, E. 2010. MAC for Networks with Multipacket Reception Capability and Spatially Distributed Nodes. <em>IEEE Transactions on Mobile Computing</em> 9, 2 (Feb. 2010), 226-240.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2010/04/22/%eb%ac%b4%ec%84%a0-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac%ec%97%90%ec%84%9c%ec%9d%98-%ed%86%b5%eb%85%90myth-%ed%95%98%eb%82%98%ea%b0%80-%ea%b9%a8%ec%a7%80%eb%8b%a4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NP 문제</title>
		<link>http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/</link>
		<comments>http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 17:26:21 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[NP-complete]]></category>

		<guid isPermaLink="false">http://holik.org/?p=318</guid>
		<description><![CDATA[살면서 여러가지 문제들에 마주치다보면 어떤 것은 매우 쉽고 빠르게 해결할 수 있는 반면에, 해결하기가 매우 어렵고 오래 걸리는 일도 있습니다. 컴퓨터학에서는 문제의 어려움을 계산 복잡도를 사용하여 나타냅니다. 쉽고 빠르게 해결할 수 있는 문제들은 계산 복잡도가 낮다고 하며, 해결하기 어렵고 복잡한 문제일수록 계산 복잡도가 높다고 합니다. 그런데, 어떤 문제들은 적절한 시간 내에 풀 수 있을지 없을지조차 모르는 [...]]]></description>
			<content:encoded><![CDATA[<p>살면서 여러가지 문제들에 마주치다보면 어떤 것은 매우 쉽고 빠르게 해결할 수 있는 반면에, 해결하기가 매우 어렵고 오래 걸리는 일도 있습니다. 컴퓨터학에서는 문제의 어려움을 <a href="http://en.wikipedia.org/wiki/Computational_complexity_theory" target="_blank">계산 복잡도</a>를 사용하여 나타냅니다. 쉽고 빠르게 해결할 수 있는 문제들은 계산 복잡도가 낮다고 하며, 해결하기 어렵고 복잡한 문제일수록 계산 복잡도가 높다고 합니다. 그런데, 어떤 문제들은 적절한 시간 내에 풀 수 있을지 없을지조차 모르는 것들도 있습니다. 다음의 문제를 하나 봅시다.</p>
<blockquote><p>당신은 휴가를 맞아 여행을 가기로 하였습니다. 비록 휴가는 일주일 밖에 안되지만, 욕심이 많은 당신은 이집트, 스페인, 네덜란드 3개국의 카이로, 알렉산드리아, 바르셀로나, 그라나다, 마드리드, 암스테르담, 헤이그 7개 도시를 방문하려고 합니다. 각 도시들 사이에는 직행 비행기로 이동할 수 있다고 할 때, 쾌적한 여행을 즐길 수 있도록 도시를 중복 방문하는 일 없이 최단 거리 여행 계획을 짜보세요!</p></blockquote>
<p>당신은 지도를 펴놓고 고민하기 시작합니다. 당신은 한 도시에서 다른 도시로 넘어갈 때 근처에 있는 도시를 먼저 방문하는 것이 최단 경로를 줄이는 방법이라는 것을 알고 있습니다. 따라서 도시들을 어떤 순서로 방문해야 쾌적한 여행을 즐길 수 있는지 그다지 고민하지 않고 결정할 수 있습니다. <span style="background-color: #ffffff;">하지만 이 문제를 컴퓨터에게 풀게 한다면, 컴퓨터는 한 도시를 방문한 후 어떤 도시를 방문해야 쾌적한 여행이 될지 결정할 수 없습니다. 따라서 도시를 중복 방문하지 않는 수많은 여행 코스<sup><a href="http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/#footnote_0_318" id="identifier_0_318" class="footnote-link footnote-identifier-link" title="7개의 도시를 중복되지 않게 방문하므로, 총 방법의 수는 6! = 720개가 됩니다.">1</a></sup> 를 모두 비교하여 최단 코스가 무엇인지 찾아내야 할 겁니다. </span></p>
<p>이와 같이, 어떤 알고리즘을 수행하는데 있어 한 단계에서 다음 단계로 진행할 때 여러 선택권을 가질 수 있는 문제들을 <span style="background-color: #ffffff;">NP (Non-deterministic in Polynomial time) 문제라고 합니다<sup><a href="http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/#footnote_1_318" id="identifier_1_318" class="footnote-link footnote-identifier-link" title="NP 문제의 정의는 비결정적인 알고리즘(non-deterministic algorithm)을 사용하여 적절한 시간(polynomial time) 내에 해결이 가능한 문제입니다.">2</a></sup>.</span></p>
<p><a href="http://en.wikipedia.org/wiki/NP_%28complexity%29" target="_blank"><img class=" aligncenter" title="NP problems" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Complexity_classes.svg/414px-Complexity_classes.svg.png" alt="NP problems" width="414" height="255" /></a></p>
<p>위의 그림처럼, NP 문제는 크게 P 문제와 NP-Complete 문제로 나눌 수 있습니다. P 문제는 결정적인(deterministic) 알고리즘을 사용하여 적절한 시간 (polynomial time) 안에 해결할 수 있는 문제입니다. 반면에 NP-Complete 문제들은 비결정적인(non-deterministic) 알고리즘으로는 적절한 시간 내에 해결할 수 있지만, 결정적인 알고리즘으로는 적절한 시간 안에 해답을 얻을 수 있는 방법을 찾지 못한 문제들 입니다. NP-Compete 문제들의 특징은 해결 방법이 없는 것이 아니라, 해결 방법이 있지만 입력의 크기가 커질수록 계산복잡도가 엄청나게 커진다는 것입니다<sup><a href="http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/#footnote_2_318" id="identifier_2_318" class="footnote-link footnote-identifier-link" title="일반적으로 NP-Complete 문제들의 계산복잡도는 sn 에 비례합니다. 여기서&nbsp;s는 상수, n은 입력의 크기">3</a></sup>. 그래서 NP-Complete 문제들은 보통 다음의 세 접근 방법을 통해 해결합니다.</p>
<ul>
<li>Approximate algorithm: 적절한 범위 내에서 차선의(suboptimal) 해결책을 구하는 알고리즘입니다.</li>
<li>Probabilistic algorithm: 문제의 입력의 확률 분포에 대하여 평균적으로 좋은 성능을 보이는 알고리즘입니다.</li>
<li>Heuristic algorithm: 대부분의 경우에 잘 동작하지만, 항상 최선의 결과를 얻는다는 보장은 없는 알고리즘입니다.</li>
</ul>
<p>NP 문제에서 단연 최고의 이슈가 되고 있는 것은 &#8216;<span style="background-color: #ffffff;">P=NP?&#8217; 입니다. (이 문제는 용의자 X의 헌신에도 나왔었죠.) 즉, &#8216;NP에 속하는 모든 문제는 결정적인 알고리즘을 사용하여 적절한 시간 내에 해결할 수 있다.&#8217; 라는 명제가 참인지 거짓인지를 판명하는 것입니다. 만약 이 명제가 참이 된다면, 모든 NP-Complete 문제들은 쉽게 해결할 수 있는 방법이 있다는 것이 되므로 엄청난 센세이션을 불러일으키게 되겠죠. 현재는 &#8216;P 문제는 NP 문제가 될 수 있다.&#8217; 라는 명제가 참이라는 것까지 증명된 상태입니다. (Denis Shasha, 1995)</span></p>
<p>NP-Complete 문제들은 정말 상당히 흥미로운 것들이 많습니다. 그 중에서도, 그래프는 본연의 구조적 특성 때문에 일반적으로 연산이 굉장히 복잡해서, 상당히 많은 NP-Complete 문제들이 있습니다. 다음엔 그래프에서의 NP-Complete 문제들에 대해 포스팅해보겠습니다.</p>
<p>NP 문제와 관련된 추천 사이트</p>
<ul>
<li><span style="background-color: #ffffff;"><a href="http://page.mi.fu-berlin.de/aneumann/npc.html" target="_blank">Graph of NP-Complete Problems</a>: NP-Complete 문제들을 그래프로 보여줍니다.</span></li>
<li><span style="background-color: #ffffff;"><a href="http://page.mi.fu-berlin.de/aneumann/npc.html" target="_blank"></a><a href="http://rjlipton.wordpress.com/" target="_blank">Gödel’s Lost Letter and P=NP</a>: 조지아 텍 교수인 Dick Lipton의 블로그입니다. 알고리즘에 관한 흥미로운 글이 많이 올라옵니다.</span></li>
</ul>
<p><br class="spacer_" /></p>
<ol class="footnotes"><li id="footnote_0_318" class="footnote">7개의 도시를 중복되지 않게 방문하므로, 총 방법의 수는 6! = 720개가 됩니다.</li><li id="footnote_1_318" class="footnote">NP 문제의 정의는 비결정적인 알고리즘(non-deterministic algorithm)을 사용하여 적절한 시간(polynomial time) 내에 해결이 가능한 문제입니다.</li><li id="footnote_2_318" class="footnote">일반적으로 NP-Complete 문제들의 계산복잡도는 <em>s</em><sup><em>n</em></sup> 에 비례합니다. 여기서 <em>s</em>는 상수, <em>n</em>은 입력의 크기</li></ol><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2009/10/18/np-%eb%ac%b8%ec%a0%9c/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>소셜 네트워크 서비스들의 분석</title>
		<link>http://holik.org/2009/08/15/%ec%86%8c%ec%85%9c-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac-%ec%84%9c%eb%b9%84%ec%8a%a4%eb%93%a4%ec%9d%98-%eb%b6%84%ec%84%9d/</link>
		<comments>http://holik.org/2009/08/15/%ec%86%8c%ec%85%9c-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac-%ec%84%9c%eb%b9%84%ec%8a%a4%eb%93%a4%ec%9d%98-%eb%b6%84%ec%84%9d/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 12:39:49 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Social Network Service]]></category>
		<category><![CDATA[소셜 네트워크 서비스]]></category>

		<guid isPermaLink="false">http://holik.org/?p=252</guid>
		<description><![CDATA[요즘 어느 분야에서건 &#8216;소셜 네트워크 서비스(SNS)&#8217;라는 단어가 보이지 않는 곳이 없을 정도로 SNS는 많은 관심을 받고 있습니다. 사람들은 SNS를 통하여 가깝게는 지인들, 멀게는 유명인들 (심지어 미국 대통령과도) 소통을 하고, 관심사를 공유하기도 합니다. SNS의 특징과 다양한 SNS의 형태를 알아보고, SNS와 관련된 연구거리가 무엇이 있을지 정리해보았습니다. SNS란? SNS란 서비스 이용자들이 스스로 형성한 네트워크를 통해 정보 공유나 소통이 [...]]]></description>
			<content:encoded><![CDATA[<p>요즘 어느 분야에서건 &#8216;소셜 네트워크 서비스(SNS)&#8217;라는 단어가 보이지 않는 곳이 없을 정도로 SNS는 많은 관심을 받고 있습니다. 사람들은 SNS를 통하여 가깝게는 지인들, 멀게는 유명인들 (심지어 미국 대통령과도) 소통을 하고, 관심사를 공유하기도 합니다. SNS의 특징과 다양한 SNS의 형태를 알아보고, SNS와 관련된 연구거리가 무엇이 있을지 정리해보았습니다.</p>
<h2>SNS란?</h2>
<p>SNS란 서비스 이용자들이 스스로  형성한 네트워크를 통해 정보 공유나 소통이 가능한 서비스를 말합니다. 사용자들은 공통의 취미, 관심 등에 따라서 다른 사용자들과 관계를 맺고,  자신의 글이나 이미지, 동영상등을 함께 공유합니다.</p>
<h2>SNS의 특징</h2>
<ul>
<li>기존의 웹 서비스들과는 달리 서비스 제공자들은 컨텐츠 생성 및 배포를 위한 틀을 제공하고, 서비스 이용자들이 스스로 데이터를 생성 및 배포합니다.</li>
<li>핸드폰, PDA 등 다양한 미디어를 통해 컨텐츠를 바로 생성할 수 있습니다.</li>
<li>일반적으로 공통의 관심사나 취미를 가진 사람들을 위주로 네트워크가 형성되기 때문에 단기간 내에 폭발적으로 확대됩니다.</li>
<li>새로운 정보는 기하급수적으로 확산됩니다. </li>
</ul>
<h2>SNS의 예제들</h2>
<p>최근 소셜 네트워크가 많은 관심을 받으면서 다양한 SNS가 제공되고 있습니다.</p>
<ul>
<li><a href="http://cyworld.com" target="_blank">Cyworld</a>
<ul>
<li>서비스 이용자들이 글이나 사진을 자신의 미니 홈페이지에 업로드하고, 그것을 타인과 공유하는 서비스입니다.</li>
<li>서비스 이용자 간에 쌍방이 동의할 경우 &#8216;일촌&#8217;이라 불리는 친구 관계가 형성됩니다.</li>
<li>주로 지인 관계에만 컨텐츠를 공유하므로 배타적인 성격이 강합니다. 그 외에, 미니 홈페이지를 꾸미는 다양한 컨텐츠를 제공합니다. (배경음악, 스킨 등)</li>
</ul>
</li>
<li><a href="http://facebook.com" target="_blank">Facebook</a>
<ul>
<li>Cyworld와 매우 유사한 해외 서비스입니다. 서비스 이용자들은 글이나 사진등을 자신의 페이지에 업로드하고 그것을 다른 사람들과 공유할 수 있습니다.</li>
<li>Cyworld와 마찬가지로 서비스 이용자 간에 쌍방이 동의할 경우 친구 관계가 형성됩니다. Facebook은 서비스 이용자들이 입력한 정보에 기반하여 이용자들을 그룹화하고, 그에 따라 관련있는 사람들을 추천해주는 기능이 있습니다.</li>
<li>개인 일상사에 대한 정보 공유가 주를 이룹니다.</li>
</ul>
</li>
<li><a href="http://flickr.com" target="_blank">Filckr</a>
<ul>
<li>Flickr는 온라인 사진 공유 서비스로,이용자들이 이미지를 업로드하여 공유할 수 있습니다.</li>
<li>Tag와 같은 메타 정보를 통해 공통의 관심사를 가진 사람들을 검색하여 사진을 공유할 수 있습니다.</li>
<li>Cyworld나 Facebook과는 달리 비대칭 네트워크입니다. 다른 사람의 컨텐츠를 공유하고자 하는 이용자는 &#8216;구독&#8217;의 개념으로 공유할 수 있습니다.</li>
</ul>
</li>
<li><a href="http://twitter.com" target="_blank">Twitter</a>
<ul>
<li>Microblogging 서비스. 이용자들은 140자 내에서 무엇이든 말할 수 있습니다.</li>
<li>Flickr와 같은 비대칭 서비스입니다. 이용자들은 &#8216;구독&#8217;의 개념인 follow를 통해 관심 있는 상대를 등록합니다. </li>
<li>기존의 서비스들과든 달리, 실시간 서비스입니다. 서비스 이용자들은 실시간으로 자신의 컨텐츠를 공유합니다. 따라서 정보의 확산이 매우 빠릅니다.</li>
</ul>
</li>
<li><a href="http://www.google.com/friendconnect/" target="_blank">Google Friend Connect (GFC)</a>
<ul>
<li>일반 홈페이지를 위한 소셜 네트워크 서비스입니다.</li>
<li>기존 소셜 네트워크 서비스들은 서비스 제공자들의 플랫폼 내에서 관계를 형성하고 의사소통할 수 있었던 반면에, GFC는 자신의 홈페이지에 GFC 가젯을 설치하는 형태로 소셜 네트워크에 참여합니다. (이것은 홈페이지에 간단한 html 소스를 추가하는 것으로 가능합니다.) 이후, GFC 이용자들은 GFC 가젯을 통해 follow 관계를 맺을 수 있습니다.</li>
<li>GFC는 관계 형성 기능 외에도 답글 시스템도 제공하는데, 이를 통해서  블로그와 사용자들을 하나의 소셜 네트워크로 묶을 수 있습니다.</li>
</ul>
</li>
</ul>
<h3>국산 서비스와 해외 서비스들과의 차이</h3>
<p>Cyworld가 처음 서비스를 시작했을 때, 세계적으로도 획기적인 SNS였습니다. 하지만 Cyworld는 SNS로서 다음의 큰 두 가지 단점을  갖고 있습니다.</p>
<ol>
<li> 소셜 네트워크란 사람들이 모여서 구성하는 네트워크인데, Cyworld는 이 소셜 네트워크 확장에 상당히 배타적입니다.  예를 들어, Cyworld는 자신과 비슷한 취미를 가진, 또는 자신과 같은 동네에 사는 사람을 찾는 기능을 제공하지 않습니다. 소셜 네트워크가 확장되는 경우는  자신이 직접 아는 사람을 추가하는 경우가 대부분이죠. (물론 &#8220;나는 내가 아는 사람이랑만 공유할거야&#8221; 이런 사람도 있을 수 있습니다. 그런 사람들은 제공하는 기능을 이용 하지 않으면 그만입니다.)</li>
<li>Cyworld는 외부 검색 엔진들로부터의 컨텐츠의 검색 및 링크를 배제하였습니다. (이 점에 대해선 정말 하고 싶은 얘기가 많습니다. 우리 나라의 서비스 제공업체들은 서비스 이용자들이 생성산 컨텐츠를 자기네 것이라고 생각하는데 이건 정말 말도 안 되는 얘기죠.) 검색 및 링크는 웹의 기본적인 특성 및 특장점이며, 이를 통해 데이터가 재가공되어 전파되는  경우가 상당히 많습니다. </li>
</ol>
<p>이에 반해 해외 서비스들은 열린 서비스 정책을 택하였습니다. 외부 플랫폼에서 검색 및 링크가 가능한 것은 물론이고, 소셜 네트워크 서비스로서의 특성도 잘 살려, 다양한 사람들을 쉽게 만날 수 있도록 하였습니다. 게다가  OpenAPI를 제공하여 웹 브라우저가 아닌 다양한 클라이언트들로부터 접속이 가능하게 함으로써 사용자들은 다양한 미디어 (핸드폰, PDA, iPod, etc)를 통해 서비스를 이용할 수 있습니다. 또한 OpenAPI는 다양한 파생 서비스를 가능하게 하였습니다. 예를 들면, SNS의 친구 관계를 활용한 게임, 전자 결재 시스템, 광고 시스템 등이 있습니다.</p>
<h2>최근 동향</h2>
<p>현재 다양한 서비스들로부터 형성된 네트워크를 하나로 통합/관리하려는 시도가 있습니다. 대표적인 시스템으로 <a href="http://friendfeed.com/" target="_blank">Friendfeed</a>와 <a href="http://disqus.com/" target="_blank">DISQUS</a>가 있습니다. Friendfeed는 통합 소셜 네트워크 관리 서비스입니다. Friendfeed는 다양한 서비스들로부터 제공되는 OpenAPI를 통해 업데이트되는 컨텐츠들을 Friendfeed의 페이지로 모아서 보여줍니다. DISQUS는 통합 답글 관리 서비스입니다. 사용자들은 답글 인증 시 DISQUS를 통해 인증을 받을 수 있고, 자신의 답글을 타인들과 공유할 수 있습니다.</p>
<h2>향후 연구</h2>
<p>이전에도 썼듯이 소셜 네트워크들은 <a href="http://holik.org/?p=120" target="_blank">그래프로 모델링</a>할 수 있습니다. 소셜 네트워크르 그래프로 모델링하면, 실제 어플리케이션들에서 사용되는 기능들을 그래프 모델에서의 데이터 처리로 문제를 바꿀 수 있기 때문에 소셜 네트워크 분석이 좀 더 용이해집니다.</p>
<p>또한, SNS 데이터는 일반적으로 크기가 매우 크기 때문에 한 머신에서 처리하기 어렵습니다. 이에 따라 분산 그래프 데이터 처리(distributed graph data processing)에 관한 연구들이 점차 진행되고 있습니다. (<a href="http://portal.acm.org/citation.cfm?id=988760" target="_blank">RDFPeers</a>, <a href="http://holik.org/?p=207" target="_blank">SPIDER</a>)</p>
<p>SNS에서 생성되는 엄청난 양의 데이터를 검색할 수 있도록 색인하는 것도 하나의 연구거리가 될 수 있습니다. 현재 기술로는 모든 데이터를 색인하는 것이 어렵다고 합니다. (트위터 같은 경우는 MS의 Bing과 Google 검색 서비스에서도 전체 데이터의 일부분밖에 색인하지 못한다고 합니다.)</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2009/08/15/%ec%86%8c%ec%85%9c-%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac-%ec%84%9c%eb%b9%84%ec%8a%a4%eb%93%a4%ec%9d%98-%eb%b6%84%ec%84%9d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Database에서 사용되는 join 기법들</title>
		<link>http://holik.org/2009/06/16/database%ec%97%90%ec%84%9c-%ec%82%ac%ec%9a%a9%eb%90%98%eb%8a%94-join-%ea%b8%b0%eb%b2%95%eb%93%a4/</link>
		<comments>http://holik.org/2009/06/16/database%ec%97%90%ec%84%9c-%ec%82%ac%ec%9a%a9%eb%90%98%eb%8a%94-join-%ea%b8%b0%eb%b2%95%eb%93%a4/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:17:19 +0000</pubDate>
		<dc:creator>Jihoon</dc:creator>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Join]]></category>

		<guid isPermaLink="false">http://holik.org/?p=148</guid>
		<description><![CDATA[이 글은 Sachin Arora의 Nested loops, Hash join and Sort Merge joins – difference? 라는 글에 기초하여 약간의 수정을 가한 것입니다. 1. Nested loop join (loop over loop) 이 알고리즘은 외부 루프와 내부 루프로 구성된다. 외부 루프는 몇몇의 엔트리로 구성되며, 외부 루프의 각 엔트리마다 내부 루프가 수행된다. 예) Select tab1.*, tab2.* from tabl, tab2 where [...]]]></description>
			<content:encoded><![CDATA[<p>이 글은 Sachin Arora의 <a href="http://oracle-online-help.blogspot.com/2007/03/nested-loops-hash-join-and-sort-merge.html">Nested loops, Hash join and Sort Merge joins – difference?</a> 라는 글에 기초하여 약간의 수정을 가한 것입니다.<br />
<span style="font-weight: bold;"><br />
1. Nested loop join (loop over loop)</span></p>
<p>이 알고리즘은 외부 루프와 내부 루프로 구성된다. 외부 루프는 몇몇의 엔트리로 구성되며, 외부 루프의 각 엔트리마다 내부 루프가 수행된다.</p>
<p class="MsoNormal"><o:p></o:p>예)</p>
<p class="MsoNormal">
<div style="border: 1px solid rgb(203, 203, 203); padding: 10px; background-color: rgb(132, 132, 132); color: rgb(255, 255, 255);" class="txc-textbox">
Select tab1.*, tab2.* from tabl, tab2 where tabl.col1=tab2.col2;</div>
<p>
이 SQL문은 다음과 같이 수행된다.</p>
<div style="border: 1px solid rgb(203, 203, 203); padding: 10px; background-color: rgb(132, 132, 132); color: rgb(255, 255, 255);" class="txc-textbox">
For i in (select * from tab1) loop</p>
<div style="margin-left: 4em;">
For j in (select * from tab2 where col2=i.col1) loop
</div>
<div style="margin-left: 8em;">
Display results;
</div>
<div style="margin-left: 4em;">
End loop;
</div>
<div>
End loop;</div>
</div>
<p></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><o:p></o:p>Nested loop join의 수행에 포함되는 단계들은 다음과 같다.
</p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">1) 외부 테이블 확인한다 (identify).
</p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">2) 내부 테이블을 외부 테이블에 할당한다.
</p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;">3) 외부 테이블의 각 행마다 내부 테이블의 전체 행들을 접근한다.
</p>
<p><span style="font-style: italic;">Optimizer는 언제 nested loop join을 사용하는가?</span></p>
<p>효율적인 join 조건으로 적은 수의 행을 담고 있는 테이블을 조인할 때 optimizer가 nested loop join을 사용한다. 외부 테이블의 각 행 마다 매번 내부 테이블의 전체 행을 확인하기 때문에 내부 테이블을 색인하는 것이 중요하다.</p>
<p>다음의 경우에는 nested loop join을 사용하지 않는다.</p>
<ol style="list-style-type: decimal;">
<li>조인하려는 테이블들의 크기가 클 때</li>
<li>내부 질의가 항상 같은 결과를 낼 때
</li>
<li>내부 테이블의 접근 경로가 외부 테이블의 데이터에 독립적일 때
</li>
</ol>
<p><!--[endif]--> <i style=""><u></u></i><br />
<span style="font-weight: bold;">2. Hash join</span></p>
<p>Hash join은 큰 데이블을 조인할 때 사용된다. Optimizer는 2개의 테이블 중 더 작은 테이블을 사용하여 메모리에 해쉬 테이블을 생성하고, 큰 테이블 전체를 스캔하면서 해쉬 값을 비교한다.</p>
<p>Hash join 알고리즘은 다음의 두 단계로 구성된다.</p>
<ol style="list-style-type: decimal;">
<li><span style="font-weight: bold;">Build</span> 단계: 두 테이블 중 더 작은 테이블로 해쉬 테이블을 메모리에 생성한다.</li>
<li><span style="font-weight: bold;">Probe</span> 단계: 큰 테이블을 스캔하면서 해쉬 값을 비교하여 join 되는 행을 찾는다.
</li>
</ol>
<p>간단하게 알고리즘을 적으면 다음과 같다.</p>
<p class="MsoNormal"><i style=""><u>Build 단계<o:p></o:p></u></i></p>
<p class="MsoNormal">
<div style="border: 1px solid rgb(203, 203, 203); padding: 10px; background-color: rgb(132, 132, 132); color: rgb(255, 255, 255);" class="txc-textbox">
For each row RW1 in small (left/build) table loop</p>
<div style="margin-left: 4em;">
Calculate hash value on RW1 join key
</div>
<div style="margin-left: 4em;">
Insert RW1 in appropriate hash bucket.
</div>
<div>
End loop;</div>
</div>
<p></p>
<p class="MsoNormal">
<p class="MsoNormal"><i style=""><u>Probe 단계</u></i></p>
<p class="MsoNormal">
<div style="border: 1px solid rgb(203, 203, 203); padding: 10px; background-color: rgb(132, 132, 132); color: rgb(255, 255, 255);" class="txc-textbox">
For each row RW2 in big (right/probe) table loop</p>
<div style="margin-left: 4em;">
<span style="">            </span>    Calculate the hash value on RW2 join key
</div>
<div style="margin-left: 4em;">
<span style="">            </span>    For each row RW1 in hash table loop
</div>
<div style="margin-left: 8em;">
  If RW1 joins with RW2
</div>
<div style="margin-left: 12em;">
  output (RW1, RW2)
</div>
<div style="margin-left: 4em;">
End loop;
</div>
<div>
End loop;</div>
</div>
<p style="font-style: italic;" class="MsoNormal">Optimizer는 언제 hash join을 사용하는가?</p>
<p class="MsoNormal">Optimizer는 조인하려는 테이블의 크기가 큰 경우에 사용한다. Nested loop와 다르게, hash join은 해쉬 테이블 생성 후에 join이 이루어지기 때문에 결과가 즉시 나오지 않는다.<br />
<i style=""><u><o:p></o:p></u></i></p>
<p class="MsoNormal">
<p>
<span style="font-weight: bold;">3. Sort merge join</span></p>
<p>Sort merge join은 두 개의 독립적인 데이터 소스를 조인하는 경우에 사용된다. 이 방법은 일반적으로 데이터의 크기가 큰 경우에 nested loop보다 성능이 좋지만 hash join만큼 좋지는 않다.</p>
<p>이 방법이 hash join보다 좋을 때는 join 조건으로 사용되는 열이 이미 정렬되어 있거나 정렬될 필요가 없을 때이다.</p>
<p>알고리즘은 다음과 같다.</p>
<p class="MsoNormal" style="margin-left: 0.5in;"><o:p></o:p></p>
<div style="border: 1px solid rgb(203, 203, 203); padding: 10px; background-color: rgb(132, 132, 132); color: rgb(255, 255, 255);" class="txc-textbox">
While not at the end of either input loop</p>
<div style="margin-left: 4em;">
<span style="">        </span>    If RW1 key == RW2 key
</div>
<div style="margin-left: 8em;">
Output (RW1, RW2)</div>
<div style="margin-left: 8em;">
Get next row R1 from input 1
</div>
<div style="margin-left: 8em;">
<span style="">                </span>    Get next row R2 from input 2
</div>
<div style="margin-left: 4em;">
<span style="">        </span>    Else if RW1 key &lt; RW2 key
</div>
<div style="margin-left: 8em;">
Get next row RW1 from input 1
</div>
<div style="margin-left: 4em;">
<span style="">        </span>    Else
</div>
<div style="margin-left: 8em;">
Get next row RW2 from input 2
</div>
<div>
<span style=""> </span>End loop;</div>
</div>
<p class="MsoNormal" style="margin-left: 0.5in;">
<p>
중요한 점은 외부 테이블의 행의 개수만큼 내부 테이블에 접근하여야 하는 nested loop join과는 다르게, sort merge join 알고리즘은 테이블의 각 행을 단 한 번씩만 접근한다. 따라서 데이터의 크기가 클 때 nested loop join보다 더 좋은 성능을 보인다.</p>
<p>Optimizer는 언제 sort merge join을 사용하는가?</p>
<ol style="list-style-type: upper-alpha;">
<li>join 조건이 부등 조건일 경우 (&lt;, &lt;=, &gt;=)에 사용한다. hash join은 부등 조건에 사용될 수 없고, 데이터의 크기가 큰 경우 nested loop join은 고려의 대상이 아니다.</li>
<li>&#8220;order by&#8221;와 같이, 만약 어떤 속성에 대하여 항상 정렬해야하는 경우, hash join보다 sort merge join이 더 좋은 성능을 보이기 때문에 optimizer는 sort merge join을 사용한다.
</li>
</ol>
<p><i style=""></i></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://holik.org/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://holik.org/2009/06/16/database%ec%97%90%ec%84%9c-%ec%82%ac%ec%9a%a9%eb%90%98%eb%8a%94-join-%ea%b8%b0%eb%b2%95%eb%93%a4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

