V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail...

28
V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING V.S.B. ENGINEERING COLLEGE, KARUR Academic Year: 2017-2018 (ODD Semester) Class/Year/Semester: CSE ‘A’ & ‘B’ /III/V Questions Bank CS 6502 Object Oriented Analysis and Design UNIT-1-UML DIAGRAMS PART-A 1. What is Object Oriented Analysis and Design? 2. Mention the four major phases of Unified Process. 3. Write the benefits of iterative Development. 4. What is UML? 5. Define Use Case and Actor. 6. What is Use case Diagram? 7. Mention the Strength and Weakness of the Use case Diagram. 8. What is Elaboration? 9. What is Class Diagram? When to use Class Diagrams? 10. Define Aggregation and Composition. 11. Difference between Generalization and Specialization. 12. Write the Strength and Weakness of sequence and Collaboration Diagram. 13. Comparison between sequence and Collaboration Diagram. 14. What is State Chart Diagram? When to use State Diagram? 15. Define Event, State and Transitions. 16. What is Activity Diagram? Mention the Elements of an Activity Diagram. 17. What is Package Diagram? When to use package Diagram? 18. Differentiate between Component and Deployment Diagram. 19. Where to use Deployment Diagram? 20. What are the Purposes of Interaction Diagram? PART-B 1. Explain in detail about the Unified process. 2. Write a problem statement for Library management system. Draw the UML Use Case, Activity diagram, Class diagram, Sequence diagram, State Chart diagram, package diagram, Component and Deployment diagrams. 3. 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

Transcript of V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail...

Page 1: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

V.S.B. ENGNIEERING COLLEGE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

V.S.B. ENGINEERING COLLEGE, KARUR

Academic Year: 2017-2018 (ODD Semester)

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

Questions Bank

CS 6502 Object Oriented Analysis and Design

UNIT-1-UML DIAGRAMS

PART-A

1. What is Object Oriented Analysis and Design?

2. Mention the four major phases of Unified Process.

3. Write the benefits of iterative Development.

4. What is UML?

5. Define Use Case and Actor.

6. What is Use case Diagram?

7. Mention the Strength and Weakness of the Use case Diagram.

8. What is Elaboration?

9. What is Class Diagram? When to use Class Diagrams?

10. Define Aggregation and Composition.

11. Difference between Generalization and Specialization.

12. Write the Strength and Weakness of sequence and Collaboration Diagram.

13. Comparison between sequence and Collaboration Diagram.

14. What is State Chart Diagram? When to use State Diagram?

15. Define Event, State and Transitions.

16. What is Activity Diagram? Mention the Elements of an Activity Diagram.

17. What is Package Diagram? When to use package Diagram?

18. Differentiate between Component and Deployment Diagram.

19. Where to use Deployment Diagram?

20. What are the Purposes of Interaction Diagram?

PART-B

1. Explain in detail about the Unified process.

2. Write a problem statement for Library management system. Draw the UML Use Case,

Activity diagram, Class diagram, Sequence diagram, State Chart diagram, package diagram,

Component and Deployment diagrams.

3. 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

Page 2: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

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 the users and actors of this system, and the

interactions between them must be depicted.

4. 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 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.

5.a).What is use case Diagram? Model a use case diagram for a Banking System. State 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.

6. Explain in Detail about the interaction Diagrams and also notations

7.Explain in detail about the Class Diagram.

8. Comparison between Activity and State chart Diagram.

9. Explain the Concepts of Component and Deployment Diagram and Draw component and

deployment diagrams for Book bank system.

10. Explain in detail about the package diagram.

UNIT-2-DESIGN PATTETRNS

PART-A

1. Define Design Pattern. State the use of design pattern.

2. What is GRASP? How to apply the GRASP patterns?

3. Define Coupling and Cohesion.

4. What is meant by Low Coupling?

5. What is meant by high Cohesion?

6. Define Controller and mention the advantages of Controller.

7. Limitations of Factory pattern.

8. What is Adapter Pattern? Mention the types of adapter pattern.

9. List out the categories of Design patterns.

10. Mention the list of structural patterns used during design phase of software development.

11. Mention the list of Behavioral patterns used during design phase of software

development.

12. What is Bloated Controllers? How to identify bloating?

Page 3: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

13. Define information Expert.

14. What are the advantages of Factory objects?

15. Define Modular Design.

16. List out the benefits of Adapter patterns.

17. What is Observer Pattern?

18. List out the types of Coupling.

19. List out the four main benefits in Design Pattern?

20. What is CRC Cards?

PART-B

1. Explain in detail about the GRASP pattern and also explain in designing objects with

Responsibilities.

2. Write short notes on adapter, factory method, behavioral and observer pattern.

3. What is coupling? Explain the types of Coupling in detail.

4. Explain in detail about the different categories of Design patterns.

5. Write short notes on Adaptor pattern and Observer Pattern.

6. Explain in detail about the Factory Pattern and mention the Limitations and applications

of Factory pattern.

7. What is Controller? Explain the concepts of Façade, session and bloated controller.

8. Write short notes on Information expert, Creator of GRASP and Cohesion.

9. Explain in detail about the Singleton Pattern.

10. Comparison between different categories of design patterns.

UNIT-3-CASE STUDY

PART-A

1. List the advantages of Use case Modeling.

2. What is Elaboration? What are the tasks performed in elaboration?

3. What artifacts may start in Elaboration?

