V.S.B. ENGINEERING COLLEGE, KARUR Department of …heat, energy and hyper threading and also...

33
V.S.B. ENGINEERING COLLEGE, KARUR Department of Computer Science and Engineering Academic Year: 2017-2018 (ODD Semester) Class/Year/Semester: CSE ‘A’ & ‘B’ /II/III Assignment Questions Analog and Digital Communication 1. Explain the nature of SSB spectrum if the modulating signal is m(t) = cos2π.100t + cos2π.200t and carrier is given by c(t) = cos2π.1000t. 2. The output modulated wave of a standard AM transmitter is represented S(t) = 500(1 + 0.4sin3140t)cos6.28*10 7 t. This voltage is fed to a load of 600Ω. Find (i) Modulating frequency (ii) Carrier frequency (iii) Mean power output 3. The first stage of a two stage amplifier has a voltage gain of 10, a 600Ω input resistor, a 1600Ω equivalent noise resistance and a 27 KΩ output resistor. For the second stage, these values are 25, 81 KΩ, 10KΩ and 1MΩ respectively. Calculate equivalent input noise resistance of this two stage amplifier and also calculate the noise figure of the amplifier if it is driven by a generator whose output impedance is 50 Ω. 4. Sketch the digitally modulated waveforms for the binary data 110101 using ASK, FSK, PSK. 5.Explain MSK generation and demodulation.

Transcript of V.S.B. ENGINEERING COLLEGE, KARUR Department of …heat, energy and hyper threading and also...

V.S.B. ENGINEERING COLLEGE, KARUR

Department of Computer Science and Engineering

Academic Year: 2017-2018 (ODD Semester)

Class/Year/Semester: CSE ‘A’ & ‘B’ /II/III

Assignment Questions

Analog and Digital Communication

1. Explain the nature of SSB spectrum if the modulating signal is m(t) = cos2π.100t + cos2π.200t

and carrier is given by c(t) = cos2π.1000t.

2. The output modulated wave of a standard AM transmitter is represented

S(t) = 500(1 + 0.4sin3140t)cos6.28*107 t. This voltage is fed to a load of 600Ω. Find

(i) Modulating frequency

(ii) Carrier frequency

(iii) Mean power output

3. The first stage of a two stage amplifier has a voltage gain of 10, a 600Ω input resistor, a

1600Ω equivalent noise resistance and a 27 KΩ output resistor. For the second stage, these

values are 25, 81 KΩ, 10KΩ and 1MΩ respectively. Calculate equivalent input noise

resistance of this two stage amplifier and also calculate the noise figure of the amplifier if it is

driven by a generator whose output impedance is 50 Ω.

4. Sketch the digitally modulated waveforms for the binary data 110101 using ASK, FSK, PSK.

5.Explain MSK generation and demodulation.

Computer Architecture

1. Assume a two address format specified as source, destination. Examine the

following sequence of instructions and explain the addressing modes used and the operation

done in ever instruction.

(1) Move (R5)+, Ro

(2) Add (R5)+, Ro

(3) Move Ro, (R5)

(4) Move 16(R5), R3

(5)Add #40, R5.

2. Translating ARM assembly language into machine language: we can take an example all

the way from what the programmer writes what the computer executes. If r3 has a the base of

the array A and r2 corresponds to h, the assignment statement: A[30]=h+a[30]: is compiled

into assembly format. What is the ARM machine language code for the above statements?

3. Our favorite program runs in 10 seconds on computer A, which has a 2 GHZ clock. we are

Trying to help a computer designer build a computer, B, which will run this program

in 6 seconds. the designer has determined that a substantial increase in the clock rate is possible,

but this increase will affect the rest of the CPU design, causing computer B to require 1.2 times

as many clock cycles as computer A for the this program. What clock rate should we tell the

designer to target?

4. Design of ALU in detail and describe the following logical circuits:

(i)Half adder and Full adder

(ii)Half sub-tractor

(iii)Full sub-tractor

5. Assume that we can store only four digits of the significant and two digits of the exponent.

Now that we have explained floating point addition, lets try floating point multiplication. We

start by multiplying decimal numbers in scientific notation by hand: 1.110

tenX1010

X9.200tenX10-5.

6. Calculate the restoring and non-restoring division in fixed point. Simulate the same for 23/5:

Q=10111

B=00101

7.Consider the following MIPS and classify the dependencies:

sub $2,$1,$3 # Register $2 set by sub

and $12,$2,$5 #Firs operand $2 set by sub

or $13,$6,$2 # Second operand $2 set by sub

and $14,$2,$2 #First and second operand $2 set by subt

sw $15,1009$2) # Index($2) set by sub

8.How would this loop be scheduled on a static two issues pipeline for MIPS?

Loop: lw $t0, 0($s1)

addu $t0, $t0,$s2

sw $t0, 0($s1)

addi $s1, $s1, -4

bne $s1, $zero, Loop# Reorder the instructions to avoid as many pipeline

stalls as possible. Assume branches are predicted, so that control hazards are handled by

the hardware.

9. Explain instruction level parallel processing. State the challenges of ILP.

10.Suppose you want to achieve a speed –up of 90 times faster with 100 processors. What

percentage of the original computation can be sequential?

11. Suppose you want to perform two sums: one is a sum of 10 scalar variables, and one is a

matrix sum of a pair of two dimensional arrays, with dimensions 10 by 10. What speed up do

you get with 10 versus 100 processors? Next, calculate the speed –ups assuming the

matrices grow to 100 by 100.

12. Design the Intel core i3 Processor with full description of level, range, cache size, core,

heat, energy and hyper threading and also describes the merits, demerits and applications.

13.A computer system has a main memory consisting of 16M words. It also has a 32 k word

cache organized in the block set associative manner, with 4 blocks per set and 128 words per

block.

(i)Calculate the number of bits in each of the TAG, SET and WORD fields of the main

memory address format.

(ii)How will the main memory address look like for a fully associative mapped cache?

14. Design and Draw the diagram for I/O interface.

15. Elaborately describe the various input and output devices with real time applications.

Database Management Systems

I. Draw an ER diagram for the following scenario:

1. Supplier:

An organization purchases items from a number of suppliers. It keeps track of the items

purchased from each supplier, and it also keeps a record of suppliers' addresses. Items are

identified by ITEM-TYPE and have a DESCRIPTION. There may be more than one such

