<?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[CS402 Assignment 1 Solution and Discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/574/cs402-assignment-1-solution-and-discussion">CS402 Assignment 1 Solution and Discussion</a></p>
]]></description><link>https://community.secnto.com//topic/1787/cs402-assignment-1-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 20:44:43 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/1787.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 May 2020 20:38:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS402 Assignment 1 Solution and Discussion on Fri, 19 Jun 2020 08:03:03 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Q1. Show that the following pairs of regular expressions define the same language over the alphabet</p>
</blockquote>
<blockquote>
<p dir="auto">L = {p, q}.</p>
</blockquote>
<blockquote>
<p dir="auto">(i) (pq)p and p(qp)<br />
(ii) (p* + q)* and (p + q)*<br />
(iii) (p* + q*)* and (p + q)*<br />
[15 marks = 5*3]</p>
</blockquote>
<p dir="auto"><a href="https://youtu.be/6OJ6PEp-3w8" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/6OJ6PEp-3w8</a></p>
<p dir="auto"><strong>Solution:</strong><br />
(i)	(pq)<em>p and p(qp)</em> represents same language.<br />
Both will never generate pp’s and both are starting and ending with p</p>
<p dir="auto">(ii)	(p* +q)*                  (p+q)*<br />
(p*)<em>+ q</em>                p* + q*<br />
p* + q*                    p* + q*<br />
Both are all strings possible in L = {p,q}</p>
<p dir="auto">(iii)	(p* +q*)*                  (p+q)*<br />
(p*)* + (q*)*<br />
p* + q*<br />
(p + q)*    Language with all strings</p>
<blockquote>
<p dir="auto">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]</p>
</blockquote>
<p dir="auto"><strong>Solution:</strong></p>
<p dir="auto">The required R.E will be<br />
(˄ + y + yy)  (x + xy + xyy)*</p>
]]></description><link>https://community.secnto.com//post/4986</link><guid isPermaLink="true">https://community.secnto.com//post/4986</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Fri, 19 Jun 2020 08:03:03 GMT</pubDate></item><item><title><![CDATA[Reply to CS402 Assignment 1 Solution and Discussion on Thu, 21 May 2020 22:42:33 GMT]]></title><description><![CDATA[<p dir="auto">Assignment No. 01Semester: Spring 2020Theory of Automata – CS402</p>
<p dir="auto">Total Marks: 20</p>
<p dir="auto">Due Date:  06-01-20</p>
<p dir="auto">Objectives:<br />
Objective of this assignment is to assess the understanding of students about the concept of languages, regular expressions and finite automata.</p>
<p dir="auto">Instructions:<br />
Please read the following instructions carefully before submitting assignment:<br />
You should consult the recommended books, PowerPoint slides and audio lectures to clarify your concepts.<br />
You are supposed to submit your assignment in .doc format. Any other formats like scan images, PDF, zip, rar and bmp etc will not be accepted.<br />
It should be clear that your assignment will not get any credit if:<br />
The assignment is submitted after due date.<br />
The assignment is copied from Internet or from any other student.<br />
The submitted assignment does not open or file is corrupt.</p>
<p dir="auto">Note: No assignment will be accepted after the due date through email in any case (load shedding, server down, internet malfunctioning etc.).<br />
It is recommended to upload solution file at least two days before its closing date.</p>
<p dir="auto">For any query about the assignment, contact at <a href="mailto:CS402@vu.edu.pk" target="_blank" rel="noopener noreferrer nofollow ugc">CS402@vu.edu.pk</a></p>
<p dir="auto">Question:                                                                    				             Marks = 20<br />
Q1. Show that the following pairs of regular expressions define the same language over the alphabet</p>
<p dir="auto">L = {p, q}.</p>
<p dir="auto">(i) (pq)<em>p         and    p(qp)</em><br />
(ii) (p* + q)*    and    (p + q)*<br />
(iii) (p* + q*)* and    (p + q)*<br />
[15 marks = 5*3]<br />
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]</p>
]]></description><link>https://community.secnto.com//post/4985</link><guid isPermaLink="true">https://community.secnto.com//post/4985</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Thu, 21 May 2020 22:42:33 GMT</pubDate></item></channel></rss>