4. What is Domain Model?

5. What are Conceptual Classes?

6. Define Association.

7. Define Aggregation and Composition.

8. What are the Components of Domain models?

9. What is POS system? List out the Components of a POS system.

10. Difference between Include and Extend use case relationships.

11. When to use Generalization use case relationship.

12. What is the important deals in Inception of the POS system? Mention the requirements of

Inception phase of the POS system.

13. What are the main goals of establishing conceptual class Hierarchies?

Page 4: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

14. Write the Guidelines of Domain Modeling.

15. What is an attribute? List out its types.

16. What are the advantages of Domain Modeling?\

17. What are the reasons to use the Domain Model?

18. What are the guidelines to be followed during the elaboration?

19. How to create Domain model?

20. Why call a Domain model a “Visual Dictionary”?

PART-B

1. Explain in Detail about the POS system and also explain inception of the POS system.

2. Write short notes on Use case Modeling.

3. Write briefly about the Elaboration and discuss the difference between Elaboration and Inception

with Examples.

4. Describe the Strategies used to identify the Conceptual classes. Describe the steps to create a

Domain model used for representing the Conceptual classes.

5. Discuss about Aggregation and Composition.

6. Explain the guidelines for finding the Conceptual classes with neat diagrams.

7. Write Short notes on Association and attributes.

8. Explain in detail about Use case relationships.

9. Explain in detail about the Finding Conceptual class Hierarchies.

10. Write short notes on Domain model.

UNIT-4-APPLYING DESIGN PATTERNS

PART-A

1. What is meant by System Sequence Diagram?

2. What is meant by system Behavior?

3. What is meant by Interaction diagram?

4. Define Logical Architecture.

5. What are the strengths and weakness of Sequence and Collaboration Diagram?

6. Draw the sequence diagram for ATM system.

7. What are the layers of architectural design?

8. What is a package diagram?

9. How a sequence diagram is related to a use case?

10. What are the purposes of Interaction diagram?

11. What are the Relationships in UML?

12. Write the Elements of a sequence Diagram.

13. When and where to use a Sequence Diagrams?

14. Write the benefits of using UML sequence Diagrams.

Page 5: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

15. What is class diagram?

16. Mention the Relationship in a class diagram

17. Comparison between sequence and Collaboration diagram.

18. When to use Package Diagrams and Collaboration diagram.

19. When to use class –responsibility-collaboration card.

20. How to create an Instance?

PART-B

1. Illustrate with an example, the relationship between sequence diagram and use cases.

2. Describe the UML notation for class diagram with an example. Explain the concept of

Link, Association and Inheritance.

3. Explain with the example, how interaction diagram are used to model the dynamic aspects

of the system.

4. How to adding a new System sequence diagram and contracts?

5. Explain about Interaction Diagram notation?

6. Explain in detail about the applying GoF design pattern in detail.

7. Write short notes on Structural and Behavioral Pattern.

8. Explain in detail about Logical Architecture refinement.

9. Write short notes on UML package Diagram.

10. Discuss about the topic of UML class and Interaction Diagrams.

.UNIT-5-CODING AND TESTING

PART-A

1. What is reference attribute?

2. What is testing?

3. Write the issues in OO testing

4. What is class testing?

5. What is OO integration testing?

6. What is GUI testing?

7. What is OO system testing?

8. Write the challenges of class testing?

9. Write the class testing techniques.

10. What is test harness?

11. Difference between Integration and Graphical user Interface testing?

12. What is Stress testing?

13. What is scalability testing?

14. What is Regression testing?

15. What are the requirements for writing the source code in an object oriented language?

16. How to use the creating methods from Interaction diagrams?

Page 6: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

17. What is test driven or Test first development?

18. Write the advantages of the test driven development?

19. What are the activities and goals refactoring?

20. What is refactoring?

PART-B

1. Discuss briefly about Issues in OO Testing.

2. Write short notes on Class Testing.

3. Explain in detail about the OO Integration testing.

4. Explain in detail about GUI testing.

5. Write short notes on OO System testing.

6. Explain in detail about coding and testing in OOAD.

7. Explain in detail about mapping design to code concepts in detail.

8. Comparison between OO integration testing and OO system testing.

9. Explain in detail about the different types of testing in OOAD.

10. Comparison between GUI testing and class testing.

CS6501 – INTERNET

PROGRAMMING

UNIT - I

PART – A (2 Marks)

1. What are the main differences between Java and C++?

2. List the features of Java.

3. What is bytecode?

4. What is a Literal? What are the different types of literals?

5. What is a Character literal?

6. What are token in Java?

7. What is a variable? How to declare variable in java?

8. What are the different types of variables?

9. Write a note on integer data types in Java.

10. Write a note on float data types in Java.

11. What are the difference between static variable and instance variable?

12. Define Array? How to declare an array?

13. Write a note on conditional operator in Java.

14. List out the operator in Java.

Page 7: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

15. What are jump statements in Java?

16. Differentiable between break and continue statements.

17. What is means by Garbage Collection?

18. What is a class? Give an example?

19. Distinguish between a class and an object.

20. Define abstract class.

21. What is meant by an innerclass?

22. What are constructors?

23. Define method overloading.

24. Define method.

25. What are the uses of the keyword „final‟?

26. What are static methods?

27. What is inheritance?

28. What is a package?

29. Write a note on import statement.

30. Define interface.

31. Define an exception.

32. Mention the uses of try and catch clause.