address for each supplier, and the price charged by each supplier for each item is stored.

Suppliers are identified by SUPPLIER-ID.

2. Hospital

A hospital stores data about patients, their admission and discharge from departmentsand

their treatments, For each patient, we know the name, address, sex, social security number, and

insurance code (if existing). For each department, we know the department's name, its location,

the name of the doctor who heads it, the number of bedsavailable, and the number of beds

occupied. Each patient gets admitted at a given date and discharged at a given date. Each patient

goes through multiple treatments during hospitalization; for each treatment, we store its name,

duration, and the possible reactions to it that the patient may have.

3. Building:

Each building in an organization has a different BUILDING-NAME and a BUILDING-

ADDRESS. The meeting rooms in each building have their own ROOM-NO in the building, and

each room has a specified SEATING-CAPACITY. Rooms are available for hire for meetings,

and each hire period must start on the hour. The hour and LENGTH-OF-USE are recorded. Each

hire is made by a group in the organization, and groups are identified by a GROUP-NO and have

a CONTACT-PHONE. The equipment required for each hire period also are recorded. Each

facility has an EQUIP-NO and a DESCRIPTION.

4. Quick Oil:

Design the database and show an E-R Diagram for the case below. For many-to-many

entities, show the additional tables that you would create. Quick Oil Company is in the business

of changing engine oil for its customers. In addition to changing oil, the company also performs

other services such as changing wipers, light bulbs etc. There are several technicians assigned to

a car as it comes in for an oil change. They maintain the name, address, social security number,

phone, and email address of the customer. In addition, the services that the customers purchase at

different times are tracked. For each service, they store the name of the service, the cost of the

service, description of the service, and number of hours of labor for the service. They maintain

employee information including name, phone, social security number, address, date-of-birth,

date-of-hire, and their hourly salary in the database. They also sell parts and the name,

manufacturer, cost, weight and number of items of each part is stored. A list of parts is

maintained in the database and customers that bought each part are tracked.

5. Handy man:

With a busy work life, home owners have difficulty in finding help for chores around the

house and garden. Different jobs require different skills, such as, carpentry, plumbing, electrical

wiring, etc. Several people have these skills and spare time to work on projects but are unable to

find places for part time employment. This business entails connecting people who have jobs

with workers willing to work on those jobs in their spare time. The workers should be able to list

their contact information and skills. The employers should be able to list the jobs and the skills

required for each job. The business model of the company is to get an enrollment fee for joining

the network for both the home owners and the workers. Please design a database and create an E-

R Diagram for the database

II. Write a SQL expressions for the following data base.

1. The Bank Database

branch(branch-name, branch-city, assets)

customer(customer-name, customer-street, customer-city)

account(account-number, branch-name, balance)

loan(loan-number, branch-name, amount)

depositor(customer-name, account-number)

borrower(customer-name, loan-number)

1. Find all loans over $1200.

2. Find the loan number for each loan of an amount greater than $1200.

3. Find the names of all customers who have a loan, an account, or both from the bank.

4. Find the names of all customers who have a loan and an account at the bank.

5. Find the names of all customers who have a loan at the Perryridge branch.

6. Find the names of all customers who have a loan at the Perryridge branch, but no account at

any branch of the bank.

7. Find the names of all customers who have an account at the Downtown and Mianus branches.

8. Find the total amount each branch has in accounts.

9. Find the average loan amount of each customer

10. Find the names of all customers who have an account at every branch located in Brooklyn.

2. The sailor database:

Sailor_schema(sailor_id, sailor_name,rating,age)

Reserves(sailor_id,Boat_id,day)

Boat_schema(Boat_id,Boat_name,color)

1. Find the names of sailors who have reserved at least one boat.

2. Find the ages of sailors whose names begin and end with C and has atleastthree characters.

3. Find the names of sailors who have reserved a blue or a yellow boat.

4. Find the names of sailors who have reserved a blue and a yellow boat.

5. Find the names of all sailors who have reserved blue boats but not yellowboats.

6. Find the names of sailors who have reserved boat number 120

7. Find the name of sailors who have reserved a green boat

8. Find the names of sailors who have not reserved a green boat

9. Find the names of sailors with highest rating.

3. The company data base.

Employee(SSN, fname, lname, birthdate, address, salary, dnumber)

Department(Dnumber, Dname, Dlocation)

Perform the following operations using SQl. Assume the data.

1. Insert a record into employee table.

2. Delete an employee with SSN equal to 10.

3. Update the Dnumber of the employee tuple having salary greater thanRs. 10,000

Retrieve the name and address of all employees who work for the ³XYZ´department

Environmental Science and Engineering

ASSIGNMENT QUESTIONS

1. Identify and explain the major threats to the biodiversity in India.

2. Describe in detail about any one pollution related case study.

3. Analyse the environmental effects of extracting and using minerals resources and write the

remedies taken.

4. Enlist the rules of management and handling biomedical waste and analyse critically the

problems associated with the implementation.

5. Explain about case studies on role of IT in human health protection.

Programming and Data Structures II

1. Develop an object oriented program in C++ to create a payroll system for an organization where

one base class consist of employee name, code, designation and another base class consist of a

account no and date of joining. The derived class consists of the data members such as basic pay.

DA, HRA, CCA and deductions PF, LIC, IT.(Program must use the concept of virtual base class)

2. Write C++ code to construct class of a person with name and age as public properties, account

details as private properties and % of mark as protected property. Construct a class with sports

details of person. Construct a class to rank person based on the equal weight age to academic and

sports details. Use the concept of inheritance.

3. Create a base class named ‗shape‘ with two member‘s base and height a member function for

initialization and virtual function to compute find area(). Derive two specific classes circle and

rectangle which overrides the function find area ().Use these classes in the main function and

display the area of circle and rectangle using virtual functions.

4. Write a C++ program to define a class called patient derive two classes from patient, namely in-

patient and out-patient. Define two classes‘ namely general ward and special ward. For out-

patient print the bill with consultation fee. For in-patient print bill according to their

accommodation either in general ward or special ward.

5. Write a C++ code to create a base class house. There are two classes called door and window

available. The house class has members which provide information related to the area of

construction, doors, and window details. It delegates the responsibility of computing cost of

doors and window construction to the door and window classes. Write the program to model the

above relationship and find the cost of constructing the house.

6. What are abstract classes? Write a program having student as an abstract class and create many

