Tuesday, August 7, 2012

DBMS Lab - Ex 4 - Number , Character and Date Functions

Exercise 4 - DATABASE MANAGEMENT SYSTEMS LAB

4 a - NUMBER FUNCTONS
Ex 4 a NUMBER FUNCTIONS

4 b - CHARACTER FUNCTION
Ex 4 b CHARECTER FUNCTION

4 c - DATE FUNCTION  
Ex 4 c DATE FUNCTION

DBMS Lab - Ex 3b - Creating Views


Exercise 3b - DATABASE MANAGEMENT SYSTEMS LAB - Creating Views

DBMS Lab - Ex 3a - Aggregate Functions

Exercise 3a - DATABASE MANAGEMENT SYSTEMS LAB - Aggregate Functions

Ex 3 Aggregate Functions

DBMS Lab - Ex 2 - Sub Queries

Exercise 2 - DATABASE MANAGEMENT SYSTEMS LAB - Sub Queries
Ex 2

DBMS Lab - Ex 1 - DDL & DML Commands

Exercise 1 - DATABASE MANAGEMENT SYSTEMS LAB -

Ex 1

Tuesday, July 3, 2012

PSQT - Cycle Test 2


Cycle Test 2
PSQT

PART - A
1. Define Poisson Distribution
2. If X is a Binomial Variable with expected value 6 and variance 2.4, find P(X=5)
3. If X and Y are independent Poission variate s.t P(X=1)=P(X=2) and P(Y=2)=P(Y=3). Find Variance of X-2Y
4. If X is a Geometeric variate taking values 1,2,...., find P(X is odd)
5. Derieve the mean and variance of Negative Binomail Distribution
6. Tabulate teh Expectations for both Discrete nad Continuous Random Variable
7. Define CoVariance. If X and Y are independent RVs, PT E(XY)=E(X).E(Y)
8. What is Gamma Distrinution? Generate its Formula.
9. Show that for a uniform distrbution in (a,b) then f(x)={1/b-a,a<x<b}
10. Find the mean and variance fo the continuous random variable 'X', if it has the density function f(x={2(x-1),1<x<2}

PART - B
11. Determine the Moment generating function of Binomial and Poisson distribution in discrete distribution
12. A random variable Y is defined as Cos(PI x), where X is a uniform PDF over (-1/2,1/2). Find mean and SD
13. Generate the MGF, Mean and Variance of Exponential Distribution Distribution. Give one example for each.
14. Give the PDF of a cantinuous Random Variable 'X' as follows f(x)=6x(1-x), 0<x<1. Find the CDF for 'X'

Tags : cycle test, cycle test 1, 2012, probability statistics and queuing theory, sem 4

OOAD - Cycle test 2


Cycle test - 2
OOAD

PART - A
1. Differntiate between Patterns and Frameworks
2. Write short note on UA proposed Repository
3. What are the three steps in CRC process?
4. Define aggregation. What are the major properties of a-part-of relation?
5. What 'extends' association is used?

PART - B
6. Describe patterns and various pattern templates
7. What are the elements of a class diagram? Explain with examples.
8. Explain about super-sub class realtionships.
9. What are the guidelines for finding uses cases?

PART - C
10. Explain the Booch and the Rumbaugh methodology in detail
11. Discuss about the Noun Phrase approach for identifying classes woth an example
12. Explain in detail about UML sequence and collaboration diagrams

Tags : cycle test, cycle test 2, 2012, ooad, Object Oriented Analyasi and Design, sem 4

Design and Analysis of Algorithms - Cycle Test 2


CYCLE TEST - 2
Design and Analysis of Algorithms

1. Write the general paln for analysing the efficiency for recusive algorithms
2. Write a non-recurcive algorithm for finding the number of Binary digits for a positive decimal integer.
3. Define Brute Force approach? Give any two advantages of Brute force technique
4. Mention the non-recurcive algorithm for matrix multiplication?
5. Whaat is the difference between quicksort and mergesort?

6. Write an algorithm for a given numbers 'n' to generate the 'n'th  number of Fibonacci sequence.
7. (a) Design a recurcive algorithm for computing 2^n for any non-negative integer 'n' which is based on formula 2^n = 2^n-1 + 2^n-1
   (b) Settup a recurrence relation for the Towers of Hanoi puzzle and solve it.
8. Write a Brute force algorithm for String matching in a given text
9. What is the general plan for Divide and Conquer technique and explain the quicksort algorithm using this technique
10. Write the general paln for analyzing the efficiency of non-recurcive algorithms and illustrate it with an algorithm od element uniqueness problem
11. (a) Design a brute force algorithm for computing the bubbel sort
    (b) Sort the list E,X,A,M,P,L,E in alphabetical order by bubble sort

Tags : cycle test, cycle test 2, 2012, algorithm, Design and Analysis of Algorithm, sem 4

PSQT - Cycle Test 1


Cycle Test - 1
PSQT

PART - A
1. Define Sample space and Event. Give one exmaple for each.
2. Define Probability. How to find the probability of an event.
3. Find the probability of throwing 7 with two dice.
4. List out the Axioms involved in Probability
5. Compare Dependent and Independent Events with suitable Example.
6. What is a formula to find the conditional probability and Theorem of total probability.
7. If A is the subset fo B, then P(A/B)>P(A)
8. What is a random variable and mention their types
9. State the addition law of probability
10. If from a pack of cards of a single card is drawn what is the probability that is either a spade or a king

PART - B
11. State and prove Baye's Theorem. Give your own experiment to perform the Baye's rule
12. If two dice are thrown, what is the probability that the sum is (i)greater than 8,(ii)neither 7 or 11
13. A bag contains 5 white and 3 black balls. Two balls are drawn at the random one after the other wthout replacemnet. Find the probability that both balls are drawn black.
14. State and Prove Conditional Probability with Example

Tags : cycle test, cycle test 1, 2012, probablility statistics and queuing theory, sem 4

OOAD - Cycle test 1


Cycle Test - 1
OOAD

PART - A
1. What are the two orthoganal views of software?
2. How is software verification differ from validation?
3. What is association? Give one example.
4. What is prototyping? Mention its types.
5. What is RAD?

PART - B
6. Explain about encapsulation and information hiding
7. How to build a high-quality software?
8. Expalin about waterfall approach
9. Define: i) Static and Dynamic Binding ii) Object persistence iii) Meta-classes

