Skip to content

CS402 - Theory of Automata

3 Topics 30 Posts
  • 0 Votes
    3 Posts
    1k Views
    zaasmiZ
    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]
  • CS402 Assignment 2 Solution and Discussion

    Solved cs402 assignment 2 solution discussion spring 2020
    3
    0 Votes
    3 Posts
    1k Views
    H
    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 <1 o 1-2 o 2-4 o 4-7 o >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”.
  • CS402 Assignment 1 Solution and Discussion

    Solved cs402 assignment 1 solution discussion spring 2020
    3
    0 Votes
    3 Posts
    4k Views
    cyberianC
    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)*
Reputation Earning
How to Build a $1,000/Month World CUP LIVE Matches Live Cricket Streaming
Sponsored
File Sharing
Stats

1

Online

3.1k

Users

2.8k

Topics

8.6k

Posts
Popular Tags
Online User
| |