33. What is use of „throw statement‟ give an example? (or) state the purpose of the throw

statement.

34. Define multithreading?

35. List out the advantages of multithreading.

36. Define the term thread.

37. List the several states of „Thread‟ in Java.

38. What is synchronization? Briefly explain.

39. What is the use of „Super‟ Keyword? Give an example.

40. What are applets?

41. What is Byte Stream in Java?

42. What is Character Stream in Java?

43. Write a note on char Array Reader?

44. How will you find out the length of a string in java? Give an example?

45. Name any three tags used in Java Doc Comment

46. List the AWT controls.

47. Write a note on push Button Control.

48. Write a note on Borderlayout.

49. Write a note on check box control in Java.

50. Distinguish between component and container.

UNIT II

1. Define Website and Web page?

2. Define Web server.

Page 8: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

3. Describe about head element.

4. What is the use of title element?

5. What is the purpose of using headers?

6. Define anchors.

7. How do users include images in web page?

8. Describe about br and hr element.

9. What is the use of tables?

10. What are table elements?

11. How to place a background for a single table cell?

12. What are differences between DIV and SPAN?

13. What are the differences between cell spacing and cell padding?

14. How to specify page breaks in HTML?

15. How to close a browser window with HTML code?

16. Is it possible to make the HTML source not viewable?

17. How to do multiple colors of text?

18. How to make a picture a link?

19. List down the ways of including style information in a document.

20. Define Cascading?

21. What are the style precedence rules when using multiple approaches?

22. Give the syntax to specify characteristics in linked style sheet.

23. List down the font characteristics permitted in Style sheets.

24. Write a note on content positioning characteristic “Visibility”.

25. What are the parts of Style sheets?

26. List out the features of Style sheets.

27. What is the use of ul element?

28. Define internal linking.

29. State the attributes of meta element.

30. Describe about password element.

31. Define CSS.

32. Define span element.

33. Define User Style Sheets.

34. Name some browsers?

35. Write Short notes on FRAMESET element.

36. List out the attributes that the <BODY> tag can take.

37. Give the structure of HTML program.

38. What are the demerits of HTML?

UNIT III

1. What is a Javascript statement? Give an example.

2. Why JavaScript has been called dynamically typed language?

3. Explain array creation in Java script with example.

Page 9: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

4. What are the types of positioning?

5. Define font family?

6. Define the term glyph.

7. List out the class of selectors

8. What are Interpreted languages?

9. What are host objects?

10. What are native objects?

11. What are the two components of Javascript implementation?

12. What do you mean by global object?

13. List out some of the built-in objects of JavaScript?

14. What are the six JavaScript data types?

15. What are the three types of statements in JavaScript?

16. What is DOM?

17. List out some of the HTML intrinsic event attributes. (APRIL/MAY 2011)

18. What is Node object?

19. List out the properties of a Node object.

20. What do you mean by document node?

21. List out some possible values for the nodeType property of Node instances.

22. List the possible opacity attributes of dynamic

positioning.

23. What is Event Listener?

24. What are the types of Events?

25. What do you mean by bubbling listener?

26. List out some common window object methods.

27. common window object methods related to time.

28. Define servlet.

29. What are servlet life cycle methods?

30. What are servlet listener classes?

31. What are the functions of doGet() and doPost() methods?

32. Define Session.

33. How the session is terminated?

34. Define cookie.

35. Explain the difference between get request and post request type.

36. List out the methods of Cookie class.

37. Define Thread.

38. What is JSP?

39. Write some commonly used video file formats.

40. What is WAR file?

Page 10: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

41. Explain in brief about JavaScriplet.

42. What are the types of directives in JSP.

43. What are JSP scripting components?

44. List out the scope of Implicit Objects

45. What are JSP Standard Actions?

46. What are directives?

47. What is page Directive?

48. What is include Directive?

49. What is the use of <jsp: useBean> Action?

50. List out JSTL functional areas.

UNIT IV

1. What are Web Services?

2. What is SOAP?

3. What are the things available in Web Services?

4. What Qualifies as Web Services?

5. List out the advantage of Web services technology?

6. What are the major aspects of Web service technologies?

7. List out the key technologies?

8. What is UDDI?

9. What are Web Services Registry Directories?

10. What is WSDL?

11. What are the risks in Web Services?

12. What is meant by WSDL?

13. What is the use of WSDL?

14. What is XSL and why it is used?

15. Write the expansion for the following i) SOAP ii) JWSDP iii) SAAJ iv) ODBC

16. When it is useful to redirect a request to a different resource.

17. Define service endpoint interface.

18. What is the basic difference between get request and post request types for service

endpoint interface?

19. What are the tools available in JWSDP 1.3?

20. What are built-in data types for XML Schema?

21. What are the classifications XML Schema data types?

22. How and why soap binding used in web services?

23. What is AJAX stands for?

UNIT V

1. Give some examples for Regular expressions Pattern matching templates.

2. What is the use of phpinfo() function?

Page 11: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

3. List the control structures available in php.

4. What is well-formed document?

5. What is DTD?

6. What is XML Namespace?

7. What is the use of XML declaration?

8. What is RSS?

9. What are the types of XML Parsers?

10. What are XML Parsers?

11. How is XML parsing done with SAX?

12. Explain Event-oriented parsing.

13. What are the components of XSL?

14. What is the purpose of XSLT?

15. What are XML Schemas?