PART - C
10. Decribe the software developement process
11. Discuss the significance of object orientation and justify the need to shift to this paradigm

Tags : cycle test, cycle test 1, 2012, ooad, Object Oriented Analyasi and Design, sem 4

Friday, May 11, 2012

Java Programming - Semester Paper


School of Computer Science, Engineering and Applications
BHARTHIDASAN UNIVERSITY
APRIL 2011 - IVth Semester
JAVA PROGRAMMING
Date fo Exam : 11/05/12
INSTRUCTIONS :
Part - A : Answer all Questions
Part - B : Answer all Questions, either (a) or (b), one only
Part - C : Answer any Three only
PART - A
1. What are the uses of Break Statement in Java ?
2. What is Instance variable hiding ?
3. List the restrictions to be considered when methods are declared as static ?
4. What is the advantage od Dynamic method Dispach ?
5. give the general form of an Interface ?
6. What are the four categories of visibility fo rclass members in Java ?
7. Write the teo important methods of the Throwable class ?
8. What is the use of Finally block ?
9. Define Event Listeners .
10. What is an adapter class
PART - B
11. (a) Explain with an example the function of the Switch statement [OR]
11. (b) Explain the Parameterized Constructors.
12. (a) How final is used to prevent overriding and overloading [OR]
12. (b) Discuss the three cases in while defining Methods for a Subclass
13. (a) Explain in detail about Package hierarchy  [OR]
13. (b) Explain in detail about Importing Packages
14. (a) How do you create your own Exception Subclasses. Explain. [OR]
14. (b) Explain the Life Cycle of a Thread
15. (a) Write an applet program to Display your Profile with different font and color settings [OR]
15. (b) Expalin the Structure of an applet
PART - C
16. Define Method. How Method overloading is implemented in Java. Explain with an example
17. Distinguish Overriding and Overloading with an Example
18. Define Interface. How do you Create and Implement Interface. Explain with example
19. Write a Java Program to demonstrate Exception handling
20. What is an Applet Tag. How do you define and Pass parameter tag in Applets. Explain       

