Posts

Showing posts from April, 2019

MCSL036 LAB Course Solved Assignment 2018-2019

LAB Course Solved Section A: Object Oriented Analysis and Design   Question 1: As online commerce is increasing, many organizations are setting up online digital payment system which work as follows:  (i) A costumer does shopping on any shopping site with a credit card or a debit card. A credit card and debit card is issued to any person after verification of all details by a bank such as identity card and the salary statement for the last six months.  (ii) Purchasing detail goes through a payment gateway which encrypts the data to keep it private  and send it to the payment processor   (iii) The payment processor sends a request to the costumer’s issuing bank to check whether they have enough credit to pay for the purchased items (iv) The issuing bank responds with a yes (a approval) or no (a denial)    (v) The payment processor sends the answer back to the costumer’s merchant bank to credit the account in the name of a costumer.   Do the following tasks: (1) Draw

Applet

Java is an Object Oriented Programming language, supported by various classes. The Applet class is packed in the Java. Applet package which has several interfaces. These interfaces enable the creation of Applets, interaction of Applets with the browser, and playing audio clips in Applets. In Java 2, class Javax.swing.  JApplet is used to define an Applet that uses the Swing GUI components.  Applet is a special type of program that is embedded in the webpage to generate the dynamic content. It runs inside the browser and works at client side.  Applet is embedded in a HTML page using the APPLET or OBJECT tag and hosted on a web server. Applets are used to make the web site more dynamic and entertaining. Below is the list given for Do’s and Don’ts of Java Applets:  Do’s  • Draw pictures on a web page   • Create a new window and draw the picture in it.   •Play sounds.   • Receive input from the user through the keyboard or the mouse.   • Make a network connection to the s

Difference between NP-hard and NP-complete problems

Let us take two problems A and B both are NP problems. Reducibility - If we can convert one instance of a problem A into problem B (NP problem) then it means that A is reducible to B. NP-hard - Now suppose we found that A is reducible to B, then it means that B is at least as hard as A. NP-Complete - The group of problems which are both in NP and NP-hard are known as NP-Complete problem. P  is set of problems that can be solved by a deterministic Turing machine in  P olynomial time. NP  is set of decision problems that can be solved by a  N on-deterministic Turing Machine in  P olynomial time. P is subset of NP

Turing Machine

Turing Machine was invented by Alan Turing in 1936 and it is used to accept Recursive Enumerable Languages (generated by Type-0 Grammar). Turing Machine (Halt State Version)   A Turing Machine is a sextuple of the form  7-tuple (Q, T, B, ∑, δ, q0, B, F) where: Q  is a finite set of states T  is the tape alphabet (symbols which can be written on Tape) B  is blank symbol (every cell is filled with B except input alphabet initially) ∑  is the input alphabet (symbols which are part of input alphabet) δ  is a transition function which maps Q × T → Q × T × {L,R}. Depending on its present state and present tape alphabet (pointed by head pointer), it will move to new state, change the tape symbol (may or may not) and move head pointer to either left or right. q 0  is the initial state F  is the set of final states. If any state of F is reached, input string is accepted  A  Turing machine  is a  mathematical model of computation  that defines an  abstract ma

MCS033 Advance Discrete Mathematics Solved assignment 2018-19

Advanced Discrete Mathematics Solved  Question 1:  Give an example of a second order linear homogenous recurrence relation with constant coefficients.    Question (a): Find the order and degree of the following recurrences relation|. Which     of the following belongs to the linear homogenous recurrence relation with constant coefficient?                        (i) 𝑓n = 𝑓n-1 + 𝑓n-2                        (ii) 𝑎n =5𝑎n-1 + 𝑛3                        (iii) 𝑎n =𝑎n-1 + 𝑎n-2 +…. 𝑎0                        (iv) 𝑎n = 5𝑎n-1 𝑎n-2 Question (b): Solve the following recurrences relation                            i)   𝑆n = 2𝑆n-1                                  ii) Find an explicit recurrence relation for minimum number of moves in which the 𝑛-disks in tower of Hanoi puzzle can be solved! Also solve the obtained recurrence relation through an iterative method.          Question 2: Draw 2-isomorphic graphs and 3 non- isomorphic graphs on five vertices.    Question 3: Prov