16. Write the expansion for the following. i) XSL ii) JAXP III) CGI iv) JSP

PART B

UNIT-I

1. Explain and details about basics of java programming?

2. Explain and details about interfaces and inheritances?

3. Describe in detail about thread and exception handling?

4. Explain and details about string handling?

5. Explain and details about streams?

UNIT-II

1.Explain and details about website basics.

2.Explain and details about internet technologies.

3.Explain in details about

WWW.

4.Write short notes on internet,intranet,website&web server.

5.Explain and details about HTML5.0.

6.Explain and details about XHTML forms and tables.

7.Explain about cascading style sheets in detail.

Style sheet rules

Styling a page

Linking style sheets

Inline style sheets

8. Design a web page with a text box (username) where the user can enter a name and

another text box (ID) where the user enter an only four digit ID.NO and a button

“validate”. Validate the entered username and ID field for the following using java

script.

Both the fields should not be empty

Name field should have alphabets

ID field should have numeric.

9. To calculate the volume, the user should input the radius through an HTML text

field and press an HTML button to initiate the calculations.

Page 12: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

10. Write a XHTML program to create a web page for your college information using

any one CSS type (Assume your own data) .Explain the various CSS properties in detail.

Write a suitable code each property.

UNIT - III

1.Explain and details about basic concept of javaScript.

2.Explain and details about variables,data types and

operators. Variables and data types:

3.Explain and details about conditional statements and loops.

4.Explain and details about arrays.

5.Explain and details about DOM model and DOM2 event model.

6.Explain and details about Build in objects.

7.Explain and details about Servlet and JSP.

8.Write a program to check for an authentication where the matching information is stored

in a database using Java servlets.

9.What are the various java script objects? Explain each with an example.

10. Write a Servlet program to open a text file for reading it from the client

side.

11. How JSP work? Explain it with an example.

12. Design a JSP to builds a table of contents from the client side.

UNIT-IV

1.Explain and details about PHP.

2.Explain and details about Operators.

3. Explain and details about Arrays.

4.Explain and details about MYSQL and PHP connectivity

5.5.Explain and details about XML.

6.Explain and details about XML Parsers and Vaildation.

7.Explain and details about XSL element.

8.Explain PHP Control structures with example.

9.Explain how XML parser works? Write a XML document for displaying your contact

details (address, e-mail, mobile no, etc)?

10. Explain in detail the various methods of DOM.

11. Explain how XML parser works?

UNIT-V

1. Explain in detail about AJAX.

2. Explain in detail about XML http request and call back.

3. Describe in detail about basics of web services.

4. How to create and test a web services with an example.

5. Write short notes on WSDL.

6. Describe in detail about SOAP.

7. Explain Ajax Client server Architecture.

Page 13: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

CS6504- COMPUTER GRAPHICS

UNIT I

PART-A

1. List the Applications of CG.

2. What is translation and transformation?

3. Define Computer graphics.

4. A point (4,3) is rotated counterclockwise by an angle of 45°.Find the rotation matrix

and

the resultant point.

5. What is viewing?

6. Mention the input devices used for CG.

7. Define Raster scan system.

8. Define pixel.

9. Define clipping.

10. Differentiate parallel projection and perspective projection.

PART-B

1. Discuss all 2-D geometric transformations in detail.

2. Define Polygon. Write and explain Sutherland-Hodgeman polygon clipping algorithm.

3. Explain in detail about mid-point Ellipse drawing algorithm.

4. Discuss briefly about mid-point circle generating algorithm with example.

5. Explicate about different video displays for graphics.

UNIT II

PART A

1. What are the displays in CG?

2. What is scan conversion?

3. What do you mean by aspect ratio?

4. What are the drawbacks of DDA line drawing algorithms?

5. Explain curve clipping briefly.

6. What is the difference between window and view port?

7. Define projection and what are the methods?

8. Define view port with example.

9. List down any two attributes of lines.

10. Give an example for text clipping.

PART-B

1. List some of the input devices for graphics with example.

2. Briefly explain the organization of raster scan systems.

Page 14: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

3. Explain about CRT in detail.

4. Mention any four graphics system in output primitives. Explain in detail.

5. Obtain a transformation matrix for rotating an object about a specified pivot point.

UNIT III

PART A

1. Define 3D.

2. What is the need of defining the object in 3d?

3. Define 3D viewing.

4. Mention the usage of visible surface detection methods.

5. Example some of the blobby objects.

6. How transformations can be performed in 3D objects?

7. Define Primary color and complementary color.

8. Differentiate RGB and color model and CMY color model.

9. What are Bezier curves?

10. Define halftone patterns.

PART B

1. Scale the polygon with coordinates A(2,5), B(7,10) and C(10,2) by two units in x

direction and two units in y direction.

2. Discuss some of the important methods in visible surface detection.

3. Explain in detail about Color models.

4. Explain in detail about Spline representation.

5. Explain the Z-Buffer algorithm with example.

UNIT IV

PART A

1. List the properties of light.

2. Define Primary color and complementary color.

3. State the difference between HLS and RGB color models.

4. Differentiate RGB and color model and YIQ color model.

5. Define illumination.

6. What is hue?

7. What is the need of color in displays?

8. Mention the methods used for visible surface detection.

9. Define polygon equations.

10. How 2D differ from 3D?

PART B

1. Write short note on painter‟s algorithm.

2. Discuss about spatial- partitioning representations and oc tree representations.

