🎓 Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

📑

University Syllabi

AKTU & AICTE aligned semester credit guidelines.

📝

Exam Question Papers

Previous 5 years solved university semester papers.

💡

Lab Manuals & Viva

Practical codes with outputs and interview questions.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

🎨 Computer Graphics (CG)

Scan Conversion, Bresenham Line & Circle, 2D/3D Transformations, Viewing & Clipping.

Unit 1: Raster Scan, DDA & Bresenham →
Unit 2: 2D & 3D Transformations →
Unit 3: Sutherland-Hodgman & Clipping →
Unit 4: Hidden Surface Elimination →

🧠 Machine Learning (ML / MLT)

Supervised/Unsupervised Learning, Regression, Decision Trees, SVM, Neural Nets & Clustering.

Unit 1: Linear & Logistic Regression →
Unit 2: Decision Trees & Support Vector (SVM) →
Unit 3: K-Means & Dimensionality Reduction →
Unit 4: Neural Networks & Gradient Descent →

🤖 Artificial Intelligence (AI)

Search Algorithms, First Order Logic, Probabilistic Reasoning, Expert Systems & Robotics.

Unit 1: Propositional Logic & Connectives →
Unit 2: Probabilistic Reasoning & Uncertainty →
Unit 3: State Space Search & Heuristics →
Unit 4: First Order Predicate Logic (FOL) →

🗄️ Database Management (DBMS)

ER-Modeling, Relational Algebra, SQL Queries, Normalization (1NF-BCNF) and ACID Transactions.

Unit 1: ER Model, Entities & Attributes →
Unit 2: Functional Dependencies & 1NF to BCNF →
Unit 3: ACID Properties & Concurrency Control →
Unit 4: Relational Algebra & Complex SQL Joins →

🌲 Data Structures & Algorithms

Arrays, Linked Lists, Stacks, Queues, Binary Trees, Graphs, Sorting & Asymptotic Analysis.

Unit 1: Arrays, Matrices & Recursion →
Unit 2: Stacks, Queues & Infix-to-Postfix →
Unit 3: Binary Trees, BST & AVL Rotations →
Unit 4: Graphs (BFS, DFS, Dijkstra, MST) →

⚡ Operating Systems

Process Scheduling, Deadlocks, Synchronization, Virtual Memory, Paging and Disk Management.

Unit 1: Process States, PCB & Multi-Threading →
Unit 2: CPU Scheduling (FCFS, SJF, RR) →
Unit 3: Deadlocks, Semaphores & Banker's Algo →
Unit 4: Virtual Memory, Paging & Disk Scheduling →

🌐 Computer Networks

OSI & TCP/IP Models, Error Detection, IPv4 Subnetting, Routing Protocols and TCP Handshake.

Unit 1: OSI vs TCP/IP Protocol Architectures →
Unit 2: Data Link Layer, Framing & Sliding Window →
Unit 3: IPv4 Addressing, Subnetting & Routing →
Unit 4: Transport Layer (TCP 3-Way Handshake) →

⚙️ Design of Algorithms (DAA)

Asymptotic Notations, Divide & Conquer, Dynamic Programming, Greedy Approach & Backtracking.

Unit 1: Time Complexity, Master's Theorem →
Unit 2: 0/1 Knapsack & Dynamic Programming →
Unit 3: Greedy Methods & Graph Algorithms →
Viewing All Lectures

CLR (1) Parsing

CLR (1) Parsing

CLR refers to canonical lookahead. CLR parsing use the canonical collection of LR (1) items to build the CLR (1) parsing table. CLR (1) parsing table produces the more number of states as compare to the SLR (1) parsing.

In the CLR (1), we place the reduce node only in the lookahead symbols.

Various steps involved in the CLR (1) Parsing:

  • For the given input string write a context free grammar
  • Check the ambiguity of the grammar
  • Add Augment production in the given grammar
  • Create Canonical collection of LR (0) items
  • Draw a data flow diagram (DFA)
  • Construct a CLR (1) parsing table

LR (1) item

LR (1) item is a collection of LR (0) items and a look ahead symbol.

LR (1) item = LR (0) item + look ahead

The look ahead is used to determine that where we place the final item.

The look ahead always add $ symbol for the argument production.

Example

CLR ( 1 ) Grammar

  1. S → AA  
  2. A → aA  
  3. A → b  

Add Augment Production, insert '•' symbol at the first position for every production in G and also add the lookahead.

  1. S` → •S, $  
  2. S  → •AA, $  
  3. A  → •aA, a/b   
  4. A → •b, a/b  

I0 State:

Add Augment production to the I0 State and Compute the Closure

I0 = Closure (S` → •S)

Add all productions starting with S in to I0 State because "." is followed by the non-terminal. So, the I0 State becomes

I0 = S` → •S, $
        S → •AA, $

Add all productions starting with A in modified I0 State because "." is followed by the non-terminal. So, the I0 State becomes.

I0=  S` → •S, $
        S → •AA, $
        A → •aA, a/b
        A → •b, a/b

I1= Go to (I0, S) = closure (S` → S•, $) = S` → S•, $
I2= Go to (I0, A) = closure ( S → A•A, $ )

Add all productions starting with A in I2 State because "." is followed by the non-terminal. So, the I2 State becomes

I2= S → A•A, $
       A → •aA, $
       A → •b, $

I3= Go to (I0, a) = Closure ( A → a•A, a/b )

Add all productions starting with A in I3 State because "." is followed by the non-terminal. So, the I3 State becomes

I3= A → a•A, a/b
       A → •aA, a/b
       A → •b, a/b

Go to (I3, a) = Closure (A → a•A, a/b) = (same as I3)
Go to (I3, b) = Closure (A → b•, a/b) = (same as I4)

I4= Go to (I0, b) = closure ( A → b•, a/b) = A → b•, a/b
I5= Go to (I2, A) = Closure (S → AA•, $) =S → AA•, $
I6= Go to (I2, a) = Closure (A → a•A, $)

Add all productions starting with A in I6 State because "." is followed by the non-terminal. So, the I6 State becomes

I6 = A → a•A, $
       A → •aA, $
       A → •b, $

Go to (I6, a) = Closure (A → a•A, $) = (same as I6)
Go to (I6, b) = Closure (A → b•, $) = (same as I7)

I7= Go to (I2, b) = Closure (A → b•, $) = A → b•, $
I8= Go to (I3, A) = Closure (A → aA•, a/b) = A → aA•, a/b
I9= Go to (I6, A) = Closure (A → aA•, $) = A → aA•, $

Drawing DFA:

CLR (1) Parsing

CLR (1) Parsing table:

CLR (1) Parsing 1

Productions are numbered as follows:

  1. S  →  AA      ... (1)                                  
  2.   A  → aA       ....(2)     
  3.   A  →  b     ... (3)  

The placement of shift node in CLR (1) parsing table is same as the SLR (1) parsing table. Only difference in the placement of reduce node.

I4 contains the final item which drives ( A → b•, a/b), so action {I4, a} = R3, action {I4, b} = R3.
I5 contains the final item which drives ( S → AA•, $), so action {I5, $} = R1.
I7 contains the final item which drives ( A → b•,$), so action {I7, $} = R3.
I8 contains the final item which drives ( A → aA•, a/b), so action {I8, a} = R2, action {I8, b} = R2.
I9 contains the final item which drives ( A → aA•, $), so action {I9, $} = R2.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>