Skip to content

Commit 0af891d

Browse files
authored
Merge pull request #458 from virtual-labs/header_and_footer
Replaced the missing special character
2 parents 53a58fd + 3502226 commit 0af891d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/lab/exp4/Theory.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h2>Application of linked lists is to polynomials</h2>
175175
<li>Let f(x) = Σ<sup>d</sup><sub>i=0</sub> a<sub>i</sub>x<sup>i</sup>.
176176
<br/> The quantity d is called as the degree of the polynomial, with the assumption that a<sub>d</sub> not equal to 0. A polynomial of degree d may however have missing terms i.e., powers j such that 0 &lt;= j &lt; d and a<sub>j</sub> = 0.
177177
<br/> The standard operations on a polynomial are addition and multiplication. If we store the coefficient ofeach term of the polynomials in an array of size d + 1, then these operations can be supported in a straightforwardway. However, for sparse polynomails, i.e., polynomials where there are few non-zero coefficients, this is not efficient. One possible solution is to use linked lists to store degree, coefficient pairs for non-zero coefficients. With this representation, it makes it easier if we keep the list of such pairs in decreasing order of degrees. A polynomial is a sum of terms. Each term consists of a coefficient and a (common) variable raised to an exponent. We consider only integer exponents, for now.
178-
<br/> Example: 4x<sup>3</sup> + 5x – 10.</li>
178+
<br/> Example: 4x<sup>3</sup> + 5x 10.</li>
179179
<br/>
180180
<li>How to represent a polynomial? Issues in representation, should not waste space, should be easy to use it for operating on polynomials. Any case, we need to store the coefficient and the exponent.
181181
<br/> struct node
@@ -196,16 +196,16 @@ <h2>Application of linked lists is to polynomials</h2>
196196
<br/>
197197

198198
<li> Adding polynomials :
199-
<br/> (3x<sup>5</sup> – 9x<sup>3</sup> + 4x<sup>2</sup>) + (–8x<sup>5</sup> + 8x<sup>3</sup> + 2)
200-
<br/> = 3x<sup>5</sup> – 8x<sup>5</sup> – 9x<sup>3</sup> + 8x<sup>3</sup> + 4x<sup>2</sup> + 2
201-
<br/> = –5x<sup>5</sup> – x<sup>3</sup> + 4x<sup>2</sup> + 2 </li>
199+
<br/> (3x<sup>5</sup> 9x<sup>3</sup> + 4x<sup>2</sup>) + (8x<sup>5</sup> + 8x<sup>3</sup> + 2)
200+
<br/> = 3x<sup>5</sup> 8x<sup>5</sup> 9x<sup>3</sup> + 8x<sup>3</sup> + 4x<sup>2</sup> + 2
201+
<br/> = 5x<sup>5</sup> x<sup>3</sup> + 4x<sup>2</sup> + 2 </li>
202202

203203
<br/>
204204
<li>Multiplying polynomials:
205-
<br/> (2x – 3)(2x<sup>2</sup> + 3x – 2)
206-
<br/> = 2x(2x<sup>2</sup> + 3x – 2) – 3(2x<sup>2</sup> + 3x – 2)
207-
<br/> = 4x<sup>3</sup> + 6x<sup>2</sup> – 4x – 6x<sup>2</sup> – 9x+ 6
208-
<br/> = 4x<sup>3</sup> – 13x+ 6
205+
<br/> (2x 3)(2x<sup>2</sup> + 3x 2)
206+
<br/> = 2x(2x<sup>2</sup> + 3x 2) 3(2x<sup>2</sup> + 3x 2)
207+
<br/> = 4x<sup>3</sup> + 6x<sup>2</sup> 4x 6x<sup>2</sup> 9x+ 6
208+
<br/> = 4x<sup>3</sup> 13x+ 6
209209

210210
</li>
211211
</ul>
@@ -338,4 +338,5 @@ <h4>Follow Us</h4>
338338

339339

340340

341+
341342
</body><!-- jQuery --></html>

src/lab/exp9/Theory.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ <h1 class="text-h1-lightblue">Spanning Trees in Graphs</h1>
177177
<p><i>
178178
<b>Algorithm Prims(G,v)</b><br/>
179179
Add v to T;<br/>
180-
While T has less than n – 1 edges do<br/>
180+
While T has less than n 1 edges do<br/>
181181
w = vertex s.t. (v,w) has the smallest weight amongst edges with one endpoint in T and another not in T.<br/>
182182
Add (v,w) to T.<br/>
183183
end-while<br/>
@@ -313,4 +313,5 @@ <h4>Follow Us</h4>
313313

314314

315315

316+
316317
</body><!-- jQuery --></html>

0 commit comments

Comments
 (0)