derived classes such as engineering, science, medical etc., from the student class. Create their

object and process them.

7. Write a C++ program to assign ‗n‘ projects to ‗m‘ programmers based on skill set of

programmers using friend function. Use static member variable to count number of assignments.

8. Create a base class shape. Take two data members of double types to compute the area of

different shapes. Derive two classes‘ triangle and rectangle from the base shape. Include

constructors in every class to initialize the objects. Include one pure virtual function

compute_area() to compute area. Using these classes, write a C++ program to compute the area

of triangle and rectangle. Use base class pointer to implement the virtual function.

9. Write a C++ program to accept integer or string values from the user within a specified range.

(Range has to be specified with minimum and maximum by the user). If the input violates the

range, appropriate exception needs to be raised.

10. It will be convenient to store time as two numbers, representing hour and minute. Create a class

for storing time and overload the + operator to add two time instances and less than (<) operator

to compare them.

11. Create a class date. Overload the constructor in date to display the date in mm/dd/yyyy,

dd/mm/yyyy and mm/yy

12. Implement a class student. A student has a name and a total quiz score.Supply an appropriate

constructor and methods getName(), addQuiz(int score), getTotalScore() and getAverageScore().

To compute the latter, you also need to store the number of quizzes that the student took.

13. Create a class named employee with data members firstname, last name and member functions:

earnings (Pure Virtual function) and Print (Virtual function).Derive a class called boss from

employee and its data member is weeklysalary and member function: set_weekly_salary.

Calculate and print the earnings appropriately.

14. Implement a class Address. An address has

a house number,

a street,

an optional apartment number,

a city,

a state and a

postal code.

Supply two constructors:

one with an apartment number

and one without.

Supply a print function that prints the address with the street on one line and the city, state,

and

postal code on the next line.

Supply a method compareTo that tests whether one address comes before another when the

addresses are compared by postal code.

15. Implement the ATM transaction application in Java.

16. Implement a Java class called ‗Student‘ with name, Marks of 3 subjects and total marks. Write

another class named ‗calculate‘ that gets the Marks of the student and calculates the total Marks

and displays the result (pass or fail).

17. Illustrate the use of dereferencing operators to access the class members through pointers. To

implement this take a class M, x and y as data members. Take two methods. One is to input the

value of x and other sum. The sum is a friend function and the object of class M is passed

arguments in sum. Sum will access the class members through dereferencing operators.

18. Create a class called Date that includes three pieces of information as instance variables

1. Month (type int)

2. Day (type int)

3. Year (type int).

Your class should have the following methods:

- Constructor that initializes the three instance variables and assumes that the values

provided are correct.

- Provide a set and a get method for each instance variable.

- Provide a method display Date that displays the month, day and year separated by

Forward Slashes (/).

19. Define a class String that could work as a user defined string type. Include constructors that will

enable us to create an uninitialized String s1 and also initialize an object with a string constant at

the time of creation like String s2(―Happy Programming‖). Include a function that adds two

strings to make a third string. Note that the statement s2=s1; will be perfectly reasonable

expression to copy one string into another. Write a complete program to test your class to see

that it does the following tasks:

Creates uninitialized string objects

Creates objects with string constants

Concatenates two strings properly

Displays a desired string object

20. Assume that a bank maintains two kinds of accounts for customers, saving and current. Then

savings account provides compound interest and withdrawal facility. The current account

provides cheque book facility but no interest. Current account holders should also maintain a

minimum balance and if the balance falls below this level, a service charge is imposed. Create

a class account that stores customer name, account number and type of account. Inherit the

account class into cur_acct and sav_acct. Include the necessary member function and

constructors to achieve the following tasks:

Accept deposit from a customer and update the balance.

Display the balance

Compute and deposit interest

Permit withdrawal and update the balance

Check the minimum balance, impose penalty and update the balance

21. Write a program to sort the elements in odd positions in descending order and elements in

Ascending Order

Eg 1:

Input: 13,2 4,15,12,10,5

Output: 13,2,12,10,5,15,4

Eg 2:

Input: 1,2,3,4,5,6,7,8,9

Output: 9,2,7,4,5,6,3,8,1

22. Write a program to give the following output for the given input

Eg 1:

Input: a1b10

Output: abbbbbbbbbb

Eg 2:

Input: b3c6d15

Output: bbbccccccddddddddddddddd

The number varies from 1 to 99.

TRANSFORMS AND PARTIAL DIFFERENTIAL EQUATIONS

1. Find the Half Range cosine series for the function ( ) ( )f x x x in 0 x <π .Deduce

that

4

4 4 4

1 1 1 π+ + +...... =

1 2 3 90.

2. A tightly stretched flexible string has its ends fixed at x=0 and x=l. At time t=0, string is

given a shape defined by f(x) = kx(l-x) where k is a constant , and then released from rest.

Find the displacement of any point x of the string at any time t > 0.

3. If a string of length l is initially at rest in its equilibrium position and each of its points is

given the velocity 3

0 sinx

vl

, 0<x<l determine the displacement function y(x, t).

4. A rod of length 30 cm has its ends ‗A‘ and ‗B‘ kept at 20 C and 80 C respectively

until steady state conditions prevail. The temperature at each end is then reduced to 0 C

and kept so. Find the resulting temperature function u(x, t) taking x=0 at A.

5. A square plate bounded by the lines x =0, y =0,x =20 and y =20. Its faces are insulated,

the temperature along the upper horizontal edge is given by u(x, 20) = x(20-x), 0<x < 20

while the other two edges are kept at 0 C . Find the steady state temperature distribution

in the plate.

V.S.B. ENGINEERING COLLEGE, KARUR

Department of Computer Science and Engineering

Academic Year: 2017-2018 (ODD Semester)

Class/Year/Semester: CSE ‘A’ & ‘B’ /III/V

Assignment Questions

DISCRETE MATHEMATICS

PART-A Answer ALL Questions

1. Define Tautology with an example.

2. Symbolize the following expression ―x is the father of the mother of y‘.