TAGS : Sem 4, Semester Paper, Semester Question Paper, April 2012, Java, Java Programming

Object Oriented Analysis and Design - Semester Paper


School of Computer Science, Engineering and Applications
BHARTHIDASAN UNIVERSITY
APRIL 2011 - IVth Semester
OBJECT ORIENTED ANALYSIS AND DESIGN
Date fo Exam : 09/05/12
INSTRUCTIONS :
Part - A : Answer all Questions
Part - B : Answer all Questions, either (a) or (b), one only
Part - C : Answer any Three only
PART - A
1. Define the term 80-20 rule
2. Create the class hirearchy to organizt the following vehicle classes : land, water, air, car, cycle, row boat, ship, aero plane and gas balloon
3. Define the Micro and Micro developement process
4. Mention the guidelines for selecting classes in the application
5. Analysis is a diffucult activity. Explain
6. Mention the different typed os associations that exist among the use cases
7. Differentiate betweetn public and private protocols
8. List the ways to categorize data based on their lifetime
9. Differentiate Run-time errors and ligic errors
10. Define the term usability
PART - B
11. (a) Discuss in detail about object behaviour and methods. [OR]
11. (b) Write in detail about Component based Developement
12. (a) Write in deatil about the patterens and its types. [OR]
12. (b) Generate a colloboration diagram for establishing a telephone call with the sampling numbering
13. (a) Explain the guidelines for finding the Use Cases. [OR]
13. (b) Write in deatil about classification theory
14. (a) Discuss about Object oriented design axioms. [OR]
14. (b) Write in deatil about database models
15. (a) Write in detail about Meyers debugging Principle. [OR]
15. (b) Give a detailed note about user Satisfaction testing
PART - C
16. Explain in detail the transformations in object-oriented software developemenet life cycle giving suitable examples
17. Draw and explain the follwing diagrams for Automatic Teller Machine Operations i) Use Case Diagram ii) Activity Diagram
18. Explain hte noun phrase approach to identify classes with an example
19. Explain in detail the steps involved in the creation of access layer classes with the examples
20. Explain in detail about Test Plan wiht an example

TAGS : Sem 4, Semester Paper, Semester Question Paper, April 2012, ooad, Object Oriented Analysis and Design

Probability Statistics and Queuing Theory - Semester Paper


School of Computer Science, Engineering and Applications
BHARTHIDASAN UNIVERSITY
APRIL 2011 - IVth Semester
PROBABILITY, STATISTICS & QUEUEING THEORY
Date fo Exam : 09/05/12
INSTRUCTIONS :
Part - A : Answer all Questions
Part - B : Answer all Questions, either (a) or (b), one only
Part - C : Answer any Three only
PART - A
1. What is the probability that a Leap year selected at random contain 53 Saturadys or 53 Sundays ?
2. State the conditions to be satisfied by probabilty density function
3. If X is Binomially distributed with n = 6 such that 9P(x=4) = P(x=2). Find the mean and variance.
4. State any two properties of normal Distribution
5. State any two Properties of Correlation Coeefficent
6. From the lines of Regression 3x+2y=26 and 6x+y=31, determine the correlation coefficient
7. What is Type I Error and Type II Error
8. What is meant by critical region in hypothesis testing ?
9. What are transient and steady states in Queuing System
10. Give the forumula for the average number of Customers in the system and in the Queue for M/M/1 Model
PART - B
11. (a) An electronic assembly consists of two subsystems A and B. Given that P(A fails) = 0.15 , P(A & B fails) = 0.15 and P(B alone fails) = 0.15. Find i) P(A alone fails) ii) P(A fails / B has failed) [OR]
11. (b) Find the value K and mena value of the Random variables X, if its PDF is f(x) = Kx(1-x), 0=<x<=1
12. (a) i) State the Conditons for the Binomial distribution becomes Poisson bistribution
            ii) Write the PMF of poission distribution
            iii) State any two example situations for Poission [OR]