3. Explain in detail about Bezier curves.

4. Explain in detail about color models.

5. Compare and contrast different color models.

Page 15: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

UNIT V

PART A

1. Define Chromaticity.

2. List the properties of light.

3. Mention the dithering techniques.

4. Define animation.

5. What is a morphing?

6. What are the curves used in realism?

7. When tweening method is used in object?

8. Define raster animation.

9. How ray tracing can achieve?

10. Define fractals.

PART-B

1. Explain in detail about raster animation.

2. Explicate Recursively defined curves.

3. Explain in detail Grammar based models.

4. Write short notes on Tiling the plane.

5. Discuss about key frame systems in detail.

6. Briefly explain about curves in computer realism.

Page 16: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

CS6503 THEORY OF COMPUTATION

UNIT I FINITE AUTOMATA

PART A

1. Define finite automata.

2. Write the difference between the + closure and * closure.

3. Define alphabet, string, powers of an alphabet and concatenation of strings.

4. Define language and Grammar give an example.

5. What is a transition table and transition graph?

6. Give the DFA accepting the language over the alphabet 0, 1 that has the set

of all strings beginning with 101.

7. Give the DFA accepting the language over the alphabet 0,1 that have the set

of all strings that either begins or end(or both) with 01.

8. Define NFA.

9. Difference between DFA and NFA.

10. Write the notations of DFA.

11. Define ε-NFA.

12. Define the language of NFA.

13. Is it true that the language accepted by any NFA is different from the

regular language? Justify your Answer.

14. Define Regular Expression.

15. List the operators of Regular Expressions

16. State pumping lemma for regular languages

17. Construct a finite automaton for the regular expression 0*1*.

18. List out the applications of the pumping lemma.

19. Define Epsilon –Closures.

20. State minimization of DFA.

Page 17: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

PART-B

1. a) If L is accepted by an NFA with ε-transition then show that L is accepted by an

NFA without ε-transition.

b) Construct a DFA equivalent to the NFA. M=({p,q,r},{0,1},

δ,p,{q,s}) Where δis defined in the following table.

0 1

p {q,s} {q}

q {r} {q,r}

r {s} {p}

s - {p}

2. a)Show that the set L={anb

n/n>=1} is not a regular. (6) b)Construct a DFA equivalent

to the NFA given below: (10)

0 1

p {p,q} P

q r R

r s -

s s S

3. a) Check whether the language L=(0n1

n / n>=1) is regular or not? Justify your answer.

b) Let L be a set accepted by a NFA then show that there exists aDFA that accepts L.

4. a) Convert the following NFA to a DFA(10)

b) Discuss on the relation between DFA and minimal DFA

5. a) Construct a NDFA accepting all string in {a, b} with either two consecutive a‟s or

two Consecutive b‟s.

b) Give the DFA accepting the following language

Set of all strings beginning with a 1 that when interpreted as a binary integer is

a Multiple of 5.

6. Draw the NFA to accept the following languages.

(i)Set of Strings over alphabet {0, 1,…….9} such that the final digit has appeared before.

(ii)Set of strings of 0‟s and 1‟s such that there are two 0‟s separated by a number of

positions that is a multiple of 4.

7. a) Let L be a set accepted by an NFA. Then prove that there exists a deterministic

finite automaton that accepts L.Is the converse true? Justify your answer.

b)Construct DFA equivalent to the NFA given below: (6)

Page 18: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

8. a) Prove that a language L is accepted by some ε–NFA if and only if L is accepted

by some DFA.

9. Consider the following ε–NFA. Compute the ε–closure of each state and find it‟s

equivalent DFA. (8)

ε A b C

{q {p

p Ф Ф

{r {q

q ф Ф

*r Ф ф ф {r}

10. a) Prove that a language L is accepted by some DFA if L is accepted by some NFA.

b) Convert the following NFA to it‟s equivalent DFA

0 1

p {p,q} {p}

q {r} {r}

r {s} ф

*s {s} {s}

11. a) Explain the construction of NFA with ε-transition from any given regular

expression.

b)Let A=(Q,∑, δ, q0 ,{qf ) be a DFA and suppose that for all a in ∑we have δ(q0,

a)= δ(qf ,a). Show that if x is a non empty string in L(A),then for all k>0,xk is also

in L(A).

12. Convert the following ε-NFA to DFA

states ε a b C

Page 19: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

p Ф {p} {q} {r}

q {p} {q} {r} Ф

*r {q} {r} ф {p}

UNIT II GRAMMARS

PART-A

1. Define CFG.

2. Define production rule.

3. Define terminal and non terminal symbols.

4. Write about the types of grammars.

5. What is ambiguity?

6. Define sentential form.

7. Define parse tree.

8. What is a derivation?

9. What is a useless symbol and mention its types.

10. What is null production and unit production?

11. What are the two normal forms of CFG?

12. State Greibach normal form of CFG.

13. Mention the application of CFG.

14. Construct a CFG for the language of palindrome string over {a, b}.Write the CFG

for the language, L=(anb

n | ≥n).

15. Construct a derivation tree for the string 0011000 using the grammar

S->A0S |0 | SS , A-> S1A | 10.

16. Show that id+id*id can be generated by two distinct leftmost derivation in the

grammar E->E+E | E*E | (E) | id .

17. Let G be the grammar S->aB/bA,A->a/aS/bAA,B->b/bS/aBB.obtain parse tree for

the string aaabbabbba.

18. Find L(G)where G=({S},{0,1},{S->0S1,S->ε},S).

19. construct a context free Grammar for the given expression (a+b) (a+b+0+1)*

20. Let the production of the grammar be S-> 0B | 1A, A-> 0 | 0S | 1AA, B-> 1|1S |

0BB.for the string 0110 find the right most derivation

PART-B

1. a) What are the closure properties of CFL? State the proof for any two

