Friday 23 October 2020

Java Interview Questions for Experienced

1. What is the SOLID principle?

2. What all design patterns used in your project?

3.Explain about the singleton design pattern?

4.How would you create a singleton class in java?

5.How HashMap works internally?

6.Can you create your own HashMap class? How can you create it?

7.What type of exceptions you have encountered? how have to handle it?

8. Create a custom Exception class? Create a custom class?

9. Can we catch Runtime exception? why don't we catch runtime exception or unchecked exceptions?

10.write an Immutable class? How it will behave when it has data reference? 

11.What is deep copy and shallow copy?

12. What is multithreading?

13. How do we create a thread class?

14. what are the benefits of multi-threading?

15. Thread Priority and multi-threading pools?

Hi this is Hussain Sheriff .A 

M.Sc(Operations Research and Computer Applications)
National Institute of Technology
Trichy-15

sheriffnit@gmail.com

Wednesday 9 May 2012

DATA BASE MANAGEMENT SYSTEMS


CODE: CA768
DATA BASE MANAGEMENT SYSTEMS
v UNIT-I:

Explain the characteristic approach of database?
Explain the actors in DB scene?
Explain the advantages of using DBMS?
Discuss the various data models?
Difference between file processing and DBMS?
Explain the Three-schema Architecture?
Describe Data Independence & DBMS languages?
Define: Data Abstraction, Data Independence, DBA, Database Languages.
Explain the Architecture of DBMS with their components in detail.
List any 4 important steps that are useful for setting up a database for a particular enterprise.
Compare FMS with DBMS in detail w.r.t. their features, merits and demerits.
List down the features of various data models with examples.
Write a note on the actors on the scene of a DBMS.
What are the duties and responsibilities of a D.B.A?
What are the unfavorable situations for the use of DBMS for which the file system is preferred?
What are logical and physical independences of a DBMS schema?
Define DBMS. Explain the advantages of using database system.
What is meant by Data Abstraction? Explain the three levels of it. Discuss the functions of Database Administrator.
Define the terms: Instance, Schema, Data Independence, Data Dictionary and DDL.
Briefly discuss the various Data Models with their merits and demerits.
Describe three-schema architecture. How does it help in achieving data independence?
What are the different components of DBMS? Explain them in detail.
How do we classify DBMS?
Define or Explain the following:
b) Federated DBMS
c) Legacy DBMS
d) Logical and Physical Data independencies
e) Complete set of Relational algebra operators.
What are the constraints that are applied to RDBMS?
What are the advantages of a DBMS?

Explain the various interfaces to a DBMS an enumerate the people interacting with a DBMS.
Explain how Databases have helped to increase the value of information to organizations?
Explain: Data Independence, Schema, DBMS interfaces, Actors in the DB Scene.

v UNIT-II:

Explain the types of attributes in ER-models with example?
Define: Entity type; Entity sets; Keys; value sets; Relationship types & sets, instances, Degree; cardinality ratio; Total participation; Role name;
Explain weak entity type?
Define: Relation DB; degree & order of a relation; domain; attributes; tuples; relation schema; cardinality of a relation.
Explain various types of keys in a relation?
Explain various unary relational operations with example?
Explain relational algebra operations from set theory?
Explain various join operations?
Writing queries using relational operations?
Describe the various symbols used in Data Flow Diagram and ER diagram.
Define:
a) Relationship instance
b) Composite attribute
c) Domain Value Set
d) Multivalued attribute
e) Derived attribute
Give examples for aggregation and inheritance in E-R diagrams.
Construct the ER diagram for the following and explain: A university registrars

Office maintains data about the entities-courses, course offerings, students and
Instructors. Assume suitable attributes, relationships between entities and any other constraints.
Explain the various operations defined in Relational Algebra with examples.
Describe the two alternatives for specifying structural constraints on relationship types. What are the advantages and disadvantages of each?
When is the concept of weak entity useful in data modeling? Define the terms owner entity type, weak entity type, identifying relationship type and partial key.
What are the different types of attributes used in the E-R model? Explain with example?
Describe the various types of Mapping Cardinalities.
Distinguish between a Weak and a Strong Entity set.
List the fundamental operations of the Relational Algebra and the purpose of each with example.
Discuss the various types of Join operations.

