<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with cs502]]></title><description><![CDATA[A list of topics that have been tagged with cs502]]></description><link>https://community.secnto.com//tags/cs502</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 19:54:55 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/cs502.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[CS502 Assignment 1 Solution and Discussion]]></title><description><![CDATA[Q.2
Solution:
Method 1
[image: jCrQeLM.png]
Method 2
[image: rHiXB61.png]
[image: k84qIO4.png]
]]></description><link>https://community.secnto.com//topic/2229/cs502-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2229/cs502-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[The Huffman algorithm finds for?]]></title><description><![CDATA[@moaaz said in The Huffman algorithm finds for?:

Optimal

If optimal is measured by average code word length, Huffman’s algorithm gives optimal codes, and the redundancy can be measured as the difference between the average code word length and Shannon’s entropy. If the objective function is replaced by an exponentially weighted average, then a simple modification of Huffman’s algorithm gives optimal codes. The redundancy can now be measured as the difference between this new average and Renyi’s generalization of Shannon’s entropy. By decreasing some of the codeword lengths in a Shannon code, the upper bound on the redundancy given in the standard proof of the noiseless source coding theorem is improved. The lower bound is improved by randomizing between codeword lengths, allowing linear programming techniques to be used on an integer programming problem. These bounds are shown to be asymptotically equal, providing a new proof of Kricevski’s results on the redundancy of Huffman codes. These results are generalized to the Renyi case and are related to Gallager’s bound on the redundancy of Huffman codes.
]]></description><link>https://community.secnto.com//topic/1518/the-huffman-algorithm-finds-for</link><guid isPermaLink="true">https://community.secnto.com//topic/1518/the-huffman-algorithm-finds-for</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[What is generally true of Adjacency List and Adjacency Matrix representations of graphs?]]></title><description><![CDATA[@moaaz said in What is generally true of Adjacency List and Adjacency Matrix representations of graphs?:

Lists require less space than matrices but take longer to find the weight of an edge (v1,v2)

]]></description><link>https://community.secnto.com//topic/1517/what-is-generally-true-of-adjacency-list-and-adjacency-matrix-representations-of-graphs</link><guid isPermaLink="true">https://community.secnto.com//topic/1517/what-is-generally-true-of-adjacency-list-and-adjacency-matrix-representations-of-graphs</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Quiz 2 Solution and Discussion]]></title><description><![CDATA[@moaaz said in CS502 Quiz 2 Solution and Discussion:

For traversing graphs, Breadth-first search can be visualized as a wave front propagating inwards towards root (or source) node. CS502

For traversing the graphs, Breadth-First Search (BFS) can be visualized as a wavefront propagating inward towards the root node.
]]></description><link>https://community.secnto.com//topic/1515/cs502-quiz-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1515/cs502-quiz-2-solution-and-discussion</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Handouts]]></title><description><![CDATA[<p dir="auto"><a href="/assets/uploads/files/1581697710574-fundamentals-of-algorithms-cs502-handouts.pdf">Fundamentals of Algorithms - CS502 Handouts.pdf</a></p>
]]></description><link>https://community.secnto.com//topic/1514/cs502-handouts</link><guid isPermaLink="true">https://community.secnto.com//topic/1514/cs502-handouts</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 GDB 1 Solution and Discussion]]></title><description><![CDATA[@zareen said in CS502 GDB 1 Solution and Discussion:

require to find the shortest possible route algorithm

Dijkstra’s algorithm (or Dijkstra’s Shortest Path First algorithm, SPF algorithm) is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.
Reff
Dijkstra’s algorithm to find the shortest path between a and b. It picks the unvisited vertex with the low distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor’s distance if smaller. Mark visited (set to red) when done with neighbors.
[image: iKmWWZF.gif]
Dijkstra’s algorithm
llustration of Dijkstra’s algorithm finding a path from a start node (lower left, red) to a goal node (upper right, green) in a robot motion planning problem. Open nodes represent the “tentative” set (aka set of “unvisited” nodes). Filled nodes are visited ones, with color representing the distance: the greener, the closer. Nodes in all the different directions are explored uniformly, appearing more-or-less as a circular wavefront as Dijkstra’s algorithm uses a heuristic identically equal to 0.
[image: DB15LaU.gif]
A demo of Dijkstra’s algorithm based on Euclidean distance. Red lines are the shortest path covering, i.e., connecting u and prev[u]. Blue lines indicate where relaxing happens, i.e., connecting v with a node u in Q, which gives a shorter path from the source to v.
[image: aycA5pg.gif]
]]></description><link>https://community.secnto.com//topic/1474/cs502-gdb-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1474/cs502-gdb-1-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Assignment 3 Solution and Discussion]]></title><description><![CDATA[Q.1 Answer
[image: 75vrAb3.png]
Q.2 Answer
[image: 1S6Tme3.png]
]]></description><link>https://community.secnto.com//topic/924/cs502-assignment-3-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/924/cs502-assignment-3-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Midterm Solved Papers Mid and Final]]></title><description><![CDATA[Current CS502 Paper Mid-Fall-2019
Cs502
Divide and conquer (3)
Catalan number(5)
Chain matrix multiple cation (5)
Bubble sort(5)
Property of algorithms (3)
McQ from handout