properties. b. b) Construct a CFG representing the set of palindromes over

(0+1)*.

2. a). if G is the grammar S

SbS | a show that G is ambiguous.

b) Let G= (V,T, P,S) be a CFG. If the recursive inference procedure tells that terminal

string w is in the language of variable A, then there is a parse tree with root A and

yield w.

3. Discuss in detail about ambiguous grammar and removing ambiguity from grammar.

4. Discuss about eliminating useless symbols with example.

Page 20: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

5. Explain about eliminating € productions with example.

6. What is a unit production and how will you eliminate it. Give example.

7. Prove that if G is a CFG whose language contains at least one string other than €,

then there is a grammar G1 in Chomsky Normal Form such that L)G1) = L(G) –{€}.

8. Consider the grammar

E

E + E | E*E | (E) | I

I

a+b

Show that the grammar is ambiguous and remove the ambiguity.

9. Simplify the following grammar

S

aAa | bBb | BB

A

C

B

S |

A C

10. Construct a grammar in GNF which is equivalent to the grammar

S

AA | a A

SS | b

UNIT III PUSHDOWN AUTOMATA

PART-A

1. Give an example of PDA.

2. Define the acceptance of a PDA by empty stack. Is it true that the language

ac-cepted by a PDA by empty stack or by that of final state is different

languages?

3. What is additional feature PDA has when compared with NFA? Is PDA

superior over NFA in the sense of language acceptance? Justify your answer.

4. Explain what actions take place in the PDA by the transitions (moves)

a. δ(q,a,Z)={(p1,γ1),(p2, γ2),…..(pm, γm)} and δ(q,

ε,Z)= {(p1,γ1),(p2, γ2),…..(pm,γm)}.

b. What are the different ways in which a PDA accepts the language? Define

them. Is a true that non deterministic PDA is more powerful than that of

de-terministic

c. PDA? Justify your answer.

5. Explain acceptance of PDA with empty stack.

6. Is it true that deterministic push down automata and non deterministic push

a. Down automata are equivalent in the sense of language of

acceptances? Justify your answer.

7. Define instantaneous description of a PDA.

8. Give the formal definition of a PDA.

9. Define the languages generated by a PDA using final state of the

PDA and empty stack of that PDA.

10. Define the language generated by a PDA using the two methods of

accept-ing a language.

11. Define the language recognized by the PDA using empty stack.

12. For the Grammar G defined by the

produc-tions S → A/ B

A → 0A/ ε

Page 21: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

B → 0B/ 1B/ ε

Find the parse tree for the yields (i) 1001 (ii) 00101

13. Construct the grammar for the

productions

E → E+E

E→ id Check whether the yield id + id + id is having the parse tree with root E or

not.

14. What is ambiguous and unambiguous Grammar?

15. Show that E→E+E/E*E/( E ) / id is ambiguous.

16. S→aS/ aSbS/ ε is ambiguous and find the un ambiguous grammar.

17. Define the Instantaneous Descriptions ( ID )

18. List out the applications of the pumping lemma for CFG.

19. State the pumping lemma for context-free languages.

20. Use the CFL pumping lemma to show each of these languages not to be context-

free { aib

jc

k| i<j<k}

PART-B

1. a) If L is Context free language then prove that there exists PDA M such

that L=N(M).

b) Explain different types of acceptance of a PDA.Are they equivalent in sense of

lan-guage acceptance? Justify your answer.

2. Construct a PDA accepting {anb

m a

n/ m, n>=1} by empty stack. Also construct

the corresponding context-free grammar accepting the same set.

3. a) Prove that L is L(M2 ) for some PDA M2 if and only if L is N(M1) for

some PDA M.

b) Define Deterministic Push Down Automata DPDA. Is it true that DPDA

and PDA are equivalent in the sense of language acceptance is concern?

Justify Your answer.

c) Define a PDA. Give an Example for a language accepted byPDA by empty stack.

4. a) If L is Context free language then prove that there exists PDA M such

that L=N(M).

b) Explain different types of acceptance of a PDA. Are they equivalent in

sense of language acceptance? Justify your answer

5. a) Construct the grammar for the following PDA.

M=({q0, q1},{0,1},{X,z0},δ,q0,Z0,Φ) and where δis given by

δ(q0,0,z0)={(q0,XZ0)}, δ(q0,0,X)={(q0,XX)},δ(q0,1,X)={(q1,

ε)},

δ(q1,1,X)={(q1, ε)},δ(q1, ε,X)={(q1, ε)}, δ(q1, ε, Z0 )={(q1, ε)}. (12)

b) Prove that if L is N(M1) for some PDA M1 then L is L(M2 ) for some PDA M2.

6. a) Construct a PDA that recognizes the language

{aib

jc

k| i,j,k>0 and

i=jor,i=k}.

b) Discuss about PDA acceptance

1)From empty Stack to final

state. 2)From Final state to

Page 22: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

Empty Stack.

7. a) Show that E->E+E/E*E/(E)/id is ambiguous.