Describe the major problems with processing update operations expressed in terms of views.
Explain various Relational Algebra Operations with examples.
Explain i) Extended E-R diagram and ii) Various types of Keys with examples.
Define owner entity type, weak entity type, identifying relationship type and recursive relationship type with examples.
a) The degree of a relation is

b) Relational model allows un-normalized relations.(true/false)
c) What is the difference between a key and a super key?
d) Discuss the integrity constraints of relational model.
e) Consider the following relation schema:
Salesperson ( ssn, name, start-year, dept-no)
Trip (ssn, from_city, to_city, departure_date, return_date, trip_id)
Expense (trip_id, account#, amount)
Write relational algebra expressions for the following queries.
i) Give the details for trips that exceeded $2000 in expense.
ii) Print the SSN of salesperson who took trips to „Honolulu.
iii) Print the total trip expenses incurred by the salesperson with ssn=234-90.
Draw the ER diagram for the given Employee Dept data base.
Explain the various join operations with examples

v UNIT-III:

Discuss the four guidelines (or) informal measures of quality for relation schema?
Define functional dependency and discuss the inference rules for functional dependencies?
What is Normalisation? What is the need? Explain the various types of Normal forms with examples.
Explain superkey, key, candidate key, prime attribute and non prime attribute.
Define:
a) Anomalies
b) Spurious Tuples
c) Fully Functional Dependent
d) Lossless join
e) Multivalued Dependency
Consider the Relation Student with attributes Student_Email, Name, Address,

Course, Course Faculty, Skill_id, Skill_name, Skill_date and Skill_Level.
a) Identify all functional dependencies among attributes. If you decide that the information given is not sufficient for determining all functional dependencies, make whatever assumptions you think are necessary but state them clearly.
b) Define first, second and third normal forms.
c) Decompose the above example into 3NF, taking care to identify primary and foreign keys in all relations.

What is normalization? Explain the various normal forms with examples.
Explain :
a) Different types of Joins.
b) Any 2 types of Indexing Mechanisms.
Explain Second and Third Normal forms in detail with examples
Define the following terms:

Domain, attribute, n-tuple, relation schema, relation instance, degree of a
Relation, relational database schema, relational data base instance.
How are outer join operations different from the JOIN operations? How is outer UNION operation different from the UNION?
Explain the terms: Super Key, Candidate Key and Foreign Key.
Define BCNF, 4NF and PJNF. How does PJNF differ from 4NF? Explain with example.
Consider the relation R which has attributes that hold schedules of courses and sections at a university.

R={CourseNo, SecNo, OfferingDept, Credit-Hours, CourseLevel, InstructorSSN, Semester, Year, Days-Hours, RoomNo, No of Students}.
Suppose that the following functional depencies hold on R.
{Course No}-{OfferingDept, Credit-Hours, CourseLevel}
{CourseNo, SecNo, Semester,Year}-{Days_Hours,RoomNo, No of Students InstructorSSN}
{RoomNo, Days_Hours, Semester,Year}-{InstructorSSN,CourseNo, SecNo,}
Try to determine which sets of attributes form keys of R. How would you normalize this relation?
What is Normalisation? What is need? Explain the various types of Normal forms with examples.
Briefly outline the basic algorithms for executing Query Operations.
Discuss „Using Heuristics in Query Optimization.
Consider the relation R, having the attributes that hold schedules of courses and

Sections in a University; R={CourseNo, SecNo, OfferingDept, CreditHours, CourseLevel, InstructorSSN, Semester,Year,Days_hour,Roomno,Noofstudents}
i) Provide the Funcitonal Dependencies.
ii) Provide second and third normal forms.

iii) Discuss the anamolies in various situations.
a) How does SQL allow implementation of the entity integrity and referential integrity constraints?

b) Explain how views are implemented?
c) All views are updatable.
d) How will you remove a column of a table?
e) What are the different types of join operations?
f) Consider the following schema:
Suppliers (sid: integer,sname: string, address: string)
Parts(pid: integer,pname:string,color:string)
Catalog(sid: integer,pid:integer,cost: real)
i) Find the sids of suppliers who supply a red part and a green part.