3. What are the negations of the statements ?)2( and )( 22 xxxxx

4. Find the CNF and DNF of P P Q

5. Show that , is not functionally complete.

PART-B Answer ALL Questions

1.Show that the hypothesis, ―It is not sunny this afternoon and it is colder than yesterday‖, ―we will go

swimming only if it is sunny‖, ―If we do not go swimming, then we will take a canoe trip‖ and ―If we take

a canoe trip, then we will be home by sunset‖ lead to the conclusion ―We will be home by sunset‖.

2. Obtain the PDNF and PCNF of the statement ))(())(( RQPRQP .

3. Prove ( ) , ( ) ( ) ( )x P x Q x x P x Q x x R x p x .

4. Using the generating function, solve the difference equation 2 1 1 06 , 1, 2,n n ny y y y y

5. Prove, by mathematical induction, that for all n 1 , 3 2n n is a multiple of 3.

INTERNET PROGRAMMING

1. Write a java program to create a two-dimensional array in whichthe sizes of the second

dimension are unequal.

2. Write a java program to demonstrate the arithmetic operators. It alsoillustrates the difference

between floating-point division and integer division.

3. Mr. Ram wants to meet his friend in New York and want to spend his vacation there. Help him

to select a splendid season to spend his vacation with his friend. Write a program that uses an if-

else-if ladder to determine which season a particular month is in.

4. Write a java program for the following output using continue statement in which the loop

counting j and continues with the next iteration of the loop counting i.

0

0 1

0 2 4

0 3 6 9

0 4 8 12 16

0 5 10 15 20 25

0 6 12 18 24 30 36

0 7 14 21 28 35 42 49

0 8 16 24 32 40 48 56 64

0 9 18 27 36 45 54 63 72 81

5. Write a java program where that class was importing the constant fields into the class name

space as final variables to implement an automated ―decision maker‖.

6. Consider four classes: Q, the queue that you‘re trying to synchronize; Producer, the threaded

object that is producing queue entries; Consumer, the threadedobject that is consuming queue

entries; and PC ,Write a java program to create the tiny class that creates the single Q,Producer,

and Consumer.

7. Just creates a tiny text editor. It creates an array of String objects and thenreads in lines of

text, storing each line in the array. It will read up to 100 lines or until youenter ―stop.‖ It uses a

BufferedReaderto read from the console.

8. What is the relationship between JavaScript and ECMAScript?

9. Use HTML5 to create a document that contains the following text:

Internet and World Wide Web How to Program: Fifth Edition Welcome to the world of Internet

programming. We have provided coverage for many Internet-related topics. Use h1 for the title

(the first line of text), p for text (the second and third lines of text). Insert a horizontal rule

between the h1 element and the p element. Open your new document in a web browser to view

the marked-up document.

10.Create a link to each of the following:

a) The file index.html, located in the files directory.

b) The file index.html, located in the text subdirectory of the files directory.

c) The file index.html, located in the other directory in your parent directory. [Hint:Signifies

parent directory]

d) The President‘s e-mail address ([email protected]).

e) The file named README in the pub directory of ftp.cdrom.com. [Hint: Use ftp://.]

11. Create an HTML5 document containing an ordered list of three items—ice cream, softserve

and frozen yogurt. Each ordered list should contain a nested, unordered list of your

favoriteflavors. Provide three flavors in each unordered list.

12.Categorize each of the following as an element or an attribute:

a) width

b) td

c) th

d) name

e) select

f) type

13.A local university has asked you to create an HTML5 document that allows prospective

collegestudents to provide feedback about their campus visit. Your HTML5 document should

containa form with text fields for a name and e-mail. Provide checkboxes that allow prospective

students toindicate what they liked most about the campus. The checkboxes should include:

campus, students,location, atmosphere, dorm rooms and sports. Also, provide radio buttons that

ask the prospectivestudents how they became interested in the college. Options should include:

friends, television, Internet and other. In addition, provide a text area for additional comments, a

submit button and areset button. Use post to sent the information in the form to

http://www.deitel.com.

14.Create a simple search form using a search input elementin which the user can enter a search

query. Using the Firefox web browser, test the form byentering January and submitting the form.

Then enter a J in the input element to see previous entriesthat started with J—January should be

displayed below the input element. Enter June and submitthe form again. Now enter a J in the

input element to see previous entries that started with J—January and June should be displayed

below the input element. Try this with your own search queriesas well.

15.Create an autocomplete input elementwith an associated datalist that contains the days of the

week.

16.Make a layout template that contains a header and two paragraphs. Use float to line upthe two

paragraphs as columns side by side. Give the header and two paragraphs a border and/or

abackground color so you can see where they are.

17.Add an embedded style sheetto the HTML5 document. The style sheet shouldcontain a rule

that displays h1 elements in blue. In addition, create a rule that displays all links inblue without

underlining them. When the mouse hovers over a link, change the link‘s backgroundcolor to

yellow.

18.Create a text shadow on the phrase "New features in CSS3" with a horizontaloffset of 2px, a

vertical offset of 5px, a blur radius of 6px and a text-shadow color deepskyblue.

19.Create three div elements, each with a width and height of 100px. Onthe first element, create

slightly rounded corners using a border of 3px black and border-radius of10px. On the second

element, use a border of 3px black and increase the border-radius to 50px.On the third, use a

border of 3px black and increase the border-radius to 100px. Make the background-color of each

element a different color of your choosing. Inside each element, display thevalue of the border-

radius in bold text.

20.Create a div element with a width and height of 500px. Create a diagonallinear gradient using

the colors of the rainbow—Red, Orange, Yellow, Green, Blue, Indigo,Violet.

21.Change the format into two columns, add a sub title and an author name and increase the

color and thickness of the column-rule. Add an imageand float the text around the image.

22.Create a transformation program that includes four images. When the user hovers over an

image, the size of the image should increase by 20%.

23.You have a server-side script that cannot handle any ampersands (&) in the form data. Writea

function that converts all ampersands in a form field to "and" when the field loses focus (blur).

24.Write a function that responds to a click anywhere on the page by displaying an alert dialog.

Display the event name if the user held Shift during the mouse click. Display the element

namethat triggered the event if the user held Ctrl during the mouse click.

25. Create anXML document that marks up the nutrition facts for a package of Grandma White‘s

cookies. A package of cookies has a serving size of 1package and the following nutritional value

per serving: 260 calories, 100 fat calories, 11 grams of fat, 2 grams of saturated fat, 5 milligrams

of cholesterol, 210 milligrams of sodium, 36 grams of total carbohydrates, 2 grams of fiber, 15

grams of sugars and 5 grams of protein. Name this documentnutrition.xml. Load the XML