b) Construct a Context free grammar G which accepts N(M), where

M=({q0,q1},{a,b},{z0,z},δ,q0,z0,Φ) and where δis given by

δ(q0,b,z0)={(q0,zz

0)} δ(q0,

ε,z0)={(q0, ε)}

δ(q0,b,z)={(q0,zz)

}

δ(q0,a,z)={(q1,z)}

δ(q1,b,z)={(q1, ε)

δ(q1,a,z0)={(q0,z0)}

UNIT IV TURING MACHINES

PART-A

1. Define a Turing Machine.

2. Define multi tape Turing Machine.

3. Explain the Basic Turing Machine model and explain in one move. What are

the actions take place in TM?

4. Explain how a Turing Machine can be regarded as a computing device to

compute integer functions.

5. Describe the non deterministic Turing Machine model. Is it true the non deterministic.

6. Turing Machine models are more powerful than the basic Turing Machines? (In

the sense of language Acceptance).

7. Explain the multi tape Turing Machine mode. Is it more power than the basic

turing machine? Justify your answer.

8. Using Pumping lemma Show that the language L={anb

nc

n |n>=1} is not a CFL.

9. What is meant by a Turing Machine with two way infinite tape.

10. Define instantaneous description of a Turing Machine.

11. What is the class of language for which the TM has both accepting and rejecting

configu-ration? Can this be called a Context free Language?

12. The binary equivalent of a positive integer is stored in a tape. Write

the necessary transition to multiply that integer by 2.

13. What is the role of checking off symbols in a Turing Machine?

14. Mention any two problems which can only be solved by TM.

15. Draw a transition diagram for a Turing machine to compute n mod 2.

16. Difference between multi head and multi tape Turing machine.

17. Define Halting Problem.

18. Define LBA.

19. List out the hierarchy summarized in the Chomsky hierarchy.

PART-B

1. Explain in detail notes on Turing Machine with example.

2. Consider the language L={a,b}*{aba}{a,b}*={x ε{a,b}*|x containing the substring

aba}. L is the regular language, and we can draw an FA recognizing L.

3. Design a Turing Machine M to implement the function “multiplication” using the

Page 23: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

subrou-tine „copy‟.

4. Explain how a Turing Machine with the multiple tracks of the tape can be used to

deter-mine the given number is prime or not.

5. Design a Turing Machine to compute f(m+n)=m+n, V m,n>=0 and simulate their

action on the input 0100.

6. Define Turing machine for computing f(m, n)=m-n ( proper subtraction).

7. Explain how the multiple tracks in a Turing Machine can be used for testing given

posi-tive integer is a prime or not.

8. Explain in detail” The Turing Machine as a Computer of integer functions”.

9. Design a Turing Machine to accept the language L={0n 1

n/n>=1}

10. What is the role of checking off symbols in a Turing Machine?

11. Construct a Turing Machine that recognizes the language {wcw / w € {a, b} + }

12. Design a TM with no more than three states that accepts the language. a(a+b)

*.Assume €={a,b}

13. Design a TM to implement the function f(x)= x+1.

14. Design a TM to accept the set of all strings {0,1} with 010 as substring.

15. Design a TM to accept the language LE={anb

nc

n | n > 1 }

UNIT V UNSOLVABLE PROBLEMS AND COMPUTABLE

FUNCTIONS

PART-A

1. When a recursively enumerable language is said to be recursive.

2. Is it true that the language accepted by a non deterministic Turing

Machine is different from recursively enumerable language?

3. When we say a problem is decidable? Give an example of undecidable problem?

4. Give two properties of recursively enumerable sets which are undecidable.

5. Is it true that complement of a recursive language is recursive? Justify your answer.

6. When a language is said to be recursive or recursively enumerable?

7. When a language is said to be recursive? Is it true that every regular set is

not recursive?

8. State the Language NSA and SA.

9. What do you mean by universal Turing Machine?

10. Show that the union of recursive language is recursive.

11. Show that the union of two recursively enumerable languages is recursively

enumerable.

12. What is undecidability problem?

13. Show that the following problem is undecidable.“Given two CFG‟s G1 and

G2, is L(G1)∩L(G2)=Φ?”.

14. Define recursively enumerable language.

15. Give an example for a non recursively enumerable language.

16. Differentiate between recursive and recursively enumerable languages.

17. Mention any two undecidability properties for recursively enumerable language.

18. Difference between Initial and composition function .

19. Give an example for an undecidable problem.

20. Define MPCP.

PART-B

1. Describe the recursively Enumerable Language with example.

Page 24: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

2. Explain in detail notes on computable functions with suitable example.

3. Explain in detail notes on primitive recursive functions with examples.

4. Discuss in detail notes on Enumerating a Language with example

5. Explain in detail notes on universal Turing machines with example.

6. Discuss the Measuring and Classifying Complexity.

7. Describe the Tractable and possibly intractable problems P and NP Completeness.

8. Explain in detail Time and Space Computing of a Turing Machine.

Page 25: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

MA6566 – Discrete Mathematics

Question Bank

Part – A

1. Prove that 2n<n! for n≥ 4

2. Define Pigeon Hole Principle.

3. Prove that n<2n, for n≥1.

4. Find the value of n if nP13: (n+1)P12=3:4.

5. If nC5=20nC4, find „n‟.

6. Find the recurrence relation for the sequence an=2n+9, n≥1.

7. Find the recurrence relation which satisfies yn=A 3n+B (-4)n .

8. How many positive integers not exceeding 1000 are divisible by 7 or 11?

9. A survey of 500 from a school produced the following information. 200 play

volleyball, 120 play hockey. 60 play both volleyball and hockey. How many are not

playing either volleyball or hockey?

10. Define complete bipartite graph with example.

11. State the Handshaking Theorem.

12. For the following degree sequences, 4,4,4,3,2 find if there exist a graph or not.

13. Define mixed graph with example.

14. Define Subgraph.

15. Write the Definition of Adjecency Matrix of a simple graph.

16. Define Incidence Matrix of a simple graph.

17. Write the Definition of Path Matrix.

18. Define Graph Isomorphism.

19. Define Unilaterally Connected.

20. Write the Definition of Euler Graph.

21. Describe the Hamiltonian Graph.

22. Define Group and Abelian Group.

23. Define Semigroup and Monoid.

24. Define Cyclic monoid.

25. Prove that the identity element of a group is unique.

26. Prove that the inverse element of a group is unique.

27. Prove that a group (G,*) is an abelian group iff (a b)2

a 2

b2

Page 26: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

28. Define Subgroup with example.

29. Define morphism of Groups.

30. Describe Kernel of a Homomorphism.

31. Define Cosets.

32. Define normal subgroups.

33. Define Ring.

34. What is Equialence Relation?

35. Define POSET.

36. Draw the Hasse Diagram for(ρ(A), ) where A={a,b,c}

37. If X= {2,3,6,12,24,36} and the relation R defined on X by R= {<a,b> / a/b}.

Draw the Hasse Diagram for (X,R).

38. Define LUB and GLB.

39. Describe Lattices.

40. Describe Modular Lattice.

PART B

1. How many bit strings of length 10 contain

Exactly 4 1‟s

Atmost 4 1‟s

Atleast 4 1‟s

An equal number of 0‟s and 1‟s

2. Find the explicit formula for the Fibonacci sequence.

3. Solve the recurrence relation D(k)-7D(k-2)+6 D(k-3)=0 with D(0)=8, D(1)=6 and

D(2)=22.

4. Solve the recurrence relation S(n)-4 S(n-1)-11 S(n-2)+30 S(n-3)=0 with S(0)=0,

S(1)=- 35and S(2)=-85.

5. Find all the solution of the recurrence relation an+1-an=3n2-n, n≥0 and a0=3.

6. Solve the recurrence relation S(n)-3 S(n-1)-4 S(n-2)=4n.

7. Find all the solution of the recurrence relation an=5an-1-6an-2+7n.

8. Solve the recurrence relation an-7an-1+10an-2 =0 for n≥2 given that a0=10,

a1=41 using generating functions.

9. Solve the recurrence relation S(n+1)-2 S(n)=4n with S(0)=1 for n≥0

10. Identify the sequence having the expression (5+2x/1-4x2) as a generating function.

11. Identify the sequence having the expression (6-29x/30x2-11x+1) as a generating

Page 27: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

e4 e5

e5

function.

12. Find the number of integers between 1 to 250 that are not divisible by any of the

integers 2,3,5 and 7.

13. How many positive integers between 1 to 100 that are

i)Not divisible by 7,11 or 13 ii)Divisible by 3 but not by 7.