CS-502 Today's Mid Term Paper

MCQ's Mostly from pastpers

2 qs marks 3 and 3 qs marks 5

1.Sorting and write its types..5 marks

2. Counting sort numbers are given.. 5 marks

3.Any Program.. i don't know this qs..5 marks

4. Edit Transcript.. 3 marks

5. Upper bound and lower bound

]]></description><link>https://community.secnto.com//topic/816/cs502-midterm-solved-papers-mid-and-final</link><guid isPermaLink="true">https://community.secnto.com//topic/816/cs502-midterm-solved-papers-mid-and-final</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Quiz 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Opening Dec 11, 2019<br />
Closing Dec 12, 2019</p>
]]></description><link>https://community.secnto.com//topic/721/cs502-quiz-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/721/cs502-quiz-1-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Assignment No. 02 Solution and Discussion]]></title><description><![CDATA[Solution:
Question No. 01:   The name of the algorithm being used for sorting the given array has given below.
Selection sort
Question No. 02:  The Pseudo code for the algorithm used for sorting the given array has given below.
Pseudo code:
1    Selection sort (A)
{
2         For i	1 to A.lenght-1
{
3            imin	 i
4            for j 	  i+1 to A.length
{
5                  If (A[j] &lt; A[imin])
Imin        j
}
6        Temp         A[i]
7        A[i]         A[imin]
8        A[imin]       Temp
}
}
Question No. 03: The step by stem analysis of the algorithm designed in question 2 is as follow,
The time taken by each statement (step) is given as follows,
[image: PetMmcY.png]



Selection sort (A)
Cost
Times



{	
For i	1 to A.length-1                            |c1                                                | n
{
imin	 i--------------------&gt;                    c2	n-1
for j 	i+1 to A.length	
{                                                                 c3                                                  n+n-1+…1=n(n+1)/2
If (A[j] &lt; A[imin])	
imin	j
}
Temp          A[i]			        c4		n-1
A[i]           A[imin] 	              c5				            n-1	
A[imin]         Temp	     c6				            n-1	
}
}
Total time T(n) can be calculated as follows,
T(n)= c1n+c2(n-1)+c3(n(n+1)/2)+c4(n-1)+c5(n-1)+c6(n-1)
c1n+c2n-c2+c3 (n2+n/2) +c4n-c4+c5n-c5+c6n-c6                collect the like terms
c3n2/2+ (c1+c2+c3/2+c4+c5+c6) n + (-c2-c4-c5-c6)
This is equivalent to a polynomial an2+bn+c
Therefore T (n) = Big O (n2)    by taking the highest order term of the equation.
Note: a, b, c in polynomial represents constants
//   Ignoring constant terms
T(n)   =  O (n2)
]]></description><link>https://community.secnto.com//topic/650/cs502-assignment-no-02-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/650/cs502-assignment-no-02-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS502 Assignment No. 01 Solution and Discussion]]></title><description><![CDATA[@zareen said in CS502 Assignment No. 01 Solution and Discussion:

Question No 02: (Marks: 10)
You are required to calculate (Step by Step) the worst case time complexity T(n) of the algorithm designed in Question No. 01.

Solution:
Question No. 02: The step by stem analysis of the algorithm designed in question 1 is as follow,
The time taken by each statement (step) is given as follows,
Step 1:   C1                       // Execute only 1 time or Constant Time or  O (1)
Step 2:   C2                       // Execute only 1 time or Constant Time or  O (1)
Step 3:   n -2                    // Execute n -2 times
Step 4:   n -2                    // Execute n -2 times
Step 5:   n – 2                  // Execute n -2 times
Step 6:   C3                      // Execute only 1 time or Constant Time or  O (1)
Step 7:   C4                                  // Execute only 1 time or Constant Time or  O (1)
Step 8:   C5                                  // Execute only 1 time or Constant Time or  O (1)
Step 9:   C6                                 // Execute only 1 time or Constant Time or  O (1)
Total time T(n) can be calculated as follows,
T(n)    = C1 + C2 + (n -2 ) + (n -2 ) + (n -2 ) + C3 + C4 + C5 + C6
T(n)    = C1 + C2 + n -2 + n -2  + n -2  + C3 + C4 + C5 + C6
T(n)    = C1 + C2 + n  + n   + n - 6  + C3 + C4 + C5 + C6
T(n)    =  3n + C1 + C2   + C3 + C4 + C5 + C6 -6
T(n)    =  3n + (C1 + C2   + C3 + C4 + C5 + C6 -6)
T(n)    =  3n + C7                                                              //  C7  = (C1 + C2   + C3 + C4 + C5 + C6 -6)
T(n)    =  n                                                                       //   Ignoring constant terms
Or      T(n)   =  O (n )
]]></description><link>https://community.secnto.com//topic/536/cs502-assignment-no-01-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/536/cs502-assignment-no-01-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>