12. (b) Derieve the Momnet generating function of normal Distributions
13. (a) For the following calculate the rank correalation coefficient after assigining ranks
           X : 78 36 98 25 75 82 90 62 65 39
           Y : 84 51 91 60 68 62 86 58 63 47  [OR]
13. (b) Out of 1660 candidates who appeared for a competitive examination, 422 were successful. Out of these 256 had attended a coaching class and 150 of them came out successful . Find whether the Coaching was effictive as regards the success in the competitive examination 
14. (a) Describe the complete procedure for testing the hypothesis [OR]
14. (b) In a random sample 500, the mean is found to be 20. In another independent sample pf the size 400 the mean is 15. Could the samples have  been drawn from the same population with SD as 4 ?
15. (a) What are the characteristics of Queuing system [OR]
15. (b) Customers arrive at one man barber shop according to Poission process with the mean inter - arrival pattern of 12 minutes. Customers spend an average of 10 minutes with the barber's chair.
      i) What is the expected number of customers in the Barber shop?
      ii) What is the average time the customer spends in the queue ?
PART - C
16. If the Probability Mass Function of a random variable X is given by P(X=r) = K(r)cube where r = 1,2,3and4. Find the K, Mean, Variance and Distribution Function.
17. (a) Derive the Moment Generating function of Poission Distribution
      (b) In the distribution exactly normal 7% of the items are under 35 and 89% are under 63. What are the mean and standard deviation of the distribution
18. Determine the two lines of Regression and the Correlation Coeeficeint from the following data. Estimate the value of Y when X = 38 and X when Y = 18
      X : 22         26        29        30        31        31        34        35
      Y:  20         20        21        29        27        24        27        31 
19. Two independent samples of size 8 and 7 contaion the following values:
     S1: 19         17        15        21        16        18        16        14
     S2: 15         14        15        19        15        18        16        -
Is the difference between the sample means significant ?
20. A Self Service store employs one cashier at its counter. Nine Customers arrive on an average every 5 minutes while the cashier can serve ten customers in 5 minutes. Assembling Poission Arrival Rate and the Exponential Service Rate, Find :
(i) Average number of customers in the system
(ii) Average number of customers in the queue
(iii) Average tiem a customer spends in a system
(iv) Average time a customer waits before being served

TAGS : Sem 4, Semester Paper, Semester Question Paper, April 2012, Probability Statistics and Queuing Theory

Deign and Analysis of Algorithms - Semester Paper


School of Computer Science, Engineering and Applications
BHARTHIDASAN UNIVERSITY
APRIL 2011 - IVth Semester
DESIGN AND ANALYSIS OF ALGORITHMS
Date fo Exam : 04/05/12
INSTRUCTIONS :
Part - A : Answer all Questions
Part - B : Answer all Questions, either (a) or (b), one only
Part - C : Answer any Three only
PART - A
1. Define Order of notation.
2. What is the space Complexity for the Quick Sort ?
3. How will you analyze efficiency of Recurcive Algorithms ?
4. What is meant by Emphirical Analysis of an Algorithm ?
5. What are the merits and demerits of Merrge sort ?
6. What is the general Procedure od Dynamic Programming ?
7. What is the complexity of Floyd's Algorithm ?
8. Sate is Backtracking always produces optimal solution .
9. What are the additional items required for Branch and Bound compared to Backtracking technique ?
10. Differentiate between Backtracking and Branch and Bound techniques
PART - B
11. (a) Discuss the fundamentals of algorithmic probelm solving Algorithm [OR]
11. (b) Write a note on Asymptotic Notations.
12. (a) Explain the Mathematical Analysis of recurcive algorithm for finding the factorial of the given number [OR]
12. (b)  Explain the Mathematical Analysis of Nnn-Recurcive algorithm for finding the Fibonacci Numbers
13. (a) Write the procedure for Binary Search and Expalin with an example [OR]
13. (b) Explain any one Representation of Graph with Example
14. (a) Fine the minimum Spanning tree using Prim's Algorithm with your own Example [OR]
14. (b) Sort the numbers with Heap Sort : 23,12,54,45,78,17,90,57,89,67
15. (a) Draw a portion of the State space tree and perform backtracking search for n = 4 in the n - Queen Problem. [OR]
15. (b) Write the procedure for the sum of Subset problem
PART - C
16. Discuss algorith design and analysis process
17. Discuss the general plan for the emphirical analysis of the algorithm Efficiency
18. A) Explain the Merge Sort with the Algorithm and Complexities
      B) Sort the numbers using merge sort : 8,3,2,9,7,1,5,4