14. Find the number of integers between 1 to 100 that are divisible by

i) 2,3,5 or 7 ii) 2,3,5 but not by 7.

15. How many prime numbers not exceeding 100 are there?

16. How many solutions does x1+x2+x3=11 have, where x1,x2 and x3 are non negative

integers with x1≤3, x2≤4 and x3≤6.

17. Prove that In a undirected graph, the number of odd degree vertices are even.

18. Prove that the maximum number of edges in a simple graph with „n‟ vertices is

19. Find the adjacency matrix of the following graph G. Hence find degree of each

vertex. Also find A2 and A3. what is your observations regarding the entries in A2 and

A3.

e1

e2

e3

20. Prove that a simple graph with n vertices must be connected if it has more than

21. Find the adjacency matrix of the following graph G. Hence find degree of each vertex.

Also find A2

and A3

what is your observations regarding the entries in A2

and A3.

v4 e3 v3

e3 e4

v1 e1 v2

22. For the graph given below find all possible paths of length 4 from vertex B to D.

A B

D C

23. P.T. a simple graph with n vertices and k components can have at most

Page 28: V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF · PDF file · 2017-07-27Explain in detail about coding and testing in OOAD. 7. ... (2 Marks) 1. What are the main differences between Java

24. Give an example of a graph which is

1. Eulerian but not Hamiltonian. . 2. Hamiltonian but not Eulerian.

3. Both Eulerian and Hamiltonian. 4. Non Eulerian and Non

Hamiltonian

25. Prove that the intersection and union of two subgroups is also a subgroup.

26. The kernel of a homomorphism f from a group (G,*) to (G‟,*) is a subgroup of G.

27. State and prove lagrange‟s theorem.

28. State and Prove Fundamental theorem on Homomorphism of Groups.

29. State and prove the following Laws in lattices

✓ Idempotent law

✓ Commutative Law

✓ Associative law

✓ Absorption Law

30. State and prove Isotonicity property of lattice.

31. State and prove Distributive inequality property of lattice.

32. Prove that the Diamond lattice or M5 Lattice is a Modular Lattice.

33. State and prove Demorgan‟s Law of lattice.