This document outlines course content for programming, data structures, algorithms, and theory of computation. It includes 5 units covering topics like C programming, arrays, pointers, functions, structures, stacks, queues, linked lists, trees, and algorithms like sorting, searching. It also lists example lab programs to implement concepts like binary search, matrix multiplication, recursion, and more. Key algorithms covered are merge sort, quicksort, topological sorting, dynamic programming techniques. The document lists reference books and provides an overview of topics taught in these computer science courses.
This document outlines course content for programming, data structures, algorithms, and theory of computation. It includes 5 units covering topics like C programming, arrays, pointers, functions, structures, stacks, queues, linked lists, trees, and algorithms like sorting, searching. It also lists example lab programs to implement concepts like binary search, matrix multiplication, recursion, and more. Key algorithms covered are merge sort, quicksort, topological sorting, dynamic programming techniques. The document lists reference books and provides an overview of topics taught in these computer science courses.
This document outlines course content for programming, data structures, algorithms, and theory of computation. It includes 5 units covering topics like C programming, arrays, pointers, functions, structures, stacks, queues, linked lists, trees, and algorithms like sorting, searching. It also lists example lab programs to implement concepts like binary search, matrix multiplication, recursion, and more. Key algorithms covered are merge sort, quicksort, topological sorting, dynamic programming techniques. The document lists reference books and provides an overview of topics taught in these computer science courses.
This document outlines course content for programming, data structures, algorithms, and theory of computation. It includes 5 units covering topics like C programming, arrays, pointers, functions, structures, stacks, queues, linked lists, trees, and algorithms like sorting, searching. It also lists example lab programs to implement concepts like binary search, matrix multiplication, recursion, and more. Key algorithms covered are merge sort, quicksort, topological sorting, dynamic programming techniques. The document lists reference books and provides an overview of topics taught in these computer science courses.
Unit I Introduction to Digital Computers, Representation of Algorithm, Flowcharts,
Examples. (T2: Section 1.1 to 1.4, 5.4, 5.5) Introduction to Programming: Importance of C, Basic Structure of C Programs, Programming Style, Executing a C Program. (T1: Section 1.2, 1.8, 1.9, 1.10) Constants, Variables, and Data Types: Introduction ,Character Set ,C Tokens, Keywords and Identifiers ,Constants, Variables, Data Types ,Declaration of Variables, Assigning Values to Variables, Defining Symbolic Constants. (T1: Section 2.1-2.8, 2.10- 2.11) Managing Input and Output Operations: Reading a Character, Writing a Character, Formatted Input, Formatted Output. (T1: Section 4.1-4.5) Operators and Expressions: Introduction, Arithmetic Operators, Relational Operators, Logical Operators, Assignment Operators, Increment and Decrement Operators, Conditional Operator, Bitwise Operators, Special Operators, Arithmetic Expressions, Evaluation of Expressions, Precedence of Arithmetic Operators, Type Conversions in Expressions, Operator Precedence and Associativity. (T1: Section 3.1 – 3.12, 3.14-3.15) Unit II Decision Making and Branching: Introduction, Decision Making with IF Statement, Simple IF Statement, the IF.....ELSE Statement, Nesting of IF....ELSE Statements, The ELSE IF Ladder, The Switch statement. (T1: Section 5.1-5.7) Decision Making and Looping: The WHILE Statement, The DO Statement, the FOR Statement, Jumps in LOOPS. (T1: Section 6.1-6.5) Unit III Arrays: One-dimensional Arrays, Declaration of One-dimensional Arrays, Initialization of One-dimensional Arrays, Example programs- Linear search, Binary search, Bubble sort, Selection sort. Two-dimensional Arrays, Declaration of Two-dimensional Arrays, Initialization of Twodimensional Arrays, Example programs – Matrix Multiplication, Transpose of a matrix. (T1: Section 7.2-7.6) Unit IV Character Arrays and Strings: Declaring and Initializing String Variables ,Reading Strings from Terminal ,Writing Strings to Screen ,Arithmetic Operations on Characters, String-handling Functions (strlen(), strcpy(), strcmp(), strcat(), strrev()), Example Programs (with and without using built-in string functions), Two-dimensional character arrays. (T1: Section 8.2-8.5, 8.7, 8.8) Pointers: Introduction, Declaring Pointer Variables, Initialization of Pointer variables, accessing a Variable through its Pointer, Pointer Expressions, Pointer Increments and Scale Factor, Pointers and 1-D Arrays. (T1: Section 11.1, 11.4-11.6, 11.8- 11.10(only 1-D array)) Unit V User-defined Functions: Elements of User-defined Functions, Definition of Functions, Return Values and their Types, Function Calls, Function Declaration, Category of Functions, No Arguments and no Return Values, Arguments but no Return values, Arguments with Return Values, No Arguments but Returns a Value, Passing Arrays to Functions. Recursion - Factorial of an integer, Xn , Finding n th Fibonacci numbers. (T1: Section 9.1- 9.18) Kerningham and Dennis Ritchie The C programming language (ANSI C version), 2 nd Edition, PHI India Yashwant Kanetkar Let us C, 6th Edition , BPB publication COMPUTER PROGRAMMING LABORATORY Laboratory Programs: 1a. Develop a C Program to find the roots of quadratic equation for non-zero coefficient using if-else ladder construct. 1b. Develop a C Program to conduct Binary search for a key element over an array of n integer elements. Report success or failure with appropriate messages. 2a. Develop a C Program to implement a simple calculator to perform addition, subtraction, multiplication and division operations using switch construct. Display appropriate messages for invalid operator and divide by zero error. 2b. Develop a C program to read n elements into an integer array and sort the array using Bubble sort technique. Print the input array and the resultant array with suitable messages. 3a. Develop a C Program to generate the Prime numbers between the ranges m & n using nested for loop construct. Also, print the number of prime numbers generated. 3b. Develop a recursive C function to find the factorial of a number, n! , defined by fact(n)=1, if n=0. Otherwise fact(n)=n*fact(n-1). Using this function, develop a C program to compute the Binomial coefficient nCr. Perform input validation as well. 4a. Develop a C Program to find the GCD & LCM of two integers using Euclid’s algorithm. 4b. Develop a C program to find the smallest and largest elements in an array using pointers and then swap these elements and display the resultant array. 5a. Develop a C program to find the Sine of an angle for the given n terms using the series Sin(x) = x - x 3 /3! + x5 /5! -………… n terms. 5b. Develop a C program to read two matrices A (m x n) and B (p x q) and compute the product of the two matrices. Print both the input matrices and resultant matrix with suitable headings and output should be in matrix format only. Program must check the compatibility of orders of the matrices for multiplication. Report appropriate message in case of incompatibility. 6a. Develop a C program to find the sum of all the elements of an integer array using pointers. 6b. Develop a C program to accept a matrix of order m x n. Implement the following functions: i) Find the sum of each row ii) Find the sum of each column iii) The sum should be printed in main function only. 7a. Develop a C program to count the vowels & consonants in a given string 7b. Develop a C program to perform the following operations using functions: i) Read n elements into an array ii) Print the contents of an array iii) Sort an array of n elements using Selection sort technique DATA STRUCTURES AND APPLICATIONS UNIT - I Structures and Unions: Defining a Structure, declaring Structure variables, accessing Structure members, Structure initialization, copying and comparing Structure variables, operations on individual members, array of Structures, array within Structure, Structure within Structure, Structures and Functions, Unions, size of structures, Bit fields. File management in C: Defining and Opening a file, Closing a file, Input/Output operations on files - getc(), putc(), getw(), putw(), fscanf(), fprintf(), Error handling during I/O operations - feof(), ferror(), Random access to files - ftell(), rewind(), fseek(), Command line arguments. UNIT - II The Stack: Definition and Examples, representing Stacks in C, Example: Infix, Postfix, and Prefix. Recursion: Recursive Definition and Processes, Recursion in C, Writing recursive programs: The Towers of Hanoi Problem, Efficiency of Recursion. Queues and Lists: The Queue and Its Sequential Representation: C implementation of Queues, Insertion, Deletion and Display operations, Types of Queues (Linear, Circular, Priority and Double Ended Queues). UNIT - III Queues and Lists Continued Dynamic memory allocation: malloc(), calloc(), realloc(), free(). (Text Book 1: 13.1-13.6) Linked lists: Inserting and removing nodes from a list, linked implementation of stacks, getnode and freenode operations, linked implementation of queues, examples of list operation, list implementation of priority queues, header nodes. Lists in C: allocating and freeing dynamic variables, linked lists using dynamic variables, queues as lists in C, examples of list operations in C, non-integer and non-homogeneous lists, Addition of two polynomials, implementing header nodes. (Text Book2: 4.2, 4.3(except array implementation of list, Limitations of array implementation, comparing dynamic and array implementations of list)) UNIT - IV Other List Structures: Circular lists, stack as a Circular list, queue as a Circular list, primitive operations on circular lists, the Josephus problem, header nodes, Doubly linked lists, Primitive operations on Doubly linked list. UNIT - V Trees: Operations on Binary Trees, Applications of Binary Trees, Binary Tree Representations: Node representation of Binary Trees, Internal and External Nodes, Implicit array representation of Binary Trees, Binary Tree Traversals in C, Threaded Binary Trees - definition and types. Trees and Their applications: C Representations of Trees, Tree Traversals, General Expressions as Trees, Evaluating an Expression Tree, Constructing a Tree. Yedidyah Langsam, Moshe J. Augenstein, Aaron M. Tenenbaum Data structures using C and C++, PHI/Pearson, 2nd Edition, 2015. DATA STRUCTURES AND APPLICATIONS LABORATORY ANALYSIS AND DESIGN OF ALGORITHMS UNIT - I Introduction: Notion of algorithm, Fundamentals of Algorithmic Problem Solving, Fundamentals of the Analysis of Algorithm Efficiency: Analysis frame work, Asymptotic Notations and Basic Efficiency Classes, Mathematical Analysis of Non-recursive and Recursive Algorithms. [Chapters: 1.1, 1.2, 2.1-2.4] UNIT - II Brute Force: Selection Sort and Bubble Sort, Sequential Search and Brute-Force String Matching. Divide and Conquer: Mergesort, Quicksort, Binary Search. UNIT - III Decrease and Conquer: Insertion Sort, Depth First Search, Breadth First Search, Topological Sorting, Algorithms for Generating Combinatorial Objects. Transform and Conquer: Presorting, Balanced Search Trees: AVL Tree, Heaps and Heapsort. UNIT - IV Dynamic Programming: Computing a Binomial Coefficient, Warshall’s and Floyd’s Algorithms, The Knapsack Problem. Greedy Technique: Prim’s Algorithm, Kruskal’s Algorithm, Dijkstra’s Algorithm. UNIT - V Space and Time Tradeoffs: Sorting by Counting, Input Enhancement in String Matching : Horspool’s Algorithm. Limitations of Algorithm Power: P, NP and NP-Complete Problems. Coping with the Limitations of Algorithm Power: Backtracking : N-Queens, Hamiltonian Circuit Problem, Subset-Sum Problem. THEORY OF COMPUTATION UNIT - I Introduction to Finite Automata: Why study automata theory? The central concepts of Automata theory; Deterministic finite automata; Nondeterministic finite automata; An Application: Text search; Finite automata with Epsilon-transitions. (Text Book 1: 1.1.1, 1.5, 2.2, 2.3, 2.4, 2.5) [Theorem:2.11] UNIT - II Regular expressions and Languages: Regular expressions, Finite Automata and Regular Expressions- From DFA’s to Regular Expressions, converting regular expressions to automata; Application of Regular Expressions, Properties of Regular languages- Proving languages not to be regular languages; Equivalence and Minimization of Automata - Testing equivalence of states, Testing equivalence of regular languages, Minimization of DFA’s. (Text Book 1: 3.1, 3.2.1, 3.2.3, 3.3, 4.1) [Theorems: 3.4, 3.7, 4.1] UNIT - III Context-Free Grammars and Languages: Context-free grammars; Parse treesConstructing Parse Trees, The yield of a parse tree; Applications of Context Free Grammars, Ambiguity in grammars and languages- Ambiguous grammars, Leftmost derivation as a way to express ambiguity, Inherent ambiguity. (Text Book 1:5.1, 5.2.1, 5.2.2,5.3, 5.4.1, 5.4.3,5.4.4). Simplification of CFG’s and Normal forms (only Chomsky Normal Form) (Text Book 2: 6.1,6.2). [Theorems: 6.1, 6.2, 6.3, 6.4, 6.6] UNIT - IV Pushdown Automata: Definition of the Pushdown automata; The languages of a PDA, Acceptance by Final State, Acceptance by Empty Stack, From Empty Stack to Final State, From Final State to Empty Stack, Deterministic Pushdown Automata- Definition of a DPDA. (Text Book 1: 6.1, 6.2, 6.4.1) [Theorems: 6.9,6.11] Introduction to Turing Machine: The Turing Machine: Notation for the TM, Instantaneous Descriptions for the TM, Transition diagrams for the TM, The Language of a TM, TM and Halting. (Text Book 1:8.2.2 - 8.2.6) UNIT - V A hierarchy of Formal Languages and Automata- Definitions of Recursive and Recursively Enumerable Languages, Definition of Unrestricted Grammars, Definition of Context Sensitive Grammars and Languages, Chomsky hierarchy. Limits of Algorithmic Computation- Some problems that cannot be solved by Turing Machines, Undecidable problems for recursively enumerable languages, The Post Correspondence Problem, Undecidable problems for context free languages. TEXT BOOKS: 1. 1 John E. Hopcroft, Rajeev Motwani, Jeffrey D.Ullman Introduction to Automata Theory, Languages and Computation, 3rd Edition, Pearson education, 2007 2. 2Peter Linz An Introduction to Formal Languages and Automata, 4th edition, Narosa publication DATABASE MANAGEMENT SYSTEM UNIT-1 1. DATABASES AND DATABASE USERS: 3 Hrs Introduction; An example; characteristics of the database approach; actors on the scene; workers behind the scene; advantages of using the DBMS approach; A brief history of database Applications; when Not to use a DBMS. 2. DATABASE SYSTEM – CONCEPTS AND ARCHITECTURE 3 Hrs Data models, schemas, and instances; three schema architecture and data independence; database languages and interfaces; the database system environment; centralized and client/server/architectures for DBMSs. Classification of database management system 3. ENTITY-RELATIONSHIP MODEL 5 Hrs Using High-Level Conceptual Data Models for Database Design; An Example Database Application; Entity Types, Entity Sets, Attributes and Keys; Relationship types, Relationship Sets, Roles and Structural Constraints; Weak Entity Types; Refining the ER Design for the COMPANY Database; ER Diagrams, Naming Conventions and Design Issues UNIT-2 4. RELATIONAL MODEL AND RELATIONAL ALGEBRA 8 Hrs Relational Model Concepts; Relational Model Constraints and Relational Database Schemas; Update Operations and Dealing with Constraint Violations; Unary Relational Operations: SELECT and PROJECT; Relational Algebra Operations from Set Theory; Binary Relational Operations: JOIN and DIVISION; Additional Relational Operations; Examples of Queries in Relational Algebra; Relational Database Design using ER- to-Relational Mapping. UNIT-3 5. SQL-THE RELATIONAL DATABASE STANDARD 10 Hrs SQL Data Definition and Data Types, Specifying Basic Constraints in SQL, Schema Change Statements in SQL; Basic Queries in SQL; More Complex SQL Queries; Insert, Delete and Update Statements in SQL; Additional Features of SQL; Specifying General Constraints as Assertion; Views (Virtual Tables) in SQL; Database Programming: Issues and Techniques; Embedded SQL, Dynamic SQL. UNIT-4 6. DATABASE DESIGN 12 Hrs. Informal Design Guidelines for Relation Schemas; Functional Dependencies; Normal Forms Based on Primary Keys; General Definitions of Second and Third Normal Forms; Boyce-Codd Normal Form; Properties of Relational Decompositions. UNIT-5 7. TRANSACTION PROCESSING CONCEPTS 5 Hrs. Introduction to transaction processing; transaction and system concepts; desirable properties of transactions, characterizing schedules based on recoverability and serializability; transaction support in SQL. 8. CONCURRENCY CONTROL & DATABASE RECOVERY TECHNIQUES 6 Hrs. Two phase locking techniques, Concurrency control based on Timestamp ordering; Recovery concepts; recovery based on deferred update and Immediate Update, Shadow Paging, ARIES Recovery Algorithm. TEXT BOOK: Elmasri and Navathe. Fundamentals of Database Systems. Ed 5. Pearson Education. 2003. Chapters: 1-3,5-11,17-19. Course Outcomes: After the completion of the course, the student will be able to: CO1 Describe the fundamentals of database technologies, Design an ER diagram and transform it to a relational model for a given database specification. CO2 Discuss the relational model concepts and Design relational algebraic expressions for queries. CO3 Explain the various concepts of SQL and Design SQL queries to perform CRUD(Create , Retrieve, Update and delete) operations on database. CO4 Discuss the database design concepts such as functional dependency and solve the problems on minimal set, equivalence set. CO5 Discuss the database design concepts such as Normalization, Relational decomposition and concepts of transaction processing. Apply the normalization techniques to improve database design.