ii) Find the pnames of parts for which there is some supplier.

v UNIT-IV:

What is a transaction and explain database access operations of transaction?
Explain why concurrency control is needed?
Explain why recovery is needed?
Explain transaction states and system log?
Discuss the properties of transactions/
What is a schedule & discuss when 2 schedules are conflicting with example?
Discuss the classification of schedule with examples.
What is a serializable schedule?
Explain: Result, conflict & view equivalence.
Write a note on „Serializability of Schedules.
List out Codds Rules and give examples for each rule with explanation.
Explain any 2 types of recovery techniques in detail.
Discuss the general rules for transforming relational algebra into equivalent ones.
Justify the need for concurrency control techniques in transaction processing systems.
Define ACID properties of Transactions and discuss Schedules Classification

briefly.
Explain Locking and Timestamp ordering based concurrency control protocols.
Discuss the problem of spurious tuples and how they may be prevented?
Why is a relation that is in 3NF generally considered good?
Define Boyce-Codd normal form. How does it differ from 3NF? Explain with an example.
a) Consider the following relation R:
Student
Course
Grade
Address
William Gates
Operating Systems
6
Microsoft Way 1
Jakob Nielsen
User Interfaces
8
Silicon Valley 22
Jakob Nielsen
User Interfaces
8
Glentevej 38
William Gates
Intro. to databases
7
Microfoft Way 1
Steve Jobs
Intro. to databases
10
Apple Drive 10
Steve Jobs
Operating Systems
10
Apple Drive 10

 ALL THE BEST PRACTICE WELL 

NON LINEAR PROGRAMMING PROBLEM


second semester model questions

MA602
NON LINEAR PROGRAMMING PROBLEM