19. Illustrate Single Source shortest path problem, write and expalin Dijkstra's algorithm with example
20. Solve the instance of the Knapsack Problem by the Branch and Bound algorithm - Knapsack Weight W = 10
Item Weight Value Value /Weight
1       4           $40     10 
2       7           $42     6
3       5           $25     5
4       3           $12     4

TAGS : Sem 4, Semester Paper, Semester Question Paper, April 2012, Deign and Analysis of Algorithms

COMPUTER ORGANIZATION AND ARCHITECTURE - Semester Paper


School of Computer Science, Engineering and Applications
BHARTHIDASAN UNIVERSITY
APRIL 2011 - IVth Semester
COMPUTER ORGANIZATION AND ARCHITECTURE
Date fo Exam : 02/05/12
INSTRUCTIONS :
Part - A : Answer all Questions
Part - B : Answer all Questions, either (a) or (b), one only
Part - C : Answer any Three only
PART - A
1. What is a stack pointer
2.  What are the four Commonly Used Flags
3. What are the two techniques for speeding up the multiplication operation
4. What is chopping
5. What is pipelining
6. What is superscalar execution
7. Define the cache memory. Mention its use
8. Define Winchester techonology? Give its Advantages
9. What is Known as DMA and DMA Controller
10. Give applications and use of SCSI bus
PART - B
11. (a) Write the difference between RISC & CISC. [OR]
11. (b) What are stacks and queues? Explain its use and give its difference
12. (a) Explain the representaions of floating point numbers in detail [OR]
12. (b) Discuss the Algorithm of nonrestoring division
13. (a) Explain pipelining concept and its various hazards [OR]
13. (b) Explain the multiple bus organization in detail.
14. (a) Explain in detail semiconductor RAM memories. [OR]
14. (b) What is the different Secondary storage devices? Eloborate on Magnetic Hard Discks
15. (a) Explain the Synchronus and Asynchronous bus. [OR]
15. (b) Explain the function of DMA and usage of system bus in DMA
PART - C
16. Describe all the Addressing mode in detail
17. State the Booths Algorithm and expalin with example
18. Give the organization of typical hardwired control unit and explain the functions performed by various blocks
19. Expalin how the virtual address is converted into real address in a paged virtual memory system
20. What are the different types of interrupts? Expalin in Detail the how interrupts are handled

TAGS : Sem 4, Semester Paper, Semester Question Paper, April 2012, Computer Organization and Architecture

Wednesday, April 25, 2012

Monday, April 23, 2012

Message Queues


#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>

struct my_msgbuf {
long mtype;
char mtext[200];
};

int main(void)
{
struct my_msgbuf buf;
int msqid;
key_t key;

if ((key = ftok("unix3.c", 'B')) == -1) {
perror("ftok");
exit(1);
}

if ((msqid = msgget(key, 0644 | IPC_CREAT)) == -1) {
perror("msgget");
exit(1);
}
printf("Enter lines of text, ^D to quit:\n");

buf.mtype = 1;

while(fgets(buf.mtext, sizeof buf.mtext, stdin) != NULL) {
int len = strlen(buf.mtext);

if (buf.mtext[len-1] == '\n') buf.mtext[len-1] = '\0';

if (msgsnd(msqid, &buf, len+1, 0) == -1)
perror("msgsnd");
}

if (msgctl(msqid, IPC_RMID, NULL) == -1) {
perror("msgctl");
exit(1);
}

return 0;
}