document into your web browser. [Hint: Your markup should contain elements describing the

product name, serving size/amount, calories, sodium, cholesterol, proteins,etc. Mark up each

nutrition fact/ingredient listed above.]

26.Write an XML Schema document (nutrition.xsd)specifying the structure of the XML

document created in previous question.

27.Write an XSL style sheet for your solution to the Q.No.46 that displays the nutritional facts in

an HTML5 table.

28.Describe the differences between client/server interactions in traditional web applicationsand

client/server interactions in Ajax web applications.

29.Describe each of the following terms in the context of Ajax:

a) type-ahead

b) edit-in-place

c) partial page update

d) asynchronous request

e) XMLHttpRequest

f) ―raw‖ Ajax

g) callback function

h) same origin policy

i) Ajax libraries

j) RIA

30.Create an Ajax-enabled version of the feedback form. As the user moves between form fields,

ensure that each field is nonempty. For the e-mail field, ensure that the e-mail address has a valid

format. In addition, create an XML file that contains a list of e-mail addresses that are not

allowed to post feedback. Each time the user enters an e-mail address, check whether it‘s on that

list; if so, display an appropriate message.

31.State the purpose of the following SQL keywords:

a) ASC

b) FROM

c) DESC

d) INSERT

e) LIKE

f) UPDATE

g) SET

h) VALUES

i) ON

32.Write a PHP regular expression pattern that matches a string that satisfies the following

description:

The string must begin with the (uppercase) letter A. Any three alphanumeric characters must

follow. After these, the letter B (uppercase or lowercase) must be repeated one or more times,and

the string must end with two digits.

33.Describe how input from an HTML5 form is retrieved in a PHP program.

34.Write a PHP script named states.php that creates a variable $states with the value "Mississippi

Alabama Texas Massachusetts Kansas". The script should perform the following tasks:

a) Search for a word in $states that ends in xas. Store this word in element 0 of an array named

$states Array.

b) Search for a word in $states that begins with k and ends in s. Perform a case-insensitive

comparison. Store this word in element 1 of $states Array.

c) Search for a word in $states that begins with M and ends in s. Store this element in element 2

of the array.

d) Search for a word in $states that ends in a. Store this word in element 3 of the array.

e) Search for a word in $states at the beginning of the string that starts with M. Store this word in

element 4 of the array.

f) Output the array $states Array to the screen.

35.Modify the Web Time example to contain drop-down lists that allow the user to modify such

Label properties as Back Color, Fore Color and Font-Size. Configure these drop-down lists so

that a post back occurs whenever the user makes a selection—to do this, set theirAutoPost Back

properties to true. When the page reloads, it should reflect the specified changes to the properties

of the Label displaying the time.

36.Add validation to the guestbook application. Use validation controls to ensure that the user

provides a name, a valid e-mail address and a message.

37.Using the techniques you learned, create web-based Address book. Display the address

book‘s contents in a Grid View. Allow the user to search for entries with a particular last name.

38. Discuss the steps to install any open source software in linux mint 18.

39. Add the news item to the news_item table in the publisher database and verify that the

change appears in the home page of the website application.

insert into news_item (id, title, url) values (3, 'ABC

News',http://www.abcnews.com/');

40. Add the publication date (pub Date) field to your database and news feed. Modify both the

website application and the publisher application to include this new information. Note that the

SyndEntry class contains a pub Date field that you can set.

OBJECT ORIENTED ANALYSIS AND DESIGN

1. Explain in detail about the Unified process in object oriented Analysis and

Design? Explain the phases with neat diagrams.

2. (i)Discuss about the Concepts of Component and Deployment Diagram

(ii).Draw component and deployment diagrams for Book bank system.

3. A University conducts examinations and the results are announced. Prepare a report for the

following:

• Print the marks in the register number order semester wise for each department

• Print the Arrear list semester wise.

• Prepare a Rank list for each department.

• Prepare the final aggregate mark list for final year students.

Identify the problem statement and Design and

Explain the classes for each sequence. Draw a detailed flow chart using state chart diagrams.

Design this system using Rational Rose. Draw all the UML diagrams for designing this system.

4. (i).Describe in detail about the Class Diagram.

(ii).What is use case Diagram? Model a use case diagram for a Banking System. Explain the

business rules you are considering. b) Consider the following use Cases that play a role in the

Banking System you have modeled: 1.Deposit 2.Withdraw Model sequence diagrams for the

above two use cases.

5. Write a problem statement for Library Management System. Design the UML Use Case

diagram, Activity diagram ,Class diagram, Sequence diagram, State chart diagram, Package

diagram, Component and Deployment diagram.

6. List the various UML diagram and examine the purpose of each diagram.

7. (i)Describe the UML notation for Class diagram with an example. Explain the concept

of link, association and inheritance.

(ii).Identify the major difference between sequence and collaboration diagram.

8. (i).Summarize with an example,how Interaction Diagram are used to model the

dynamic aspects of asystem.

(ii).Discuss the topic on (i). Aggregation and Composition

(ii).Generalization and Specialization.

(iii).Attributes and Association

9. Illustrate about UML state machine diagram and Modeling (ii).A Library lends books and

magazines to member, who is registered in the system. It also maintains the purchase of new

books and magazines for the Library. A member can reserve a book or magazine that is not

currently available in the library, so that when it is returned or purchased by the library, that

person is notified. The library can easily create, replace and delete information about the books,

members, and reservation in the system. The books transactions are stored in the

database. The fine list while the member returns the book after the due date must be generated.

Analyze and discover the users and actors of this system, and the interactions between them must

be depicted.

10.(i)Describe in Detail about the Sequence Diagrams.

(ii).Discuss in detail about the three types of different perspectives.

(iii).Givethe three ways to apply Unified Modeling Language (UML).

11. (i).What is UML activity diagram?Using an example point out the features of basic

UML activity diagram notation.

(ii).Draw and explain the Sequence and collaboration

diagram for an Online Purchase System.

12. (i).Explain with an example, how use case modeling is used to describe

functional requirements, Identify the actors, scenario and use cases for the example.

(ii).Comparison between Activity and State chart Diagram.

13. (i).Describe UML Package diagram with example.

(ii).When to use Activity and State chart diagram?

14. Illustrate about UML Deployment and Component diagram with an example.

15. Explain GRASP:Designing objects with responsibilities.

16. What isGRASP? Describe the design patterns and principles used in it.

