<?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 cs402]]></title><description><![CDATA[A list of topics that have been tagged with cs402]]></description><link>https://community.secnto.com//tags/cs402</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 19:57:45 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/cs402.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[CS402 Assignment 1 Solution and Discussion]]></title><description><![CDATA[@zaasmi said in CS402 Assignment 1 Solution and Discussion:

Re: CS402 Assignment 1 Solution and Discussion
Please share CS402 Assignment 1 Fall 2020

Theory of Automata (CS402)
Assignment # 01
Fall 2020
Total marks = 20 30th November, 2020
Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Strict action will be taken if submitted solution is copied from any other student or from the internet.
You should concern the recommended books to clarify your concepts as handouts are not sufficient.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.
Topic Covered:
Objective of this assignment is to assess the understanding of students about:
·         The concept of languages
·         Regular Expressions
·         Finite automata.
NOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
CS402@vu.edu.pk
Questions No 01                                                                                             Marks (10)
Construct a FA which recognizes the set of all strings defined over ∑= {0, 1} ending with the suffix ‘10’. Also draw transition table for that language.
Questions No 02                                                                                         Marks (10)
Identify the language L accepted by the following regular expression abab(a + b)*. Also define the recursive definition of that language.
Which of the following string(s) is/are part of language L defined as above?
baaba
aabaa
abbbab
babaa
]]></description><link>https://community.secnto.com//topic/2086/cs402-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2086/cs402-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 3 Solution and Discussion]]></title><description><![CDATA[Solution:
[image: Q6aVBO6.png]
[image: PB7zJDO.png]
[image: XnCOX5j.png]
[image: KG4WE2y.png]
[image: kagU2d1.png]
[image: FdZJjgG.png]
[image: GgAlx12.png]
[image: JkCiwJs.png]
[image: oyMNZdX.png]
[image: Te4WVHR.png]
]]></description><link>https://community.secnto.com//topic/1998/cs402-assignment-3-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1998/cs402-assignment-3-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 2 Solution and Discussion]]></title><description><![CDATA[Develop a program that calculates Loan in C++. Your program should satisfy the following requirement:
User Input:
1 User is asked to enter name.
2 User is asked to enter number of dependent with range (0-5).
3 User is asked to enter status i.e. (Permanent or Probation).
4 User is asked to enter Salary.
5 User is asked to enter Duration at Job (in years):
o &lt;1
o 1-2
o 2-4
o 4-7
o &gt;7
6 User is asked how much loan is required.
Criteria:
 Loan can be given if and only if a person is on Permanent job for more than 1 years.
 Minimum salary from which a loan can be given is 35,000 per month for a person having no
dependent. Minimum salary requirement increases by 20,000 per dependent.
 If years of services is from 1 to 2 years, then max loan amount can be up to 6 salaries.
 If years of services is from 2 to 4 years, then max loan amount can be up to 8 salaries.
 If years of services is from 4 to 7 years, then max loan amount can be up to 10 salaries.
 If years of services is from 7 to 10 years, then max loan amount can be up to 12 salaries.
 If years of services is more than 10 years, then max loan amount can be up to 24 salaries.
 Add 13% interest on the approved loan amount. This amount will be payable within 8 years’
time i.e. 96 months.
 If the money to lend is more than the lend amount, then calculate the difference and show it
properly.
 For unsuccessful Loan Application: Show Message: “CUSTOMER NAME, your lend
application has not been successful this time”.
 For Successful Loan Application: Show Message: “Congratulations CUSTOMER NAME, your
lend application is successful this time. Your monthly installment will be ______ Amount
Payable for 96 months”.
]]></description><link>https://community.secnto.com//topic/1959/cs402-assignment-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1959/cs402-assignment-2-solution-and-discussion</guid><dc:creator><![CDATA[Hafeex]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 1 Solution and Discussion]]></title><description><![CDATA[
Q1. Show that the following pairs of regular expressions define the same language over the alphabet


L = {p, q}.


(i) (pq)p and p(qp)
(ii) (p* + q)* and (p + q)*
(iii) (p* + q*)* and (p + q)*
[15 marks = 5*3]

https://youtu.be/6OJ6PEp-3w8
Solution:
(i)	(pq)p and p(qp) represents same language.
Both will never generate pp’s and both are starting and ending with p
(ii)	(p* +q)*                  (p+q)*
(p*)+ q                p* + q*
p* + q*                    p* + q*
Both are all strings possible in L = {p,q}
(iii)	(p* +q*)*                  (p+q)*
(p*)* + (q*)*
p* + q*
(p + q)*    Language with all strings

Q2. Write a regular expression for the following language over the alphabet L = {x, y} such that it accepts all strings in which the letter y is never tripled. This means that no word contains the substring yyy. [5 marks]

Solution:
The required R.E will be
(˄ + y + yy)  (x + xy + xyy)*
]]></description><link>https://community.secnto.com//topic/1787/cs402-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1787/cs402-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 GDB 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Theory of automata is study of abstract machines, like Turing Machines, Finite State Machines, Push Down Automata, Mealy and Moore Machines. You have to discuss and explain which kind of automaton machine promisingly can serve as a recognizer for context-free languages.</p>
]]></description><link>https://community.secnto.com//topic/1435/cs402-gdb-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1435/cs402-gdb-1-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 3 Solution and Discussion]]></title><description><![CDATA[Idea Solution:
[image: DTgY5qn.png]
]]></description><link>https://community.secnto.com//topic/1058/cs402-assignment-3-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1058/cs402-assignment-3-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 2 Solution and Discussion]]></title><description><![CDATA[@zareen thanks for sharing
]]></description><link>https://community.secnto.com//topic/708/cs402-assignment-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/708/cs402-assignment-2-solution-and-discussion</guid><dc:creator><![CDATA[mehwish]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS402 Assignment 1 Solution and Discussion]]></title><description><![CDATA[CS402_Assignment#01_Solution_cyberian.pk.docx
[image: 1573729827421-e9b034a6-5143-46d8-a96c-bfbeda3e1b82-image.png]
]]></description><link>https://community.secnto.com//topic/574/cs402-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/574/cs402-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>