UNIT I
1.define (i) unimodel function (ii)positive semi_definite matrix and negative definite matrix
2. write a short notes on the followings:
(i) convex function (ii) concave function
3.starting from(0,0) use newtons method to minimize
f(x)=3x12-4x1x2+12x22+4x1+6
4.define (i)unimodel function(ii)convex function(iii)hessian matrix
Test whether the function f(x)=2x12+2x22+4x32+2x1x3+4x2x3 is concave or convex
5. use cubic interpolation method to find the minimum of f(x)=x4-14x3+60x2-70x
6. (a)with necessary derivation explain fibonacc i method and its limitations
(b) starting from (0,0,0)use newtons method to minimize f(x)=4x12+3x22+5x32+6x1x2+x1x3-3x1-2x2+1
7. (a)define (i) unimodel function (ii) hessian matrix(iii)positive semi_definite matrix and negative definite matrix
Test whether the function f(x)=2x12+2x22+4x32+2x1x3+4x2x3 is concave or convex
(b)using fibonacci method solve the problem
Maximize
F(x)={x/2 for x<=2
-x+3 for x>2
In the interval(0,3). Take N=6
(OR)
(a)Using quadratice interpolation method ,minize
F(x)=x5-5x3-20x+5 in the interval(0,5)
(b)starting from(0,0)use newtons method to minimize the function
F(x)=x1-x2+2x12+2x1x2+x22
8.(a)define (i) unimodel function (ii) hessian matrix(iii)positive semi_definite matrix and negative definite matrix (iv)convex function
(b)using cubic interpolation method minimize
F(x)=x5-5x3-20x+5 in the interval (0,5)
(OR)
(a)Find the minimum of the function f(x)=2x2-ex by fibonaccis method in the range(0,1) take N=10
(b) with necessary derivations outline the method of quadratic interpolation
9.(a)find sthe maximum of the function f(x)=x(1.5-x) by fibonacci method in the interval (0,1) with N=10
(b) describe briefly trhe method of cubic interolation fo unconstrained non_linear rogramming problem
10. (a)define (i)unimodel function(ii)convex function(iii)hessian matrix.test whether the function f(x)=-x12-6x22-23x32-4x1x2+6x1x3+20x2x3 is convex or concave
(b)using fibonacci method solve the problem
Maximize
F(x)={x/2 for x<=2
-x+3 for x>2
In the interval(0,3). Take N=6
(or)
(a) starting from (0,0,0)use newtons method to minimize f(x)=4x12+3x22+5x32+6x1x2+x1x3-3x1-2x2+1
b)using cubic interpolation method minimize
F(x)=x5-5x3-20x+5 in the interval (0,5)
Unit II
1.minimize f(x)=3x12-4x1x2+12x22+4x1+6 by the univariate method.The starting point may be (0,0) and ε=0.01.
2.Using Davidon – Fletcher – powell method minimize f(x) = 3(x-1)2+2(x2-2)2+(x3-3)2 taking X1=[9,-7,11]T.
3.Outline the method of Nelder and meads and write down its algorithm.
4.By Davidon – Fletcher – Powell method,minimize f(x)=x12+x22+x32-4x1-8x2-12x3+100 with the starting point x1={0.0.0}T..
5.(a).Minimize f(x)=3x12-4x1x2+12x22+4x1+6 by the univariate method.The starting point may be (0,0) and ε=0.01
6.By Davidon – Fletcher – powell method ,Minimize f(x)=x1-x2+2x12+2x1x2+x22 With the starting point x1={0 0}.
7.(a).Describe the method of hooke and Jeeves and write down its algorithm.
(b).Minimize f(x)=3(x1-4)2+5(x2+3)2+7(2x3+1)2 Using Fletcher – Reeves method with the starting point(0,0,0).
8.(a).Minimize f(x)=3x12+12x22-4x1x2+4x1+6 by the univariate method.The starting point may be (0,0)and ε=0.01.
(b).Minimize f(x)=3(x1-4)2+5(x2+3)2+7(2x3+1)2 using the method of Fletcher – Reeves,The starting point is(0,0,0).
9.(a).Outline the method of Nelder and Meads and write its algorithm .
(b). Minimize f(x)=3x12-4x1x2+12x22+4x1+6 using the method of Davidon – Fletcher – Powell ,stqrting from(0,0).
10.(a)Minimize the function f(x)=(x12+x2-11)2+(x1+x22-7)2 from the starting point (0,0)using univariate method.Take ε=0.01.
(b).Using Fletcher –Reaves method ,minimize f(x)=x13+x22-3x1-2x2+2. The starting point is (0,0).
11.(a)Minimize f(x)= 4x12+3x22-5x1x2-8x1 by the univariate method .The starting point may be (0,0)and ε=0.01.
(b).Minimize f(x)=4x12+3x22+5x32+6x1x2+x1x3-3x1-2x2+15 using the method of Fletcher –Reeves .The starting point is(0,0,0).
12.(a) Outline the method of Nelder and Meads and write its algorithm .
(b). a)Minimize the function f(x)= x1-x2+2x12+2x1x2+x22 by the univariate method .The starting point may be (0,0)and ε=0.01.
13.(a).write down the algorithm of Powells method for multidimensional unconstrained optimization problems.
(b).Minimize f(x)]=4(x1-5)2+(x2-6)2 using Fletcher –Reeves method.The starting point is(0,0).
14.write down the algorithm of steepest descent method. Minimize f(x)=(x1-2)2+(x2-5)2+(x3+2)4 by using the steepest descemt ,etjpd with the starting point(4,-2,3)
15. write down the algorithm of hooke and jeeves method for multidimensional unconstrained optimization problems
16.describe the method of hooe and jeeves and write down its algorithm
17.prove that the gradient vec tor represents the direction of steepest ascent
UNIT III
1.write down the algorithm of interior penalty function method
2.use kuhn_tucker conditions to solve the following non_linear programming problem
Max z=2x1-x12+x2
Subject to the constraints
2x1+3x2<=6
2x1+x2<=4
X1,x2>=0
3.using the khuntucker conditions optimixe
f(x)=2x1+3x2-x12-x22-x32
subject to
x1+x2<=1
2x1+3x2<=6
X1,x2>=0
4.describe the method of exterior penalty function for constrained non linear programming problem and write down its algorithm
5.using kuhntucker conditions optimize
f(x)=7x12+6x1+5x2
Subject to
X1+2x2<=10
X1-3x2<=9
X1,x2>=0
6. by applying interior penalty function method
Minimize f(x)={(x1+1)3/3}+x2
Subject to
G1(x)=1-x1<=0
G2(x)= -x2<=0
X1,x2>=0
7.using the method of lagrangian multipliers, find the optimum solution of
f(x)=4x1+9x2-x12-x22
subject to
4x1+3x2=15
3x1+5x2=14
X1,x2>=0
8.using kuhntucker conditions
Optimize f(x)=2x1+3x2-(x12+x22+x32)
Subject to
X1+x2<=1
2x1+3x2<=6
X1,x2,x3>=0
9. by applying exterior penalty function method
Minimize f(x)=(x1+2)3+(x2+1)3
Subject to
2- x1<=0
1 – x2<=0
X1,x2>=0
10.using the lagrangian multipliers method find the optimum solution of f(x)=x12+x22+x32 subject to
X1+x2+3x3=2
5x1+2x2+x3=5
X1,x2,x3>=0
11. Derive the necessary and sufficient condition for the following non linear programming problems
Max z=f(x)
Subject to
G(x)<=b
x>=0
x=(x1,x2,…..xn)
12.usingf the kuhn tucker conditions optimize
F(x)=10x1+4x2-2x12-x22
Subject to
2x1+x2<=5
X1,x2>=0
13. obtain the kuhn _tucker conditions for the nllp of minimizing z=f(x1,……..xn)>=bi, i=1,2….,m and xj>=0,j=1,2….,n(n>m)
14. using the kuhn tucker conditions optimize f(x)=7x12+6x1+5x22
Subject to
X1+2x2<=10
X1-3x2<=9
Xi>=0,x2>=0
15. by applying interior and exterior penalty function methods
Minimize f(x)=1/3(x1+1)3+x2
Subject to
-x1 +1<=0
-x2<=0  
UNIT IV
1. Describe briefly the beale`s method for solving quadratic programming problem
2. using geometric programming solve
Min z=40x1-1x2-1x3-1+40x2x3+20x1x2+10x1x3
X1,x2,x3>=0
3. Apply wolfe`s method for solving the quadratic programming problem
Max f(x)=4x1+6x2-2x12-2x1x2-2x22
Subject to
X1+2x2<=2
X1,x2>=0
4. beal`s method for solving the quadratic programming problem
5. explain the method of obtaining solution of an unconstrained geometric programming problem from differential calculus point of view
6. It has been decided to shift grain from a ware house to a factory in an open rectangular box of length x1metre,width x2metre,height x3metre. The bottom,sides and the ends of the box cost respectivelyRs.80,10 and 20 per square metre. It costs Re.1 for each round trip of the box. Assuming that the box will have no salvage value find the minimum cost involved for transporting 80 cubic metres of grain
7. apply wolfe`s method to solve the quadratic programming problem QP –Dump Prepared by Kalaivani. - 216109008 10
Maximize f(x)=2x1 +x2 -x12
Subject to
2x1 +3x2<=6
2x1+x2<=4
X1>=0
X2>=0
8. Solve the following quadratic programming problem by beales method
Max z=10x1+25x2- 10x12- x22- 4x1x2
Subject to
X1+2x2+x3=10
X1+x2+x4=9
And x1,x2,x3>=0
(OR)
Solve the problem
Minimize z=80x1x2+40x2x3+20x1x3
8x1-1x2-1x3-1<=1
And x1,x2,x3>=0 by geometric programming problem
9. When n>k+1, solve the problem
Minimizef(x)=5x1x2-1+2x1-1x2+5x1+x2-1
By geometric programming QP –Dump Prepared by Kalaivani. - 216109008 11
UNIT V
1. (a)Write a short note on piecewise linear approximation of a non_linear function.

(b) A manufacturing company produces two products:T.V.sets and Refrigferator sets. Sales_prices relationships for these two products are given below: PRODUCT
QUANTITY DEMANDED
UNIT PRICE
T.V.SETS
1500-5P1
P1
REFRIGERATORSETS
3800-10P2
P2





ALL THE BEST PRACTICE WELL