17. Examine the following GRASP patterns:

(i)Creator,

(ii).Information Expert,

(iii)Low coupling,

(iv).High cohesion

18. (i).Explain about Creator and information Expert with example.

(ii).Explain the Benefits of Low coupling and difficulties of Low cohesion.

19. Compare cohesion and coupling with suitable example.

Summarize and state the role and patterns while developing system design.

20. (i).Generalize your idea on Controller pattern with example

(ii).Generalize the concepts of Façade, session and bloated controller.

21. (i).Discuss about Low Coupling and High Cohesion with example.

(ii).Describe the different scenarios of functional cohesion.

22. (i).Givean account on Factory method.

(ii).Discuss the topic on coupling and mention its types.

23. Differentiate Adapter and Bridge pattern .Analyze how willyou design the behavioral pattern.

24. Discuss the topic on

(i).Adapter Pattern

(ii). Observer Pattern

(ii).Factory Pattern

25. (i).Describe about Strategy pattern.

(ii).List out the applications of Factory pattern and mention its Limitations.

26. (i).Examine in detail about Behavioral pattern.

(ii).Describe the concepts of Singleton Pattern.

27. Demonstrate in detail about the various categories of design pattern.

28. (i).Illustrate your views about Structural patterns.

(ii).What is Visibility? Classify the ways of visibility and explain it.

29. (i).What is a POS system? Briefly explain about Inception Phase.

(ii). Comparison between Association and attributes.

30. Prepare a suitable example showing the various relationships used in Use Case and

also give a short note on each relationship.

31. (i).Summarize the Elaboration phase.

(ii).Discuss the difference between elaboration and inception with example.

32. (i).Describe the strategies used to identify the conceptual classes.

(ii).Describe the steps to create a domain model used for representing the

conceptual classes.

33. (i).Illustrate the concepts of Domain model with example.

(ii).Show when to model with Description classes with example.

34. (i).Summarize the steps and explain how to find Use cases with an example.

(ii).Rank the 3 kinds of actors and explain the 3 common Use Case formats.

35. (i).Describe briefly about association and formulate the guidelines to be followed

with UML with suitable example.

(ii).Describe the concepts of Derived attribute.

36. (i).Discuss about attributes with example.

(ii).Discuss the topic on

a).Coceptual subclass

b)Conceptual super class

c) Multiplicity

37. (i).Explain in detail about domain Model refinement.

(ii).What is use cases and Explain in detail about the sample Unified process

Artifacts Relationships.

38. (i).Analyze the guidelines to define a conceptual subclass with suitable example.

(ii). Analyze the guidelines to define a conceptual super class with suitable example.

39. (i).What are the guidelines used to partition the classes in the domain model to

be organized into packages? Explain with suitable examples.

(ii).Describe the benefits of composition.

40. (i).Examine the various sections in the Use Case template

with example.

(ii).List the guidelines to be followed when writing Use case.

41. (i).Describein detail about the Finding Conceptual class

Hierarchies.

(ii).Describe briefly about association classes and association role.

42. (i).Illustrate about aggregation and composition with

Example. Mention the guidelines to be followed.

(ii). Illustrate the topic on

(i). Generalization

(ii). Specialization

(iii). Conceptula class hierarchies.

43. (i).Illustrate the relationship between sequence diagram and Use Case with example.

(ii).Demonstrate the Interaction Diagram notations and explain it?

44. (i).Describe briefly about the logical architecture and UML package diagram.

(ii).Identify the relationship between Domain layer and Domain model.

46. What is Model View separation principle? Examine the motivation for Model

View separation.

(ii).Describe the concepts of Dependency relationship.

47. (i).Briefly discuss about the various collaborations with the layers.

(ii).Discuss in detail about Logical Architecture refinement.

48. (i).Give short notes on inter layer and inter package coupling.

(ii).Discuss on the classic 3 tier architecture.

49. (i).Describe how to adding a new System sequence diagram and contracts?

(ii).Describe the UML notation for class diagram with an example. Explain the concept

of Link, Association and Inheritance.

50. (i).Examine with an example about Interaction diagram.

(ii).Explain with the example, Illustrate how interaction diagram are used to model

the dynamic aspects of the system.

51. With an example explain notations used in sequence diagram for the following:

(i).Object destruction

(ii).Frames

(iii).Conditional message

(iv).Mutually exclusive conditional message

(v).Iterations over a collection

THEORY OF COMPUTATION

1. Consider the following DFA over the binary alphabet:

Q = p, q, r, s, start state p, accepting state p.

With the following transition table:

d (p,0) = s, d (p,1) = p

d (q,0) = p, d (q,1) = s

d (r,0) = r, d (r,1) = q

d (s,0) = q, d (s,1) = r

Write the regular expression recognized by this DFA.

2. Give the DFA accepting the following language over the alphabet 0, 1: the set of strings that

include 011 as a substring.

3. Same question, for the language that consists of strings that interpreted as integers, denote a

value that is a multiple of five. For example, 101, 1010, 1111, 11110, etc, are in the language,

but 110 is not.

4. Suppose we have an automaton A with alphabet S, start state q0, a single accepting state qf,

and a transition function d that is such that for all symbols a in S, d (q0, a) = d (qf, a). Let L (A)

be the language recognized by A. Show that if x is a nonempty string in L(A), then xx, xxx, ...

x^k (x repeated k times) is also in L (A).

5. Describe a non-determininistic automaton that accepts the language over the alphabet 0,1..9

(the decimal digits) whose strings are such that the final digit has appeared before at some

position in the string.

6.The following grammar is not regular but it generates a regular language. Write the regular

expression that describes it:

S -> SSS | a | ab

7.Show that the following grammar is ambiguous, by producing one string in the language that

has two different parse trees: S → aS | aSbS | ǫ

8.Show that the language generated by the grammar: S → aSbS | bSaS | ǫ is the set of all strings

with an equal number of a‘s and b‘s. You might want to prove this by induction over the length

of the string, or by reasoning over the sentential forms that derive a string.

9.The following grammar is not regular but it generates a regular language. Write the regular

expression that describes it: S → SSS | a | ab

10.Describe the language generated by the following grammars (upper-case letters are non-

terminals, lower case terminals): 1. S → SaS | b 2. S → aSb | bSa | ǫ

11.In a graph with an n vertices, a Hamiltonian path is a simple path that includes all vertices and

a Hamiltonian cycle is a simple cycle that includes all vertices. Assuming the NP-completeness

of each of these problems, prove the NP-completeness of the other problem

12.Establish that the problem of testing whether a given TM computes the function f(n) = n 2 ,

for every n ≥ 0, is undecidable.

13.Create a pushdown automaton that accepts the language a2n

bn | n > 0. Show that your PDA

accepts aaaabb and that it rejects aaab.

14.Create a pushdown automaton that accepts the language w ∈ 0,1* | w has twice as many 0s

as 1s.

15.Determine whether the grammar implicitly defined by the following rules is ambiguous.

Prove your answer. If the grammar is ambiguous, determine whether the language it generates is

inherently ambiguous.

S → AB

A → aA

A → abA

A → ε

B → bB

B → abB

B → ε

16.Create a context-free grammar that generates the same language as the regular expression

(ab)*(a

* + (ba)

*).

17.Check whether the following grammars are ambiguous or not?

i) SaAB, AbC|cd, Ccd, Bc|d.

ii) EE+E|E-E|E*E|E/E|(E)|a. iii) SaS|aSbS|ԑ.

18. a) Define Turing Machine. Explain its model with a neat diagram.

b) Explain ID of a Turing Machine.

c) Design a Turing machine which accepts the following languages

i) L= an b n c n | n≥0.

ii) L= a2nb n | n≥1.

iii) accepting palindrome strings over a ,b.

19.Explain the following i) Church‘s Hypothesis ii) Counter Machine.

20.Show that the language defined by banba

m | m > n is not regular.

21.a) Define NP-Complete and NP-Hard Problems.

b) Explain some NP-Complete Problems in detail.

COMPUTER GRAPHICS

1. Write down and explain the midpoint circle drawing algorithm. Assume 10 cm as the radius

and co-ordinate origin as the centre of the circle..

2. Write about random fractals in detail.

3. Calculate the pixel location approximating the first octant of a circle having centre at (4,5) and

radius 4 units using Bresenhams algorithm.

4. Discuss on the various colour models in detail.

5. The reflection along the line y = x is equivalent to the reflection along the X axis followed by

counter clock wise rotation by θ degrees. Find the value of θ.

6. Calculate the new coordinates of a block rotated about x axis by an angle of θ=30 degrees. The

original coordinates of the block are given relative to the global xyz axis system.

A(1,1,2) B(2,1,2) C(2,2,2) D(1,2,2) E(1,1,1) F(2,1,1) G(2,2,1) H(1,2,1).

7. Plot a circle using Bresenham‘s algorithm whose radius is 3 and center coordinates are (0,0).

8. Explain Cohen – Sutherland line clipping taking an example.

9. Translate a square with the following coordinates A(0,0) B(3,0) C(3,3) D(0,3).

10. Derive the expressions for 3D transformations.

11. What will be the transformation matrix for the following rotations about the origin.

(a) Counter clockwise by π. (b) Clockwise by π / 2.

12. Derive the expressions for 2D transformations.

13. How will you rotate a point P(2,-4) by 30 degree.

14. Explain the Bresenham‘s circle drawing algorithm.

15. Prove that two scaling transformations commute S1S2=S2S1.

16. Explain Sutherland – Hodgeman‘s algorithm taking an example.

17. Find the transformation matrix that transforms the square ABCD whose center is at (2,2) is

reduced to half of its size, with center still remaining at(2,2). The coordinates of square ABCD

are A(0,0), B(0,4), C(4,4), D(4,0). Find the coordinates of new square.

18. Explain the following (a) painter‘s algorithm. (b) Scan line algorithm.

19. Find the matrix that represents the rotation of an object by 30 degree about origin? What are

the new coordinates of the point P (2,-4) after the rotation?

20. Outline the Z-Buffer algorithm. List the advantages and disadvantages of the Z-buffer

algorithm.

21. Show that a reflection about the line y=-x is equivalent to a reflection relative to y- axis

followed by a counter clockwise rotation of 90 degree.

22. Explain different types of parallel projection.

23. What is meant by projection? Discuss various types of projection.

24. What are difference between Gouraud and Phonge shading models?

25. A rectangular parallelepiped is given. Its length on x-axis, y-axis and z- axis is 3,2 and 1

respectively. Perform a rotation by an angle -90 degree about x-axis and an angle 90 degree

about y-axis.

V.S.B. ENGINEERING COLLEGE, KARUR

Department of Computer Science and Engineering

Academic Year: 2017-2018 (ODD Semester)

Class/Year/Semester: CSE ‘A’ & ‘B’ /IV/VII

Assignment Questions

CRYPTOGRAPHY AND NETWOKR SECURITY

Question -1 Briefly define a Group, Ring and field. If every element of group G is its own

inverse then group G s commutative .Prove

Question -2 Describe the Fermat and Euler‘s Theorem? What is Euler totient and describe also

its limitations.

Question –3 What is elliptic curve cryptography? Are elliptic curve cryptosystem widely used

and how its compared with other cryptosystem?

Question -4 What is public key cryptography ? What is the role of the session key in public key

scheme?

Question -5 Write the difference between public key, private Key, secret, shared key.

Question -6 Explain RSA algorithm and find the private key of a user, if his public key e=21 and

n=3599? In RSA scheme is an official standard today?

Question -7 In a Diffie- Hellman key exchange algorithm, let the prime number be 353 and one

of its primitive root be 3 and let A and B select their secret key. XA=97and XB=233.Compute the

public key of A and B and common secret key.

Question -8 What the Chinese Remainder theorem says?

Question -9 Find the all primitive root of number ‗25‘.

Question -10 Describe the security of RSA.

Question -11 What is key management?

Question -12 Find 3201

mod 11.

Question -13 Describe primality testing .Test whether 221 is prime or not by using this test.

Question -14 Explain Euclid Algorithm find gcd of 1970 and 1066 by using Euclid Algorithm.

Is the two number are relatively prime or not ?

Question -15 Use chinese remainder theorem to solve the simultaneous congruence. x≡1 mod p

for all p ε 2,3,5,7.

Question -16 Define primitive root and find all primitive root of following. (a)25

(b) 19 (c) 15

Question 17: What is birthday attack?

Question 18: What basic arithmetical and logical functions are used in MD-5? Explain SHA-1.

Question 19: Differentiate…..

(A) Hash code and message authentication code (MAC).

(B) Weak collision resistance and strong collision resistance.

Question 20: Compare the security of Hash function and Message Authentication code against

Brute force attack and cryptanalysis.

Question 21: Is it possible to use a hash function to construct a block cipher with a structure

similar to DES. Because a Hash Function is one –way and a block cipher must to reversible (to

decrypt) how is possible.

Question 22: What is difference between a message authentication code and a one – way hash

function? Describe the role of a compression function in a Hash function.

Question 23: When a combination of symmetric encryption and an error control code is used

for message authentication in what order must the two functions be performed.

Question 24: Explain Digital signature standard, its approach and algorithm.

Question 25: What is the difference between Direct and Arbitrated digital signature?

Question 26: What Requirement was defined for Kerberos? New the various servers of Kerberos

and explain the duties of each server. Write the sequence of message exchanges that happens.

Question 27: Why is the segmentation and reassembly function in PGP needed? How does PGP

use the concept of trust?

Question 28: Give the formet of X.509 certificate showing he important element of the

certificate .Explain the format.

Question 29: What do you understand by Directory Authentication service? Explain with

suitable example.

Question 30: What is S/MIME? Why it is used? Explain main function of S/MIME provide?

Question 31: What is the major security aspect in the secure electronic mail system?

Question 32: What entities constitute a full service Kerberos environment?

Question 33: What is PCKs?

Question 34: What is secure ID? What is S/WAN?

Question 35: What are ANSI X9 Standards?

GRID AND CLOUD COMPUTING

Question 1 Briefly define the following basic techniques and technologies that represent recent related advances in computer architecture, parallel processing, distributed computing, Internet technology, and information services:

a. High-performance computing system

b. High-throughput computing system

c. Peer-to-peer network

d. Computer cluster versus computational grid

e. Service-oriented architecture (SOA)

f. Pervasive computing versus Internet computing

g. Virtual machine versus virtual infrastructure

h. Public cloud versus private cloud Question 2 An increasing number of organizations in industry and business adopt cloud systems. Answer

the following questions regarding cloud computing:

a. List and describe the main characteristics of cloud computing systems.

b. Discuss key enabling technologies in cloud computing systems.

c. Discuss different ways for cloud service providers to maximize their revenues. Question 3 Compare the similarities and differences between traditional computing clusters/grids and the

computing clouds launched in recent years. Consider all technical and economic aspects as listed below.

Answer the following questions against real example systems or platforms built in recent years. Also

discuss possible convergence of the two computing paradigms in the future.

a. Hardware, software, and networking support

b. Resource allocation and provisioning methods

c. Infrastructure management and protection

d. Support of utility computing services

e. Operational and cost models applied

Question 4 Characterize the following three cloud computing models:

a. What is an IaaS cloud? Give one example system. b. What is a PaaS cloud? Give one example system.

c. What is a SaaS cloud? Give one example system. Question 5 Briefly explain each of the following cloud computing services. Identify two cloud providers company name in each service category.

a. Application cloud services b. Platform cloud services c.

b. Compute and storage services

c. Collocation cloud services

d. Network cloud services

GRAPH THEORY AND APPLICATIONS

PART-AAnswer ALL Questions (5× 𝟐 = 𝟏𝟎)

1. Find the chromatic polynomial of the complete graph 𝐾4 of 4 vertices.

2. Give an example of digraph which is strongly connected.

3. Let 𝐴 = 1,2,3,4 and 𝑅 = (1,1)(1,2)(2,1)(2,2)(2,3)(2,4)(3,4)(4,1) be a binary relation.

Draw the digraph of𝑅.

4. In how many different ways one can answer all the true or false test consisting of 4 question?

5.How many different 8-bit strings are there that end with 0111?

PART-B Answer ALL Questions (5× 𝟖 = 𝟒𝟎)

1. What are the applications of Euler graphs? Explain briefly.

2. Show that the vertices of a planar graph with less than 30 edges is 4-colourable.

3. From a club consisting of 6 men and 7 women , in how many ways can be select a

committee of (a) 3 men and 4 women ? (b) 4 persons which has at least one women?

(c) 4 persons which has at most one man? (d) 4 persons that has persons of both sexes?

(e) 4 persons so that two specific members are not included?

4. How many permutations can be made out of the letters of the word ―COMPUTER‖?

How many of these (i) Begin with C (ii) End with R (iii) Begin with C and end with R

(iv) C and R occupy the end places.

5. Find the term independent of 𝑥 in the expansion of 𝑥2 +1

𝑥

12

.

RESOURCE MANAGEMENT TECHNIQUES

PART-A Answer ALL Questions (5x2=10 Marks)

1. List any four application of operation Research in management field.

2. List the applications of operations research in marketing.

3. Distinguish between feasible solution and optimal solution.

4. What are the limitations of LPP?

5. What is mixed integer programming problem?

PART-B Answer ALL Questions (16+16+8=40 Marks)

6. Solve the following linear programming model by simplex method:

Maximize: 𝑍 = 30𝑥1 + 40𝑥2 + 35𝑥3

Subject to:3𝑥1 + 4𝑥2 + 2𝑥3 ≤ 90 2𝑥1 + 𝑥2 + 2𝑥3 ≤ 54

𝑥1 + 3𝑥2 + 2𝑥3 ≤ 93; 𝑥1, 𝑥2, 𝑥3 ≥ 0

7. Solve the following LPP by Big-M method:

Minimize 𝑍 = 5𝑥1 + 6𝑥2

Subject to the constraints 2𝑥1 + 5𝑥2 ≥ 1500

3𝑥1 + 𝑥2 ≥ 1200 𝑥1, 𝑥2 ≥ 0.

8.A transportation problem involves the following cost in rupees, supply and demand To 1 2 3 4 supply

1 500 750 300 450 12

From 2 650 800 400 600 17

3 400 700 500 550 11

Demand 10 10 10 10

Find the optimal solution.

SERVICE ORIENTED ARCHITECTURE

Questions:

1. Explain SOA support in .NET.

2. Draw and Explain architecture of web service.

3. Elucidate common language Runtime.

4. Describe java API for XML Regiters (JAXR).

INFORMATION RETRIEVAL

1. Apache License.

2. BSD License.

3. GNU General Public License.

4. GNU Library.

5. MIT License.

6. Mozilla Public License.

7. Common Development and Distribution License.

8. Eclipse Public License.