Upload
lamthu
View
216
Download
1
Embed Size (px)
Citation preview
DEV BHOOMI INSTITUTE OF TECHNOLOGY
DEHRADUN
Department of Computer Science and Engg.
HAND BOOK
Session 2016-17
Class : 3rd yr / 6th sem
OPERATING SYSTEMS (TCS-601)Unit - IIntroduction: Operating System and Function, Evolution of Operating System, Batch, Interactive, Time Sharing and Real Time System, System Protection. Operating System Structure: System Components, System Structure, Operating System Services.Unit - IIConcurrent Processes: Process Concept, Principle of Concurrency, Producer / Consumer Problem, Critical Section Problem, Semaphores, Classical Problems in Concurrency, Inter Processes Communication, Process Generation, Process Scheduling, Threads.CPU Scheduling: Scheduling Concept, Performance Criteria, Scheduling Algorithm Evolution, Multiprocessor Scheduling.Unit - IIIDeadlock: System Model, Deadlock Characterization, Prevention, Avoidance and Detection, Recovery from Deadlock, Combined Approach.Memory Management: Basic Machine, Resident Monitor, Multiprogramming with Fixed Partition, Multiprogramming with Variable Partition, Multiple Base Register, Paging, Segmentation, Paged Segmentation, Virtual' Memory Concept, Demand Paging, Performance, Paged Replaced Algorithm, Allocation of Frames, Thrashing, Cache Memory Organization, Impact on Performance.Unit - IVFile Concept: Access Methods, Directory Structure, File System Mounting, File Sharing, Protection, File System Structure, File System Implementation, Directory Implementation, Allocation Methods, Free space Management, Kernel I/O Subsystems, Disk Structure, Disk Scheduling, Disk Management, Swap, Space Management.UNIT VLinux overview: Kernel Architecture, Process, memory, file and I/O management, Interprocess communication and synchronization, Security.Windows XP: System architecture, system management mechanisms, process, thread, memory and file management, I/O subsystem, Interprocess communication, Security.
Suggested Books and References:1. Milenekovie , "Operating System Concept", McGraw Hill.2. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, “Operating System Concepts”,John Wiley & Sons (ASIA) Pvt. Ltd, Seventh edition, 20053. Harvey M. Deitel, Paul J. Deitel, and David R. Choffnes, “Operating Systems”, PrenticeHall, Third edition, 20034. Petersons, "Operating Systems", Addision Wesley.5. Tannenbaum, "Operating System Design and Implementation", PHI.6. Stalling, Willium, "Operating System", Maxwell Macmillan7. Gary Nutt, "Operating System, A Modern Perspective", Addision Wesley.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : Operating System
Subject Code : TCS -601Faculty : Mr. Raman Raghav
Branch: CSE Semester: 6th
DBIT/BTech/CSE/06
DBIT DEHRADUN
LESSON PLAN
SEMESTER/YEAR: VI /III DEPARTMENT: CSE
COURSE: OPERATING SYSTEMS COURSE CODE: TCS-601
S.
No.
Topic Name
Reference/
Text Book/
Web
(R/T/W)
No. Of
Lectures
Delivery
Method
Remarks
UNIT - I
1 Introduction: Operating System and Function, Evolution of
Operating System
T1,R1 1 Chalk &Talk
2 Batch, Interactive, Time Sharing and Real Time System, System
Protection
T1,R1 2 Chalk &Talk
3 Operating System Structure: System Components T1,R1 1 Chalk &Talk
4 System Structure, Operating System Services T1,R1 1 Chalk &Talk
UNIT – II
5 Concurrent Processes: Process Concept, Principle of
Concurrency
T1,R1 2 Chalk &Talk
6 Producer / Consumer Problem, Critical Section Problem T1,R1 1 Chalk &Talk
7 Semaphores, Classical Problems in Concurrency T1,R1,R2 1 Chalk &Talk
8 Inter Processes Communication, Process Generation, Process
Scheduling
T1,R1 2 Chalk &Talk
9 Threads, CPU Scheduling: Scheduling Concept T1,R1,R2 2 Chalk &Talk
10 Performance Criteria, Scheduling Algorithm T1,R1 2 Chalk &Talk
11 Evolution, Multiprocessor Scheduling T1,R1 1 Chalk &Talk
UNIT – III
12 Deadlock: System Model, Deadlock Characterization,
Prevention, Avoidance and Detection
T1,R2 2 Chalk &Talk
13 Recovery from Deadlock Combined Approach T1,R1 1 Chalk &Talk
14 Memory Management: Basic, Machine, Resident Monitor T1,R2 1 Chalk &Talk
15 Multiprogramming with Fixed Partition,with Variable Partition T1,R2 1 PPT
16 Multiple Base Register, Paging, Segmentation, Paged
Segmentation
T1,R2 2 Chalk &Talk
17 Virtual' Memory Concept, Demand paging, Performance, T1,R1,R2 1 Chalk &Talk
18 Paged Replaced Algorithm, Allocation of Frames, Thrashing T1,R1,R2 2 Chalk &Talk
19 Cache Memory Organization, Impact on Performance T1,R1,R2 1 Chalk &Talk
UNIT – IV
20 File Concept: Access Methods, Directory Structure T2,W2,R1 1 Chalk &Talk
21 File System Mounting, File Sharing, Protection T2,W1,W2 1 Chalk &Talk
DBIT/BTech/CSE/06
22 File System Structure, File System Implementation, Directory
Implementation
T2,W2,R1 1 Chalk &Talk
23 Allocation Methods, Free space Management T2,W2,R2 2 Chalk &Talk
24 Kernel I/O Subsystems, Disk Structure, Disk Scheduling T2,W2,R2 2 Chalk &Talk
25 Disk Management, Swap, Space Management T2,W2 1 PPT
UNIT – V
26 Linux overview: Kernel Architecture, Process, memory T1,R1,R2 1 Chalk &Talk
27 file and I/O management T1,R1,R2 1 Chalk &Talk
28 Interprocess communication and synchronization, Security. T1,R1,R2 1 Chalk &Talk
29 Windows XP: System architecture, system management
mechanisms, process
T2,W2,R2 2 Chalk &Talk
30 thread, memoryand file management, I/O subsystem T2,W2,R2 1 Chalk &Talk
31 Interprocess communication, Security T2,W2 1 Chalk &Talk
Total Lectures: 42
REMARKS/RECOMMENDATIONS FOR FUTURE:
EXTRA CLASS TAKEN (IF ANY):
TEXT BOOKS:
[T1]. Stalling, Willium, "Operating System", Maxwell Macmillan
[T2]. Tannenbaum, "Operating System Design and Implementation", PHI.
REFERENCE BOOKS:
[R1]. Harvey M. Deitel, Paul J. Deitel, and David R. Choffnes, “Operating Systems”, Prentice Hall, Third edition, 2003
[R2]. Petersons, "Operating Systems", Addision Wesley.
WEB RESOURCE:
1:http://www.howtogeek.com/
2:https://www.cs.uic.edu
3:https://books.google.co.in/books?id=Fy8_GF42WCIC
Signature of HOD:__________
Date: __________
1. Why does caching result in a speed-up most of the time? In which situations will
caching not work?
2. What is root partition?
3. In which state is a process in if it has the CPU?
4. State various states of a process.
5. An Integer variable that is used to manage concurrent processes is called…..
6. Dijkstra’s banking algorithm for resource allocation is used for…..
7. …… is the smallest unit for processing that consists of a program counter, a stack &
a set of registers.
8. …… is a system call of OS that is used to create a new process.
9. ….. is a system call that causes the caller to block.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : OPERATING SYSTEMS Assignment No: 1
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 1
Date of Issue: Date of Submission:
1. Why Might Menu-Driven Interfaces Be Bad?
2. Draw Gnat chart and calculate average waiting time, turnaround time by Using SJF-
preemptive algorithms.
Process Burst Time Arrival Time
P1 5 0
P2 2 1
P3 3 2
P4 4 3
3. Consider a variant of the RR scheduling algorithm where the entries in the ready queue are
pointers to the PCBs.
i. What would be the effect of putting two pointers to the same process in the ready queue?
ii. What would be the major advantages and disadvantages of this scheme?
4. How would you modify the basic RR algorithm to achieve the same effect without the
duplicate pointers?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : OPERATING SYSTEMS Assignment No: 2
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 2 Date of Issue: Date of Submission:
1.Explain Banker’s Algorithm.
i) Determine whether the system is in safe state for the following system state:-
Allocation Max Available
P1 A B C D A B C D A B C D
P2 0 0 1 2 0 0 1 2 1 5 2 0
P3 1 0 0 0 1 7 5 0
P4 1 3 5 4 2 3 5 6
P5 0 6 3 2 0 6 5 2
P6 0 0 1 4 0 6 5 6
ii) Check if Request R( 0220) by process P2 can be granted? (for the state given in previous
question).
2. How can semaphores be used to protect critical sections? Which programming errors can
occur?
3. What are safe and unsafe states? How can you determine whether a state is safe or
unsafe?
4. What are resource allocation graphs?
5. What factors determine whether a detection-algorithm must be utilized in a deadlock
avoidance system?
6. The performance of Round Robin (RR) scheduling depends on……
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : OPERATING SYSTEMS Assignment No: 3
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 3 Date of Issue: Date of Submission:
1. Describe file system structure. Suppose that a disk drive has 3000 cylinders, numbered 0-
2999.This drive is currently serving a request at cylinder 185 and the previous request was at
143.The queue of pending request is
67, 1530,963,1673,641,1612,923,1543,243
Starting from the current head position, what is the total distance move by disk arm to satisfy
all pending request for FCFS and CSCAN disk scheduling algorithm?
2. Explain File system mounting in detail. Take Unix file system and Explain the same.
3. Explain Directory Structures in detail.
4. Why free space management is important? Explain different methods of free space
management.
5. What is Swap space? Explain swap space management in detail.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : OPERATING SYSTEMS Assignment No: 4
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 4
Date of Issue: Date of Submission:
1. Discuss LINUX and Windows XP features in brief.
2. Explain memory and file management In Windows XP.
3. What is Buddy System? How process management is done in Linux operating system?
4. Define system components of Windows XP operating system.
5. Draw architecture of UNIX Operating system.
6. What is the purpose of using libaio package in Ubuntu?
7. A variant of deadlock is called….
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : OPERATING SYSTEMS Assignment No: 5
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 5
Date of Issue: Date of Submission:
1. What is meant by operating systems? Differentiate between distributed and clustered
systems?
2. Which systems are called tightly coupled systems?
3. Difference between Batch Systems and Time sharing systems.
4. What is kernel?
5. What are the different types of Systems available?
6. Differentiate between Hard –Real time systems and Soft-RTS.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No.1
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: UNIT 1 Date of Discussion:
1. What are the advantages of Multiprocessing System?
2. Explain Distributed System?
3. Explain Real time system?
4. Write a short note on layered approach of Operating System.
5. Under what circumstances would a user be better off using a time sharing system rather
than a PC or single-user workstation?
6. Give the operating system functions and services.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No. 2
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: UNIT 1 Date of Discussion:
1. What is process and process control block (PCB)? Explain its different states.
2. What is the fundamental difference between a process and a thread?
3. What is meant by IPC?
4. What is meant by semaphores? Define Critical section.
5. What are the requirements that must required for Critical section algorithms.
6. What are the constraints in Dinning philosopher’s algorithm?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No.3
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: Unit 1 Date of Discussion:
1. What is meant by mutual exclusion?
2. Declare the structure for monitors.
3. Declare the structure for Critical section.
4. List out two methods for synchronous and Asynchronous tasks.
5. Explain briefly about Readers/Writers problem in classical synchronization.
6. Explain synchronization and buffering in message passing system for Inter process
communication (IPC).
7. Explain shared memory model and message passing models for process communication
with diagram.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No. 4
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: Mutual Exclusion & Critical section Date of Discussion:
1. What is process? Explain long term scheduler and short term scheduler?
2. Why is it important for the scheduler to distinguish I/O-bound programs from CPU-
bound programs?
3. Discuss how the following pairs of scheduling criteria conflict in certain settings
a) CPU utilization and response time.
b) Average turnaround time and maximum waiting time.
c) I/O device utilization and CPU utilization.
4. Consider a variant of the RR scheduling algorithm where the entries in the ready queue
are pointers to the PCBs.
i. What would be the effect of putting two pointers to the same process in
the ready queue?
ii. What would be the major advantages and disadvantages of this
scheme?
5. Draw Gnat chart and calculate average waiting time, turnaround time by Using SJF-
preemptive algorithms.
Process Burst Time Arrival Time
P1 5 0
P2 2 1
P3 3 2
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No. 5
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: CPU Scheduling Date of Discussion:
P4 4 3
1. Draw Gnat chart and calculate average waiting time, turnaround time by using FCFS
algorithm.
Process Burst Time Arrival Time
P1 17 0
P2 4 0
P3 5 0
P4 7 0
2. Draw Gnat chart and calculate average waiting time, turnaround time by Using SJF Non-
preemptive algorithms.
Process Burst Time Arrival Time
P1 6 0
P2 3 3
P3 8 4
P4 7 7
3. Define Turnaround time, waiting time, response time and throughput.
4. Consider a variant of the RR scheduling algorithm where the entries in the ready queue
are pointers to the PCBs.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No. 6
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: Scheduling Date of Discussion:
i. What would be the effect of putting two pointers to the same process in
the ready queue?
ii. What would be the major advantages and disadvantages of this scheme?
iii. How would you modify the basic RR algorithm to achieve the same effect
without the duplicate pointers?
5. Which of the following scheduling algorithms could result in starvation and why?
I. First-come, first-served.
II. Shortest job first.
III. Round robin.
IV. Priority.
6. Consider a system implementing multilevel queue scheduling. What strategy can a
computer user employ to maximize the amount of CPU time allocated to the user’s
process?
1. What do you understand by Virtual memory?
2. Explain the difference between internal and external fragmentation.
3. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in
order), how would each of thefirst-fit, best-fit, and worst-fit algorithms place processes of 212
KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of
memory?
4. Explain external and internal fragmentation.
5. On a system with paging, a process cannot access memory that it does not own; why? How
could the operating system allow access to other memory? Why should it or should it not?
6. Compare paging with segmentation with respect to the amount of memory required by the
address translation structures in order to convert virtual addresses to physical addresses.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : OPERATING SYSTEMS Tutorial Sheet No. 7
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: Memory Management Date of Discussion:
1. What is the purpose of paging the page tables?
2. Calculate page faults for given page series with the help of FIFO, OPTIMAL, LRU algorithm.
Page series: 0 8 9 5 8 4 8 6 5 4 8 4 5 9 5 8 9 0 8 9.
3. Consider a swapping system in which memory consists of the following hole sizes in
memory order:
10 B, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB, and 15 KB. Which hole is taken for successive
segment requests of
a. 12 KB
b. 10 KB
c. 9 KB
4. What is the difference between a physical address and a logical address?
5. Is it possible for a process to have two working sets? One representing data and another
representing code? Explain.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name :OPERATING SYSTEMS Tutorial Sheet No. 8
Subject Code : TCS 601
Faculty : RAMAN RAGHAV
Branch: CSE
Semester:VI
Unit/Title: Paging Date of Discussion:
1. How will you define an operating system? Explain both user view and system view.
2. Explain Operating system Services.
3. Difference between Batch Systems and Time sharing systems.
4. What is kernel?
5. What is system call? Give some system calls related to process creation and termination.
6. What are the different types of Systems available?
7. What are the advantages of Multiprocessing System?
8. Explain Distributed System?
9. Explain Real time system?
10. Write a short note on layered approach of Operating System.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Subject Name : OPERATING SYSTEMS
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT 1
1. What is Race condition? Explain with the help of an example.
2. What is a Process? Draw process state diagram with its meaning.
3. What is process and process control block (PCB)? Explain its different states.
4. What is the fundamental difference between a process and a thread?
5. What do you mean by binary semaphore? What is busy waiting condition?
6. What is Inter-process-communication?
7. Define Critical section Problem. What are the requirements that must be fulfilled by its
solution?
8. What are the constraints in Dinning philosopher’s algorithm?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Subject Name : OPERATING SYSTEMS
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT II
1.What is Deadlock? How it occurs? Explain different ways to handle it.
2.Describe Banker’s algorithms for deadlock avoidance, also discuss recovery from deadlock.
3.What do you understand by Virtual memory?
4. Differentiate between internal fragmentation and external fragmentation. How it can be
reduced? Explain.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Subject Name : OPERATING SYSTEMS
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT III
1. Explain File system mounting in detail. Take Unix file system and Explain the same.
2. Explain Directory Structures in detail.
3. Why free space management is important? Explain different methods of free space
management.
4. What is Swap space? Explain swap space management in detail.
5. Explain different Allocation methods in file system implementation. How free space can be
managed?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Subject Name : OPERATING SYSTEMS
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT IV
1. Draw architecture of UNIX Operating system.
2. Discuss LINUX and Windows XP features in brief.
3. Explain memory and file management In Windows XP.
4. What is Buddy System? How process management is done in Linux operating system?
5. Define system components of Windows XP operating system.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Subject Name : OPERATING SYSTEMS
Subject Code : TCS -601
Faculty : RAMAN RAGHAV
Branch: CSE Semester: VI
Unit/Title: UNIT V
COMPILER DESIGN (TCS-602)
Unit-IIntroduction to Compiler, Phases and passes, Bootstrapping, Finite state machines and regular expressions and their applications to lexical analysis, Implementation of lexical analyzers, lexical-analyzer generator, LEXcompiler,Formal grammars and their application to syntax analysis, BNF notation, ambiguity, YACC.The syntactic specification of programming languages : Context free grammars, derivation and parse trees, capabilities of CFG.Unit-IIBasic Parsing Techniques: Parsers, Shift reduce parsing, operator precedence parsing, top down parsing, predictive parsers Automatic Construction of efficient Parsers :LR parsers, the canonical Collection of LR(0) items, constructing SLR parsing tables, constructing Canonical LR parsing tables, Constructing LALR parsing tables, using ambiguous grammars, an automatic parser generator, implementation of LR parsing tables, constructing LALR sets of items.Unit-IIISyntax-directed Translation: Syntax-directed Translation schemes, Implementation of Syntax- directed Translators, Intermediate code, postfix notation, Parse trees & syntax trees, three address code, quadruple & triples, translation of assignment statements, Boolean expressions, statements that alter the flow of control, postfix translation, translation with a top down parser.More about translation: Array references in arithmetic expressions, procedures call, declarations, case statements.Unit-IVSymbol Tables: Data structure for symbols tables, representing scope information. Run-TimeAdministration: Implementation of simple stack allocation scheme, storage allocation in block structured language. Error Detection & Recovery: Lexical Phase errors, syntactic phase errors semantic errors.Unit-VIntroduction to code optimization: Loop optimization, the DAG representation of basic blocks, value numbers and algebraic laws, Global Data-Flow analysis.Implementation of a subset of C using YACC.References:1. Aho, Sethi & Ullman, "Compiler Design", Addision Wesley/ Pearson.2. O. G. Kakde; Compiler Design,4/e; Universities Press (2008)3. Chattopadhyay Santanu; Compiler Design; Phi Learning (2009)
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : Compiler Design
Subject Code : TCS -602Faculty : Mr. Dhajvir Rai
Branch: CSE Semester: 6th
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
LESSON PLAN
SEMESTER/YEAR: 6th
/3rd
DEPARTMENT: COMPUTER SCIENCE & ENGG
COURSE: COMPILER DESIGN CODE: TCS-602
S.
No.
Topic Name
Reference/
Text Book/
Web
(R/T/W)
No. Of
Lectures
Delivery
Method
Remarks
1. Introduction to Compiler, Phases and passes T1,R1 2 Chalk & Talk
2. Bootstrapping T1,R1 1 Chalk & Talk
3. Finite state machines and regular expressions and their
applications to lexical analysis,
T1,T2 2 Chalk & Talk
4. Implementation of lexical analyzers T1,R1 2 Chalk & Talk
5. lexical-analyzer generator T1,R1 1 Chalk & Talk
6. LEXcompiler T1,T2 1 Chalk & Talk
7. Formal grammars and their application to syntax analysis T1,R1 2 Chalk & Talk
8. BNF notation T1,R1 1 Chalk & Talk
9. Ambiguity, YACC T1,R1 2 Chalk & Talk
10. The syntactic specification of programming languages :
Context free grammars
T1,R1 1 Chalk & Talk
11. Grammars, derivation and parse trees, capabilities of CFG T1,R1 2 Chalk & Talk
12 Basic Parsing Techniques: Parsers, Shift reduce parsing,
operator precedence
T1,R1 1 Chalk & Talk
13. Parsing, top down parsing, predictive parsers T1,R1 1 Chalk & Talk
14. Automatic Construction of efficient Parsers T1,T2 2 Chalk & Talk
15. LR parsers, the canonical Collection of LR(0) items T1,R1 2 Chalk & Talk
16. Constructing SLR parsing tables T1,R1 1 Chalk & Talk
17. Constructing Canonical LR parsing tables T1,R1 2 Chalk & Talk
18. Constructing LALR parsing tables using ambiguous grammars T1,R1 1 Chalk & Talk
19. An automatic parser generator, implementation of LR parsing
tables, constructing LALR sets of items.
T2,R1 2 Chalk & Talk
20. Syntax-directed Translation: Syntax-directed Translation
schemes
T2 2 Chalk & Talk
21. Implementation of Syntax- directed Translators, Intermediate
code, postfix notation
T2,R1 1 Chalk & Talk
22. Parse trees & syntax trees, three address code, quadruple &
triples
T2 2 Chalk & Talk
23. Translation of assignment statements, Boolean expressions,
statements that alter the flow of control
T2,R1 2 Chalk & Talk
24. Postfix translation, translation with a top down parser. T2 1 Chalk & Talk
25. More about translation: Array references in arithmetic
expressions, procedures call,
declarations, case statements.
T2,R1 2 Chalk & Talk
26. Symbol Tables: Data structure for symbols tables, representing
scope information
T2 2 Chalk & Talk
27. Run-Time Administration: Implementation of simple stack
allocation scheme
T1 2 Chalk & Talk
28. Storage allocation in block structured language. Chalk & Talk
29. Error Detection & Recovery: Lexical Phase errors, syntactic
phase errors semantic errors.
T1,T2 2 Chalk & Talk
30. Introduction to code optimization: Loop optimization, the
DAG representation of basic
blocks
T2 2 Chalk & Talk
31. Value numbers and algebraic laws, Global Data-Flow analysis T1 2 Chalk & Talk
32. Implementation of a subset of C using YACC. T1,R1 2 Chalk & Talk
Total Lectures: 52
REMARKS/RECOMMENDATIONS FOR FUTURE:
EXTRA CLASS TAKEN (IF ANY):
TEXT BOOKS:
[T1] Aho, Sethi & Ullman, "Compiler Design", Addision Wesley/ Pearson
[T2] O. G. Kakde; Compiler Design,4/e; Universities Press (2008)
REFERENCE BOOKS:
[R1] Chattopadhyay Santanu; Compiler Design; Phi Learning (2009)
Signature of HOD:__________
Date: __________
1. Describe different phases of a compiler with the help of a neat diagram.
2. What are syntax trees? How these can be constructed?
3. Differentiate between phase and pass of a compiler.
4. Briefly explain the term “Compiler writing tools”.
5. What do you mean by cross compilation? Briefly explain.
6. What are assembler, compiler and interpreter? How these are related to each other?
7. Discuss the lexical analysis phase of the compiler with the help of an example.
8. What do you mean by a translator? Explain any three categories of translator.
9. Discuss any two problems which are encountered during code generation.
10. What are the characteristics of a good translator?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name:Compiler Design Assignment No. 1
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: 1/ Introduction to Compiler
Date of Issue: Date of Submission:
1. Describe algorithm to convert NDFA into DFA.
2. Construct a finite automaton accepting the set of all strings of zeros and ones; with at most one
pair of consecutive zeros and at most one pair of consecutive ones.
3. What is the importance of lexical analyzer in a compiler?
4. What sets to strings do the following R.E2s describe.
i) {a b} {b/a}
ii) digit {digit}/ є (0/2/4/6/8) where digit represents 0/1/2/ …… /9.
5. What is meant by input buffering? How is it useful in design of lexical analyzer?
6. Write the algorithm to minimize the number of states in a DFA. Apply this algo to minimize the
states of the following DFA:
State Inputs
a b
Start A B C
B B D
C B C
D B E
Accept E B C
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name:Compiler Design Assignment No. 2
Course Code:TCS-602
Faculty : Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: II/ Basic Parsing Techniques
Date of Issue: Date of Submission:
7. What are Regular expressions? Discuss the procedure with example conversion of regular
expression into finite automata and vice-versa. Also discuss how to minimize the number of
states of a DFA.
8. Explain the syntax directed translation scheme for desk calculator. Also show the sequence of
moves by parser for the input string 30/5+4$.
9. Explain the syntax directed translation scheme for desk calculator which performs +, * operations
of simple data type. Also compute 23+5*45$.
10. Give a parse tree for the input string:
i + i (i * i)#
1. What do you mean by a parse tree? How is it drawn? Explain with some example.
2. Define operator precedence grammar? How operator precedence relations are defined for a pair
of terminals a and b.
3. What is a Top-Down parser? Consider the grammar S -> aSa/aa. By tracing through the steps of a
top-down parser, which tries alternate aSa before aa, show that S succeeds on 2,4 or 8 a’s but fails
on 6 a’s.
4. What do you understand by ambiguous grammar? How ambiguity can be removed? Explain with
example.
5. What is intermediate code? What intermediate codes are used in compilers? Explain.
6. What do you understand by a handle? Explain the stack implementation of shift reduce parser
with the help of example.
7. What is a context free grammar? Augmented grammar? What are the problems that may occur
during parsing of these? Discuss the detail with an example.
8. Explain predictive parser. Also explain shift reduce parsing.
9. What are quadruples, triples and indirect triples? Give examples.
10. Explain recursive-descent and predictive parsing.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name:Compiler Design Assignment No. 3
Course Code:TCS-602
Faculty : Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: III/ Syntax-directed Translation
Date of Issue: Date of Submission:
1. Write the algorithm for construction of SLR parsing table. Write the sets of LR(0) items for the grammar
E E + T | T
T T * F | F
F (E)
T id
2. Show that the following grammar S Aa/bAc/dc/bda
A d
Is LALR(1) but not SLR (1).
3. Convert the regular expression (a+b)*aba(a+b)* into the corresponding DFA.
4. Consider the grammar S (L) | a
L L, S | S
a) What are the terminals, non-terminals and start symbol?
b) Find parse tree for the following sentences:
i) (a,a)
ii) (a, ((a,a),(a,a)))
c) Construct a leftmost derivation for each of the sentences in (b) above.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name:Compiler Design Assignment No. IV
Course Code:TCS-602
Faculty : Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: IV/ Symbol Tables
Date of Issue: Date of Submission:
5. Explain the function of LR parsers. Give algorithm for constructing SLR parsing table. Also construct the SLR table for grammar:
Є Є + T Є T T T * F T F F (Є) F id
6. Write quadruples, triples and indirect triples for the expression:
-(a + b) * (c + d) – (a + b + c)
7. Consider the grammar
S a | ^ | (T) T T, S | S Find the right most derivation for (a,(a,a)).
8. Consider the grammar
S a | ^ | (T) T T, S | S Show the steps of a shift-reduce parser for the rightmost derivation. 9. Consider the grammar
E TE’ E’ + T’ | E T FT’ T’ * FT’ | E F (E) | id
Compute FIRST and FOLLOW for each non-terminal of above grammar.
10. Construct a parsing table for above.
1. Explain in detail labeling algorithm used in code generation.
2. What are the contents of a symbol table? Give a brief description of each.
3. How symbol table space can be re-used. Give some example.
4. What are symbol tables? Explain their significance.
5. Write a detailed note on error detection and recovery.
6. Write about code optimization.
7. What is meant by register allocation? Why is considered to be important?
8. What do you mean by peephole optimization? What are the areas where it can be applied?
9. What is three address code? Write any five common kind of three address statements found in
programs.
10. Write short notes on the following:
a) Problems in code generation
b) Register allocation and register assignment
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name:Compiler Design Assignment No. V
Course Code: TCS-602
Faculty : Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: V/ Introduction to code optimization
Date of Issue: Date of Submission:
Q1: Consider the context free grammar
S -> S S + | S S *| a
a) Show how the string aa+a* can be generated by this grammar.
b) Construct a parse tree for this string.
c) What language is generated by this grammar? Justify your answer.
Q2: What language is generated by the following grammars? In each case justify your answer.
a) S ->0S1| 01
b) S -> +SS| -SS | a
c) S ->S(S)S | €
d) S -> aSbS | bSaS | €
d) S -> a | S+S | SS | S* | (S)
Q3: What is the input alphabet of the following language?
a) Pascal
b) C
c) Fortan 77
d) Ada
e) Lisp
Q4: Identify the lexemes that make up the tokens in the following programs.
Give reasonable attribute values for the tokens.
a) Pascal
Function max( i , j : integer) : integer;
{
Return maximum of integers i and j }
Begin
If i>j then max := i
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name:Compiler Design Tutorial Sheet No. 1
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: 1/ Introduction to Compiler Date of Discussion:
Else max := j
End;
b) C
int max ( i , j) int i , j;
/* return maximum of integers i and j */
{
Return i>j? i:j;
}
b) Fortran 77
FUNCTION MAX(I , J)
RETURN MAXIMUM OF INTEGERS I AND J
IF (I.GT.J) THEN
MAX =I
ELSE
MAX = J
END IF
RETURN
Q5: Discuss about the Lexical Analysis.
Q1: In the string of length n, how many of the following are there?
a) prefixes b) suffixes c) substrings d) proper prefixes e) subsequences
Q2: Construct the DFA for
a) (a/b)* aba b) (a/b)* aba (a/b)* c) All strings of 0’s & 1’s divisible by 5,3 d) For 2’s complement , 1’s complement.
Q3 : For the input expression (4*7+1)*2,construct an annotated parse tree according to the syntax-directed definition of fig 5.2 of Ullman Sethi . . Q4: Construct the parse tree and the systax tree for the expression ((a)+(b)) according to a) the syntax-directed definition of fig 5.9 of ullman sethi b) the translation scheme of fig 5.28 of ullman sethi Q5: Construct the dag and identify the value number for the subexpression of the following expression,assuming + associates from the left a+a+(a+a+a+(a+a+a+a)).
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 2
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: II/ Basic Parsing Techniques Date of Discussion:
Q1: Give a systax-directed definition to differentiate expressions formed by applying the arethematic operators + and * to the variable x and constants. Assume no simplifiacation takes place. Q2: The following grammar generates expressions formed by applying an arithematic operator + to integer and real constants. When two integers are added,the resulting type is integer,otherwise,it is real. E->E+T|T T->num.num|num a) Give a syntax-directed definition to determine the type of each subexpression. b) Extended the syntax-directed definition of (a) to translate expression into postfix notation as well as determine types.use the unary operator inttoreal
to convert an integer value into an equivalent real value, so that both operands of + in the postfix form have the same type.
Q3: Let systhesized attribute val give the value of the binary number generated. by S in the following grammar input=101.101 S.val=5.625 S->L.L|L L->LB|B B->0|1 a) Use sysnthesized attribute to determine S.val. b) Determine S.val with a syntax-directed definition in which the only synthesized attribute of B is c,giving the contribution of the bit generated
by B to the final value.
Q4: Suppose declarations are generated by the following grammar D->id L L->,id L| : T T->integer | real
a) Construct a translation scheme to enter the type of each indentifier into the table,as in Eg: 5.3 of Ullman Sethi
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 3
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: III/ Syntax-directed Translation Date of Discussion:
b)Construct a predictive translator from the translation scheme in (a). Q5: The following grammar is ambigous version of the underlying grammar in fig 5.22 of Ullman Sethi. The braces are used only for grouping boxes and are eliminated during translation S->L L-> L B| B B-> B sub F | F F-> {L} | text a) Adapt the syntax-directed definition in fig 5.22 (Ullman Sethi) to use the above grammar.
b) Convert the syntax-directed definition of (a) into a translation scheme.
Q1: The tranlation scheme in fig 5.24 (Ullman Sethi) is transformed below into the translation scheme in fig 5.25(Ull.Set.)The new scheme produce the annoted parse tree of fig 5.26. for the expression 9-5+2. The arrow in the figure suggest a way of determining the value of the expression.
E->E1 + T {E.val:=E1.val + T.val} E->E1 - T {E.val:=E1.val - T.val} E-> T {E.val:=T.val} T->(E) {T.val:=E.val} T->num {T.val:=num.val} Q2: Using the scope rules of pascal ,determine the declarations that apply to each occurance of the names
a and b.The output of the program consists of integers 1 through 4.
program a(input,output);
procudure b(u,v,x,y:integer);
var a: record a,b:integer end;
b: record b,a:integer end;
begin
with a do begin a:=u;b:=v end;
with b do begin a:=x;b:=y end;
writeln(a.a,a.b,b.a,b.b)
end;
begin
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 4
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: IV/ Symbol Tables Date of Discussion:
b(1,2,3,4)
end.
Q3: What is printed by the program assuming
a.)call-by-value,
b.)call-by-reference,
c.)copy-restore linkage,
d.)call-by-name.
program main(input,output);
procedure p(x,y,z);
begin
y:=y+1;
z:=z+x;
end;
begin
a:=2;
b:=3;
p(a+b,a,a);
print a
end.
Q4: When a procedure is passed as a parameter in a lexically scoped language,its nonlocal environvent
can be passed using an access link.Give an algorithm to determine this link.
Q5: The three kinds of environments that could be associated with a procedure passed as a parameter are
illustrated by the Pascal program in Fig. given below.
The lexical ,passing and activation environments of such a procedure consists of the bindings of
identifiers at the point at which the procedure is defined,passed
as a parameter, and activated; respectively. Consider function f, passed as a parameter on line 11.
(1) program param(input, output);
(2) procedure b( function h)n: integer): integer);
(3) var m : integer:
(4) begin m := 3; writeln(h(2)) end {b};
(5) procedure c;
(6) var m : integer:
(7) function f(n: integer): integer;
(8) begin f := m+n end {f};
(9) procedure r;
(10) var m : integer:
(11) begin m := 7; b(f) end {r};
(12) begin m := 0; r end {c};
(13) begin
(14) c
(15) end
Using the lexical, parsing, and activation environments for f, nonlocal m on line 8 is in the scope of the
declarations of m on lines 6, 10, and 3, respectively.
a) Draw the activation tree for this program. b) What is the output of the program, using the lexical, passing , and activation environments
for f? c) Modify the display implementation of a lexically scoped language to set up the lexical
environment correctly when a procedure passed as a parameter is activated.
Q1: Discuss about the Dangling References along with appropriate example. Q2: Discuss about the -- Call by value. -- Call by reference -- Call by value result -- Call by copy store Q3: Translate the arithmetic expression a*-( b+c) into
a) a syntax tree b) postfix notation c) three-address code
Q4: Translate the expression -( a+b) * (c+d) +( a+b+c) into
a) quadruples b) triples c) Indirect triples
Q5: translate the executable statements of the following C program main() { int i ; int a[10]; i = 1; while (i<=10) { a[i] = 0; i = i+1; } } into
a) a syntax tree b) postfix notation
three-address code.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 5
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: V/ Introduction to code optimization Date of Discussion:
Q1: The syntax directed definition in fig 8.24(Ullman Sethi) translates E-> id1 < id2 into pair of statements If id1 < id2 goto…… goto……. We could translate instead into the single statement If id1>= id2 goto_ & fall through the code when E is true. Modify the definition in fig 8.24 to generate code of this nature. Q2: Translate the following assignment statement into three-address code Using the translation scheme in section 8.3 (Ullman Sethi). A[i , j] :=B[i ,j] + C[A[k ,l]] + D[i+j] Q3: In C, the for statement has the following form: for (e1 ; e2 ;e3 ) stmt Taking its meaning to be e1; while (e2) { stmt; e3; } Construct a syntax-directed definition to translate C-style for statements into three-address code. Q4: Consider the statement while a < b do if c < d then x := y + z else x := y – z obtain the code using control-flow translation of Boolean expressions. Q5 Using control-flow translation of Boolean expressions obtain the code of the following expression a < b or c < d and e < f
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 6
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: V/ Introduction to code optimization Date of Discussion:
Q1. Explain various form of intermediate code with some suitable examples.
Q2. Write a marker non terminal symbol? Write a translation scheme to convert an input expression to postfix
expression form such that all actions appear at the end of the right hand side of productions.
Q3. Write a Syntax Directed Definition and evaluate 9*3+2 with parser stack using LR parsing method.
Q4. Explain the Synthesized attribute and Inherited attribute with suitable example.
Q5. Construct a DAG for a+a*(b-c)+(b-c)*d.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 7
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: Symbol Tables Date of Discussion:
Q1. What are the types of three address statement. Describe the implementation of three address code. Q2. What is an array? Generate the three address code for the expression x:=A[I,j] for an array 10*20. Assume low1=1 and low2=1. Q3. What is Boolean expression? Generate three address code for While(i<10) { X=0; I=i+1; } Q4. Using Backpatching, generate an intermediate code for following expression. A<B OR C<D AND P<Q Q5. Generate a three address code for the following segment of code. C=0 do { if(a<b) x++; Else x--; C++; } while(C<5)
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Compiler Design Tutorial Sheet No. 8
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: Symbol Tables Date of Discussion:
1) What is compiler? Mention few cousins of compiler.
2) What is the role of lexical analyzer?
3) State any two reasons as to why phases of compiler should be grouped.(or) How will you
group the phases of the compiler?
4) Define the following terms: Interpreter, linker, and Translator.
5) Define tokens, patterns and lexemes.
6) What are the possible error recovery actions in lexical analyzer?
7) Write the regular expression for identifier and whitespace.
8) Why is buffering used in lexical analysis? What are the commonly used buffering methods?
9) Give the transition diagram for an identifier.
10) Compare syntax tree and parse tree.
11) Mention the issues in a lexical analyzer.
12) Differentiate between compiler and interpreter.
13) Compare the features of DFA and NFA.
14) Give some compiler construction tools.
15) Define Regular expression. Differentiate syntax and semantics.
16) What is sentinel? And define symbol table?
17) Compare NFA and DFA.Construct a DFA directly from an augmented regular expression
(a|b)* abb.
18) Convert the following regular expression into minimized DFA (i).(a/b)*baa
19) Draw the DFA for the augmented regular expression (a|b)*# directly using syntax tree.
20) Elaborate Recognition of tokens. (ii).Explain in detail about the a language for specifying
lexical analyzer.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
Question Bank
Course Name: Compiler Design(TCS-602)
Course Code:TCS-603
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: I/ Introduction to Compiler
Date of Issue: Date of Submission:
1) Write the rule to eliminate left recursion in a grammar and Eliminate the left recursion for
the gra ar S → Aa | A →A | Sd |ε 2) Define handle pruning.
3) Mention the two rules for type checking.
4) What is dangling reference?
5) Define an ambiguous grammar.
6) List various types of grammars.
7) What is Phrase level error recovery?
8) What are the limitations of static allocation?
9) Give examples for static check.
10) What are the different storage allocation strategies?
11) What is meant by Predictive parsing and shift reduce parsing?
12) Define Top Down parsing and Bottom Up parsing?
13) What do you mean by Recursive Descent Parsing?
14) Mention the properties of parse tree?
15) Mention the Role of semantic analysis.
16) What is meant by an operator grammar? Give an example.
17) List the advantages and disadvantages of operator precedence parsing?
18) State error recovery in operator-Precedence Parsing
19) What is meant by viable prefixes?
20) What are kernel and non kernel items
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
Question Bank
Course Name: Compiler Design(TCS-602)
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: II/Parsing Techniques
Date of Issue: Date of Submission:
1) Define back patching.
2) What is the significance of intermediate code?
3) Write the various three address code form of intermediate code.
4) Draw syntax tree for the expression a=b*-c+b*c and a=b*-c+b*-c=
5) What are the types of three address statements?
6) List out the benefits of using machine –independent intermediate forms.
7) What is syntax tree? Draw the syntax tree for the following statement: : c b c b a-*+-*=
8) Translate the arithmetic expression a*-(b+c) in to syntax tree and postfix notation.
9) What are the various ways of representing intermediate languages?
10) Why are quadruples preferred over triples in an optimizing compiler?
11) Mention the functions that are used in back patching.
12) Difference between parse tree and syntax tree.
13) What are the two notations of translation?
14) Define control stack
15) What are the methods of translation into intermediate forms?
16) Define quadruple and list out merits of quadruples.
17) Define Boolean expression.
18) What is meant by scope of declaration?
19) Define s-attribute and L-attribute.
20) What is meant by an Annotated parse tree?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
Question Bank
Course Name: Compiler Design(TCS-602)
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: III/Syntax Directed Translation
Date of Issue: Date of Submission:
1. Define flow graph. Define basic blocks.
2. List out the primary structure preserving transformations on basic block.
3. What is DAG? 6. Define symbol table. List the advantage of DAG. Give any four applications of
DAG.
4. How to perform register assignment for outer loops?
5. What is the purpose of next-use information?
6. What are the uses of register and address descriptors in code generation?
7. List out the riteria’s for ode i provi g tra sfor atio s. 8. Name the techniques in loop optimization.
9. What is the use of Next-use information? List the fields in an activation record.
10. State the problems in code generation.
11. What are the difference between static allocation and stack allocation?
12. What are the steps for partitioning the three address code into basic block?
13. Explain in detail about the various issues in design of code generator.
14. Write an algorithm to partition a sequence of three address statements into basic blocks.
15. Explain code generation algorithm and various issues in code generation algorithm in detail.
16. Construct the DAG for the following basic block d: = b*c e: = a+b b: = b*c a: = e-d
17. Explain the concept of register allocation and assignment.
18. Generate code for the following assignment using code generator algorithms :=(a-b) + (a-c) + (a-
c)
19. How to generate a code for a basic block from its dag representation? Explain.
20. Define a Directed Acyclic Graph. Construct a DAG and write the sequences of instructions for
the expression a+ a*(b-c) + (b-c) *d.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
Question Bank
Course Name: Compiler Design(TCS-602)
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: IV/Symbol Table
Date of Issue: Date of Submission:
1. What do you mean by cross –compiler?
2. What is the use of algebraic identities in optimization of basic blocks?
3. List out the criteria for code improving transformations.
4. What is loop optimization?
5. How would you represent the dummy blocks with no statements indicated in global data
flow analysis?
6. What is data flow analysis? List out two properties of reducible flow graph?
7. When does dangling reference occur?
8. What is an optimizing compiler? What are the properties of optimizing compilers?
9. Define loop unrolling with example.
10. What is peephole optimization? Discuss briefly about peephole optimization.
11. What are the characteristics of peephole optimization?
12. What is meant by available expressions?
13. Discuss in detail the process of optimization of basic blocks. Give an example.
14. What is data flow analysis? Explain data flow abstraction with examples.
15. Explain in detail about code improving transformations.
16. Write in detail about function –preserving transformations.
17. Explain the principal sources of optimization in detail.
18. Explain the common sub expression elimination, copy propagation, and transformation for
improving loop invariant computations in detail.
19. Explain the three techniques for loop optimization with examples.
20. Discuss about the following Dead code elimination and code motion.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
Question Bank
Course Name: Compiler Design(TCS-602)
Course Code:TCS-602
Faculty :Mr. Dhajvir Singh Rai
Branch: CSE Semester: VI
Unit/Title: V/Introduction to code optimization
Date of Issue: Date of Submission:
ARTIFICIAL INTELLIGENCE (TCS-603)
UNIT IIntroduction: History of AI, Intelligent agents – Structure of agents and its functions, Problem spaces and search - Heuristic Search techniques – Best-first search, Problem reduction - Constraint satisfaction - Means Ends Analysis.UNIT IIKnowledge Representation: Approaches and issues in knowledge representation, Knowledge Based Agent, Propositional Logic, Predicate logic – Unification – Resolution, Weak slot – filler structure, Strong slot - filler structure.UNIT IIIReasoning under uncertainty: Logics of non-monotonic reasoning, Implementation, Basic probability notation, Bayes rule, Certainty factors and rule based systems, Bayesian networks, Dempster - Shafer Theory, Fuzzy Logic.UNIT IVPlanning and Learning: Planning with state space search, conditional planning, continuous planning, Multi-Agent planning. Forms of learning - inductive learning – Reinforcement Learning - learning decision trees -Neural Net learning and Genetic learningUNIT VAdvanced Topics: Game Playing: Minimax search procedure - Adding alpha-beta cutoffs.Expert System: Representation - Expert System shells - Knowledge Acquisition.Swarm Intelligent Systems – Ant Colony System, Development, Application and Working of Ant Colony System.TEXT BOOKS1. Elaine Rich, Kevin Knight and Shivashankar B.Nair, “Artificial Intelligence”, TataMcGraw-Hill, Third edition, 2009. (UNITs I, II, III & V)2. Stuart J. Russell and Peter Norvig, "Artificial Intelligence: A Modern Approach", PearsonEducation Asia, Second edition, 2003. (UNIT IV)3. N. P. Padhy, “Artificial Intelligence and Intelligent System”, Oxford University Press,Second edition, 2005. (UNIT V)REFERENCES1. Rajendra Akerkar, “Introduction to Artificial Intelligence”, Prentice-Hall of India, 2005.2. Patrick Henry Winston, “Artificial Intelligence”, Pearson Education Inc., Third edition,2001.3. Eugene Charniak and Drew Mc Dermott, “Introduction to Artificial Intelligence", Addison-Wesley, ISE Reprint, 1998.4. Nils J.Nilsson, “Artificial Intelligence - A New Synthesis", Harcourt Asia Pvt. Ltd., Morgan Kaufmann, 1988.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : Artificial Intelligence
Subject Code : TCS -602Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
LESSON PLAN
SEMESTER/YEAR: 6th/3rd DEPARTMENT : CSECOURSE: ARTIFICIAL INTELLIGENCE COURSE CODE : TCS-603
S. No.
Topic NameRefernce/ Text Book/
Web(R/T/W)
No. Of Lectu
res
Delivery Method
Remarks
1. Introduction: History of AI T1,R1 2 Chalk & Talk/PPT
2. Intelligent agents – Structure of agents and its functions
T1,R1,R2 3 Chalk & Talk/PPT
3. Problem Spaces and search T1,R2 2 Chalk & Talk/PPT
4. Heuristic Search techniques – Best-first search T1,R2 2 Chalk & Talk/PPT
5. Problem reduction -Constraint satisfaction T1,R1 2 PPT6. Means Ends Analysis T1,R1,R2 2 PPT7. Knowledge Representation: Approaches and issues in
knowledge representationT1,R1 2 Chalk &
Talk/PPT8. Knowledge Based Agent T1,R1 3 Chalk &
Talk9. Propositional Logic T1,R1 2 Chalk &
Talk10. Predicate logic – Unification – Resolution T1,R1 2 PPT11. Weak slot – filler structure T1,R1 2 PPT12. Strong slot - filler structure T1,R1 1 PPT
13. Reasoning under uncertainty: Logics of non-monotonic reasoning
T1,R2 2 PPT
14. Implementation, Basic probability notation T1,R2 2 Chalk & Talk
15. Bayes rule T1,R2 2 Chalk & Talk
16. Certainty factors and rule based systems T1,R2 2 Chalk & Talk
17. Bayesian networks T1,R2 2 PPT18. Dempster - Shafer Theory T1,R2 2 PPT20. Fuzzy Logic T1,R2 2 PPT21. Planning and Learning: Planning with state space
searchT2,R2 2 Chalk &
Talk/PPT22. conditional planning, continuous planning, Multi-
Agent planningT2,R2 2 Chalk &
Talk/PPT23. Forms of learning - inductive learning T2,R2 2 Chalk &
Talk/PPT24. Reinforcement Learning - learning decision trees T2,R2 2 Chalk &
Talk/PPT25. Neural Net learning and Genetic learning T2,R2 2 Chalk &
Talk/PPT26. Advanced Topics: Game Playing: Minimax search
procedureT1,T3,R1 2 Chalk &
Talk/PPT27. Adding alpha-beta cutoffs T1,T3,R1 1 Chalk &
Talk/PPT28. Expert System: Representation T1,T3,R1 1 Chalk &
Talk/PPT
29. Expert System shells – Knowledge Acquisition T1,T3,R1 2 Chalk & Talk/PPT
30. Swarm Intelligent Systems – Ant Colony System T1,T3,R1 2 Chalk & Talk/PPT
31. Development, Application and Working ofAnt Colony System
T1,T3,R1 2 Chalk & Talk/PPT
Total Lectures: 60
REMARKS/RECOMMENDATIONS FOR FUTURE:
TEXT BOOKS:[T1]. Elaine Rich, Kevin Knight and Shivashankar B.Nair, “Artificial Intelligence”, Tata McGraw-Hill, Third edition, 2009. (UNITs I, II, III & V)[T2]. Stuart J. Russell and Peter Norvig, "Artificial Intelligence: A Modern Approach", Pearson Education Asia, Second edition, 2003. (UNIT IV)[T3]. N. P. Padhy, “Artificial Intelligence and Intelligent System”, Oxford University Press, Second edition, 2005. (UNIT V)
REFERENCE BOOKS:[R1] . Rajendra Akerkar, “Introduction to Artificial Intelligence”, Prentice-Hall of India, 2005. [R2]. Patrick Henry Winston, “Artificial Intelligence”, Pearson Education Inc., Third edition, 2001.
Signature of HOD:__________
Date: __________
1. Explain Artificial Intelligence? Discuss some task domain of AI.
2. Define Constraint Satisfaction. Solve the given problem
SEND
MORE
MONEY
3. Compare Hill Climbing and Best First Search.
4. Explain the Mean End Analysis technique?
5. Explain the Intelligent agents and draw the systematic diagram of a simple reflex agent
and goal based reflex agent.
6. Explain with examples how does conventional computing differ from intelligence
computing.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : Artificial Intelligence Assignment No: 1
Subject Code : TCS -603Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
Unit/Title: Introduction Date of Issue: Date of Submission:
1. Explain the knowledge representation? What are the approaches to knowledge
representation?
2. Explain semantic net and partition nets giving suitable examples.
3. a) Represent the following sentences in symbol logic:
i. All students like good teachers.
ii. All that glitter is not gold.
iii.Fruits and Vegetables are delicious.
iv. God helps those who help themselves.
v. Jack and Jill went up the hill.
b) What is knowledge based agent.
4. Explain propositional logic. What are the limitations of propositional logic?
5. What is Minskey frame system theory?
6. Explain the Shank’s conceptual dependency with Examples.
7. What do you mean by resolution, refutation and unification? Explain the procedure to
convert any wff into clause form with example.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : Artificial Intelligence Assignment No: 2
Subject Code : TCS -603Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
Unit/Title: Knowledge Representation Date of Issue: Date of Submission:
1. What is non monotonic reasoning? Explain the logics of non-monotonic reasoning.
2. Explain the Dempster shaper theory.
3. What is statistical reasoning? How probability and bayes theorem are used in statistical
reasoning.
4. Explain the Bayesian network.
5. Explain the default reasoning.
6. Define the Fuzzy logic.
7. What is Rule-based System? Explain the certainty factor in rule-based system.
8. What is the different belief functions used in Dempster shafer theory?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : Artificial Intelligence Assignment No: 3
Subject Code : TCS 603Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
Unit/Title: Reasoning under uncertainty Date of Issue: Date of Submission:
1. Explain forward state space search and backward state space search with examples. Also,
write down the main advantages and disadvantages of both.
2. What are the different forms of learning? Explain the expressiveness of decision trees.
3. Explain Supervised, Unsupervised and reinforcement learning in neural networks.
4. What is fitness function and how it is useful for Genetic Algorithms?
5. Explain the Genetic Algorithm operators with example briefly.
6. What are the features of artificial neural networks?
7. What is continuous planning? Solve the block world problem using continuous planning.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : Artificial Intelligence Assignment No: 4
Subject Code : TCS -603Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
Unit/Title: Planning and Learning Date of Issue: Date of Submission:
1. Is the minimax procedure a depth-first or breadth-first search procedure? Explain.
2. Explain minimax search procedure with an example.
3. What are expert systems? Explain its various parts.
4. Write notes on Swarm Intelligent Systems.
5. Explain the architecture of an expert system shell and discuss its applications.
6. What is alpha –beta pruning, explain with an example.
7. Distinguish between DENDRAL and MYCIN.
8. Why do we use Domain Exploration, Meta Knowledge and Expertise Transfer in
building Expert system?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Subject Name : Artificial Intelligence Assignment No: 5
Subject Code : TCS -603Faculty : Mr. Saurabh Singh
Branch: CSE Semester: 6th
Unit/Title: Advanced Topics Date of Issue: Date of Submission:
1. Explain the Intelligent agents and draw the systematic diagram of a simple reflex agent
and Goal based reflex agent.
2. Explain with examples how does conventional computing differ from intelligence
computing
3. Differentiate between Hill climbing and simulated annealing.
4. Differentiate between weak AI and Strong AI.
5. What are different branches of AI?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 1
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Introduction Date of Discussion:
1. Define the term: Information, Knowledge and Intelligence.
2. Explain various methods of problem representation in artificial intelligence.
3. What are heuristics? Compare and contrast heuristic algorithm versus solution guaranteed
algorithms.
4. Explain intelligence and artificial intelligence system. How do they distinguish?
5. Explain the History and birth of AI.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 2
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Introduction Date of Discussion:
1. What do you mean by resolution, refutation and unification. Explain the procedure to
convert any wff into clause form with example.
2. Write the unification algorithm. Convert the following sentences into predicate logic.
i. Fido is a dog.
ii. All dogs are animals.
iii. All animals will die.
To prove Fido will die using resolution technique
3. Explain the knowledge representation? What are the approaches to knowledge
representation?
4. What are weak slot and filler structure? Differentiate between weak slot and strong slot
filler structure.
5. What are weak slot and filler structure? Explain semantic net and partition nets giving
suitable examples. Also construct a Partition Semantic Net Representation for the
following:
‘Every dog has bitten a mail carrier’.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 3
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Knowledge Representation Date of Discussion:
1. Explain the Shank’s conceptual dependency with Examples. Also Explain the CD
Building blocks.
2. Convert A->((B & C)-> D)) into DNF(disjunctive normal form) and
((A-> B)-> C) into CNF( conjunctive normal form).
3. Explain propositional logic. What are the limitations of propositional logic?
4. What is knowledge based agent.
5. What is first order predicate logic? Explain the methods of propositional resolution.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 4
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Knowledge Representation Date of Discussion:
1. What are the different belief functions used in Dempster shafer theory?
2. Explain logic along with its types. Explain all rules of inference with suitable examples
3. What is meant abductive reasoning?
4. Explain symbolic versus statistical reasoning.
5. Explain Dempster Shafer calculus.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 5
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Reasoning under Uncertainty Date of Discussion:
1. What are the features of artificial neural networks?
2. Explain Supervised, Unsupervised and reinforcement learning in neural networks.
3. Explain Back propagation learning algorithm.
4. Explain the industrial and commercial applications of ANN briefly.
5. What is learning? Explain Hopfield network and applications.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 6
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Planning and Learning Date of Discussion:
1. What is fitness function and how it is useful for Genetic Algorithms?
2. Explain the Genetic Algorithm operators with example briefly.
3. Differentiate between Genetic Algorithm and Genetic Programming.
4. What is Inductive learning? Explain with suitable example.
5. Explain the Genetic Algorithm operators with example briefly.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 7
Subject Code : TCS-603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Planning and Learning Date of Discussion:
1. Explain the knowledge acquisition system. What are the knowledge acquisition methods
adopted by expert system
2. Write notes on Swarm Intelligent Systems.
3. Explain the architecture of an expert system shell and discuss its applications.
4. What is alpha –beta pruning, explain with an example.
5. Explain Ant Colony Optimization algorithm for traffic light problem.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Subject Name : Artificial Intelligence Tutorial Sheet No. 8
Subject Code : TCS 603
Faculty : Mr. Saurabh Singh
Branch: CSE
Semester:6th
Unit/Title: Advanced Topics Date of Discussion:
Q1) What is AI?Q2) Define an agent. What is an agent function?Q3) Differentiate an agent function and an agent program.Q4) What is a task environment? How it is specified?Q5) Give an example of PEAS description for an automated taxi.Q6) List the properties of task environments.Q7) Write a function for the table driven agent.Q8) Explain a simple reflex agent with a diagram.Q9) Explain with a diagram the goal based reflex agentQ10) What are utility basedagents?Q11) What are learning agents?Q12) How to measure the performance of an agent?Q13) Define:
a. performance measures.b. Ideal Rational Agent.c. Omniscience.d. Information Gathering
Q14) Define the terms goal formulation and problem formulation.Q15) List the steps involved in simple problem solving agent.Q16) What are the components of well-defined problems?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: ARTIFICIAL INTELLIGENCE Question Bank No. 1
Course Code:TCS-603Faculty :Mr. Saurabh Singh
Branch: CSE Semester: IV
Unit/Title: 1/ History of AI Date of Issue: Date of Submission:
Q1) What is informed search?Q2) What is the use of QUEUING_FN?Q3) Mention the criteria for the evaluation of search strategy.Q4) List the various search strategies.Q5) List the various informed search strategy.Q6) What is Best First Search?Q7) Define Evaluation function, f(n).Q8) Define Heuristic function, h (n).Q9) Define Greedy Best First Search.Q10) What is RBFS?Q11) Define iterative deepening search.Q12) What are the 2 ways to use all available memory?Q13) List some of the rules of inference.Q14) What is resolution /refutation?Q15) Define unification.Q16) What are semantic nets?Q17) What are frames? How do they differ from semantic nets.Q18) What are script? What is its use?Q19) List the components of a script.Q20) Mention the frame manipulation primitives.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: ARTIFICIAL INTELLIGENCE Question Bank Unit No. 2
Course Code:TCS-603Faculty :Mr. Saurabh Singh
Branch: CSE Semester: IV
Unit/Title: II/ Knowledge Representation Date of Issue: Date of Submission:
Q1) Define a Sentence?Q2 Define an inference procedureQ3) Define Ontological commitment.Q4) Define Epistemological commitment.Q5) Define domain and domain elements.Q6) What are the three levels in describing knowledge based agent?Q7) Define Syntax?Q8) Describe Bayes theorem.Q9) What are the disadvantages of Closed World Assumption (CWA). How will you over- come it?Q10) Define Non monotonic reasoning.Q11) What are Truth Maintenance Systems? Draw its block diagram.Q12) What are Bayesian networks? Give an example.Q13) What is fuzzy logic? What is its use?Q14) How Knowledge is represented?Q15) What is propositional logic?Q16) What are the elements of propositional logic?Q17) What is inference?Q18) What are modus ponens?Q19) Explain the steps involved in the knowledge Engineering process. Give an example. (16)Q20) Explain with an example
a. Forward chaining b. Backward chaining
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: ARTIFICIAL INTELLIGENCE Question Bank Unit No. 3
Course Code:TCS-603Faculty :Mr. Saurabh Singh
Branch: CSE Semester: IV
Unit/Title: III/ Reasoning Under Uncertainty Date of Issue: Date of Submission:
Q1) Define linguistics. List the general classification of languages.Q2) What are grammars?Q3) Give the syntactic tree for the sentence „The boy ate the apple.Q4) List the types of grammars.Q5) What is parsing? What is its importance?Q6) Differentiate – Top down & Bottom Up parsing, Deterministic & Non deterministic parsing,.Q7) What are Recursive transition networks (RTN), Augmented Transition Networks (ATN)?Q8) What is the role of semantic analysis in NLP?Q9) Define Natural Language generation.Q10) List any two NLP systems.Q11) What is distributed reasoning?Q12) What are Intelligent Agents? What are its use?Q13) What are the components of agents?Q14) Define and explain
a. Supervised learning b. Unsupervised learningc. Reinforcement learning
Q15) How hypotheses formed by pure inductive inference or induction?Explain with ex - amples. (16)Q16) What is a decision tree?Q17) Explain the process of inducing decision trees from examples.Q18) Write the decision tree learning algorithm
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: ARTIFICIAL INTELLIGENCE Question Bank Unit No. 4
Course Code:TCS-603Faculty :Mr. Saurabh Singh
Branch: CSE Semester: IV
Unit/Title: IV/ Planning and Learning Date of Issue: Date of Submission:
Q1) What are Expert Systems?Q2) Briefly explain the knowledge acquistion process.Q3) List the characteristic features of a expert system.Q4) Mention some of the key applications of ES.Q5) What is learning? What are its types?Q6) Define generalization.Q7) Define Inductive Bias.Q8) What is Explanation Based Learning? How is it useful?Q9) Define the terms
a. Communications b. Speech act c. Formal Languaged. Gram- mar
Q10) What are the component steps in communication? Explain the steps for the example sentence “The wumpus is dead”.Q11) Contruct a lexicon and grammar for a small fragment of English Language.Q12) What is parsing? Explain in detail two parsing methods and give a trace of a bottom up parse on the string “The wumpus is dead”.Q13) What is augmented grammar? Explain with examples.Q14) Explain in detail
a. Information Retrievalb. Information Extraction
Q15) What is machine translation? What are different types of machine translation? Q16) Draw the schematic of a machine translation and explain for an example problem
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: ARTIFICIAL INTELLIGENCE Question Bank Unit No. V
Course Code:TCS-603Faculty :Mr. Saurabh Singh
Branch: CSE Semester: IV
Unit/Title: V/ Expert System Date of Issue: Date of Submission:
GRAPH THEORY (TCS 604)
Unit- IGraphs, Sub graphs, some basic properties, various example of graphs & their sub graphs, walks, trails, path & circuits, connected graphs, disconnected graphs and component, various operation on graphs, Euler graphs, Hamiltonian paths and circuits, the traveling salesman problem, directed graphs, some types of directed graphs, directed paths and connectedness, Hamiltonian and Euler digraphs.Unit- IITrees and fundamental circuits, distance diameters, radius and pendent vertices, rooted and binary trees, on counting trees, spanning trees, fundamental circuits, finding all spanning trees of a graph and a weighted graph, trees with directed edges, fundamental circuits in digraph, algorithms of Prim, Kruskal and Dijkstra.Unit -IIICuts sets and cut vertices, some properties, all cut sets in a graph, fundamental circuits and cut sets, connectivity and separability, network flows, planer graphs, Euler’s formula and its corollaries, Kuratowski’s theorem and its application to planarity detection of graphs, combinatorial and geometric dual, some more criterion of planarity, thickness and crossings. Unit -IVIncidence matrix of graph, sub matrices of A(G), circuit matrix, cut set matrix, fundamental circuit matrix and rank of B, path matrix and relationships among , , & , adjacency matrices, adjacency matrix of a digraph, matrices A, B and C of digraphs, rank- nullity theorem, coloring and covering and partitioning of a graph, chromatic number, chromatic partitioning, chromatic polynomials, matching, covering, enumeration, types of enumeration, counting of labeled and unlabeled trees.
References:1. Deo, N: Graph theory, PHI2. Bondy and Murthy: Graph theory and application. Addison Wesley.3. John M. Aldous and Robin J. Wilson: Graphs and Applications-An IntroductoryApproach, Springer4. Robin J, Wilson: Introduction to Graph Theory, Addison Wesley.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : Graph Theory
Subject Code : TCS -604Faculty : Ms. Preeti Raturi
Branch: CSE Semester: 6th
DBIT DEHRADUN
LESSON PLAN
SEMESTER/YEAR: 6th /3rd DEPARTMENT : CSECOURSE: GRAPH THEORY COURSE CODE: TCS 604
S. No.
Topic NameReference/Text Book/
Web(R/T/W)
No. Of Lectures
Delivery Method
Remarks
1. Graphs, Sub graphs, some basic properties T1,R1 1 Chalk &Talk
2. Various example of graphs & their sub graphs T1,R1 1 Chalk &Talk
3. Walks, trails, path & circuits, connected graphs, disconnected graphs and component
T1,R1 2 Chalk &Talk
4. Various operation on graphs T1,R1 1 Chalk &Talk
5. Euler graphs, Hamiltonian paths and circuits T1,R1 1 Chalk &Talk
6. The traveling salesman problem, directed graphs, some types of directed graphs, directed paths and connectedness
T1,R1 2 Chalk &Talk
7. Hamiltonian and Euler digraphs T1,R1 1 Chalk &Talk
8. Trees and fundamental circuits, distance diameters, radius and pendent vertices
T1,R2 2 Chalk &Talk
9. Rooted and binary trees, on counting trees, spanning trees T1,R2 2 Chalk &Talk
10. Fundamental circuits, finding all spanning trees of a graph and aweighted graph
T1,R2 2 Chalk &Talk
11. Trees with directed edges, fundamental circuits in a digraph T1,R2 1 Chalk &Talk
12. Algorithms of Prim, Kruskal and Dijkstra T1,R2 2 Chalk &Talk
13. Cuts sets and cut vertices, some properties, all cut sets in a graph, fundamental circuits
T1 2 Chalk &Talk
14. Connectivity and separability, network flows, planer graphs T1 1 Chalk &Talk
15. Euler’s formula and its corollaries T1 1 Chalk &Talk
16. Kuratowski’s theorem and its application to planarity detection of graphs
T1 1 Chalk &Talk
17. Combinatorial and geometric dual, some more criterion of planarity, thickness and crossings
T1 2 Chalk &Talk
18. Incidence matrix of graph, sub matrices of A(G), circuit matrix T1,R2 1 Chalk &Talk
19. Cut set matrix, fundamental circuit matrix and rank of B, path matrix
T1,R2 1 Chalk &Talk
20. Rrelationships among adjacency matrices, adjacency matrix of a digraph, matrices A, B and C of digraphs
T1,R2 1 Chalk &Talk
21. Rank- nullity theorem, coloring and covering and partitioning of a graph, chromatic number, chromatic partitioning, chromatic
T1,R2 2 Chalk &Talk
polynomials
22. Matching, covering, enumeration, types of enumeration, counting of labeled and unlabeled trees
T1,R2 2 Chalk &Talk
REMARKS/RECOMMENDATIONS FOR FUTURE:
EXTRA CLASS TAKEN (IF ANY):
TEXT BOOKS:[T1]. Deo, N: Graph theory, PHI
REFERENCE BOOKS:[R1]. Bondy and Murthy: Graph theory and application. Addison Wesley.[R2]. John M. Aldous and Robin J. Wilson: Graphs and Applications-An Introductory
Signature of HOD:__________
Date: __________
1. Define the following with one example each :a) Subgraphb) Spanning Subgraphc) Homeomorphic graphs d) Unicursal linee) Arbitrarily traceable graph
2. Define the degree of a vertex in a graph.
3. Define the following with one example.a) Complete graphb) Eulerian graphc) Hamiltonian graphd) Bi-partite graph
4. Discuss travelling salesman problem?
5. Define isomorphism of graphs? For the following pair of graphs, determine whether or not the graphs are isomorphic. Explain your answer?
6. What are directed graphs? Explain with examples.
7. What are Hamiltonian and euler digraphs? Explain with example.
8. Differentiate, with example, a simple graph and a multigraph.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Graph Theory Assignment No. 1
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Introduction to Graphs Date of Issue: Date of Submission:
1. Define the following:a) Spanning treeb) Shortest path in weighted graphc) Binary treesd) Radius and pendent verticese) Fundamental Circuits
2. What are the different properties when a graph G with n vertices is called a tree?3. Find a shortest spanning tree in a weighted graph G, using the PRIM’s algorithms where
G is as follows.
4. Apply Kruskal algorithm to find out the shortest path in the following graph.
5. Define binary trees and discuss two important applications of it?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Graph Theory Assignment No. 2
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Graphs and Spanning Trees Date of Issue: Date of Submission:
1.Define a planar graph? State and prove the Euler’s theorem for a planar graph.
2.Define the following with examples:a) cut-setsb) connectivity and Separabilityc) Thickness of a graph
3. Explain Kuratowski’s theorem and its application to planarity detection of graphs with examples.
4. Draw a graph of K3, 2 in such a way as to show that it is planar.
5.Find the maximum flow possible between the vertices A and D for the following graph:
6. Explain Euler’s formula and its corollaries with examples.
7. In how many ways can 12 oranges be distributed among three children A, B, C so that A gets at least four, B and C get least two but C gets no more than five?
8. What is geometric dual graph? Give examples.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Graph Theory Assignment No. 3
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Cut Set Date of Issue: Date of Submission:
1. Define the following with examples:a) Matching b) Complete matching c) Edge-connectivity
2. Define Chromatic number and chromatic polynomial. Find the chromatic polynomial for the graph given below:
3. Define the following and also device the relationship between them.a) Reduced incidence matrix b) Fundamental circuit matrix c) Fundamental cut-set matrix
4. Explain the matching and covering of a graph.5. Find the incidence matrix of the given graph:
6. What is enumeration? What are its types of enumeration? Gives examples.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Graph Theory Assignment No.4
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Fundamental circuits and Coloring Date of Issue: Date of Submission:
1
4
32
1 2
3
5 64
1. Proof that a simple graph with n vertices and k components can have at most (n-k) (n-
k+1)/2 edges?
2. Prove that, in a complete graph with n vertices, there are (n-1)/2 edge disjoint
Hamiltonian circuits, if n is odd number >= 3?
3. Prove that the finite connected graph is Eulerian if and only if each vertex has even
degree?
4. Prove that in a graph the number of the vertices with odd degree is even?
5. Define a bipartite graph? Show that the complement of a bipartite graph needs not to
be a bipartite?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 1
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: UNIT 1 Date of Discussion:
1.Find a minimum spanning tree using prims algorithm for the weighted graph given below:
2.Explain Peterson graph. Find three spanning tree in the Peterson graph?
3. Write an algorithm to find the shortest spanning tree in a weighted graph?
4. Define spanning tree of a graph? Show that a Hamiltonian path in a graph is a spanning tree?
5. What are the different properties when a graph G with n vertices is called a tree?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 2
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Graphs and Spanning Trees Date of Discussion:
5
3 2
6
1
4
8
4
9
1. Draw a graph with Edge connectivity = 4, Vertex connectivity = 3 and Degree of every
vertex >= 5
2. Show that the complete bipartite graph K3,3 is non-planer?
3. Define a planar graph? Prove that for a connected planar with n vertices and e edges e <=
3n - 6 and e <= 2n – 4?
4. Write an algorithm to detect the planarity of a graph?
5. For a planar graph with n vertices and e edges prove that e <= 3n-6?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 3
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Connectivity and Planarity Date of Discussion:
1. Find all the fundamental circuits and cut sets of K3,3 and K5
2. Define the edge-connectivity and vertex connectivity of a graph. Prove that for a graph
vertex connectivity <=edge connectivity <=2e/n. where e and n are number of edges and
vertices in graph respectively.
3. Define the chromatic number of a graph. Prove that every tree with two or more vertices
is 2-chromatic.
4. Define a circuit vector and a cut set vector of a connected graph. Prove that a circuit
vector and a cut set vector are orthogonal to each other w.r.t. mod 2 arithmetic.
5. Prove that the set consisting of all the circuits and the edge disjoint union of circuits (including the null set) in a graph G is an abelian group under the ring-sum operation
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 4
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Fundamental circuits and coloring Date of Discussion:
1. Define cut set matrix C(G) and show that the rank of cut-set matrix is equal to the
rank of incidence matrix.
2. What is Euler graph? Prove that a non-empty connected graph G is eulerian if its
vertices are all of even degree.
3. Give an example of the graph with six vertices that has no cut points.
4. True or False? Justify.
“Every 3-connected graph is 2-connected”.
5. Draw the complete bipartite graphs k2,3 , K2,4 , K2,5.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 5
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Cut-Set and Graphs Date of Discussion:
1. Prove that each spanning tree of a connected graph G, contains all pendant edges of G.
2. Explain travelling salesman problem with suitable example.
3. Explain maximum flow and min-cut theorem.
4. Define the following:
a. Geometrical dualb. Thickness and crossing,c. connectivity and separability
5. Define a cut-set vector and circuit vector of a graph. Given a set{x,y,z} of 3 elements, show that there is only one graph possible with the set.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 6
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Unit- 3 Date of Discussion:
1. Prove that in a non-seperable graph G the set of edges in incident on each vertex of G
is cut-set.
2. Construct a graph G with the following properties:edge connectivity of G=4,vertex
connectivity of G=3 and degree of every vertex of G>=5.
3. Define radius, diameter and center of a tree. Give an example of a tree for which the
connectivity of G=3 and degree of every vertex of G>=5.
4. Define a tree. Prove that a graph with a vertex ,n-1 edges, and no circuits is
connected.
5. Prove that every tree has one or two centers.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Graph Theory Tutorial Sheet No. 7
Course Code: TCS 604
Faculty : Preeti Raturi
Branch: CSE Semester: 6th
Unit/Title: Unit 4 (Collection) Date of Discussion:
UNIT-1
1) Proof that a simple graph with n vertices and k components can have at most (n-k) (n-k+1)/2 edges?
2) Prove that the finite connected graph is Eulerian if and only if each vertex has even degree?3) Prove that, in a complete graph with n vertices, there are (n-1)/2 edge disjoint Hamiltonian circuits,
if n is odd number >= 3?4) Define the following with one example each :
a) Subgraphb) Spanning Subgraphc) Homeomorphic graphsd) Unicursal linee) Arbitrarily traceable graph
5) Prove that in a graph the number of the vertices with odd degree is even?6) Find a path of length 9 and a circuit of length 8 in the Peterson graph?7) Find three Hamiltonian circuits in dodecahedron?8) Prove that every graph with n vertices with at least n edges contains a circuit?9) Write a brief note of 200 words or more on the travelling sales person?10) Prove that the sum of the degrees of all vertices of a graph is even?11) Prove that a simple graph with n vertices and k components can have at most (n-k)(n-k+1)/2
edges?12) Define an Euler graph? Find an example of eulerian graph which is not Hamiltonian?13) Define the ring sum of two graphs? Find the ring sum of the following graphs G1, G2?
14) Define the Hamiltonian path? Find an example of a non Hamiltonian graph with a Hamiltonian path?
15) Prove that a graph is an Euler graph if and only if it can be decomposed into circuits?16) Prove that in a complete graph with n vertices there are (n-1)/2 edge disjoint Hamiltonian circuits
and n >= 3?17) Describe briefly the travelling Salesman problem?18) Define isomorphism between two graphs? 19) Define a bipartite graph? Show that the complement of a bipartite graph need not to be a bipartite?20) Discuss the Konigsberg Bridge problem?21) Define the following with one example each :
a) Infinite graphb) Hamiltonian pathc) Component of a graphd) Euler graphe) Spanning subgraph
22) Define isomorphic graph? Draw three isomorphic graph of the following graph?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUNQuestion Bank
Course Name: Graph Theory
Course Code:TCS-604Faculty :Ms. Preeti Raturi
Branch: CSE Semester: VI
23) Differentiate, with example, a simple graph and a multigraph. Show that the maximum number of edges in a simple graph with n vertices n (n-1)/2?
24) What is the largest number of vertices in a graph witha) 35 edges if all vertices are of degree at least 3.b) 24 edges and all vertices of the same degree.
25) Define the degree of a vertex in a graph. Prove that the number of vertices of odd degree in a graph is always even?
26) Prove that in graph with n vertices and k components the maximum number of edges cannot exceed (n-k)(n-k+1)/2?
27) Define an Eulerian and a Hamiltonian graph? Give examples of Eulerian non Hamiltonian graph G, and Hamiltonian non-eulerian graph G2 with number of vertices >= 10?
28) Define connected graph? Prove that for a graph with exactly two vertices of odd degree, there must be a path joining these two vertices?
29) Draw a graph G with Hamiltonian path without Hamiltonian circuit with number of vertices >= 20?
30) Define the degree of a vertex in a graph? Prove that the sum of the degrees of all vertices of a graph in a graph is twice the number of edges in graph?
31) Define isomorphism of graphs? For the following pair of graphs , determine whether or not the graphs are isomorphic. Explain your answer?
32) Prove that a simple graph with n vertices and k components can have atmost (n-k) (n-k+1) edges?33) Discuss travelling sales man problem?34) Define the following with one example.
a) Complete graphb) Eulerian graphc) Hamiltonian graphd) Bi-partite graphe) Cut points of a graph
Unit: - 21) If G is tree with n vertices then prove that it has exactly n-1 edges?2) Explain what is meant by spanning tree? Find four spanning trees for the following graph :
3) Find the shortest path from a to z of the following graph using Dijkstra Algorithm :
4) Use the algorithm of Kruskal to find a minimum weight spanning tree in the following graph ---
5) Prove that a connected graph G is a tree if G has fewer edges than vertices?6) Take any spanning tree in the following graph. List all the seven fundamental cut-sets with respect
to this tree---
7) Define the pendent vertices in a binary tree? Prove that the number of the pendent vertices in a binary tree with n vertices is (n+1)/2?
8) Define a spanning tree of a graph? Find three spanning tree in the Peterson graph?9) Write an algorithm to find the shortest spanning tree in a weighted graph?10) Define the shortest path in a weighted graph? Describe the Dijkstra algorithm to find the shortest
path m a weighted graph with vertices more than 7?
11) Define the cut set of a graph? Find five cut sets of the following graph?
12) Define the centre of a tree? Prove that every tree has one or two centre?13) Prove that if in a graph G there is one and only one path between every pair of vertices is tree?14) Define a spanning tree in a graph? Find four spanning trees In the dodecahedron graph?15) State the two algorithms to find the shortest spanning tree in a weighted graph. Write the details of
one of these algorithms?
16) Apply prime’s algorithm to find a minimal spanning tree of the following graph?
17) Define spanning tree of a graph? Show that a Hamiltonian path in a graph is a spanning tree?18) Show a tree in which its diameter is not equal to twice of the radius? Under what condition does
this inequality hold? Elaborate?19) What are the different properties when a graph G with n vertices is called a tree?20) Prove that every tree has one or two centres?21) Define a spanning tree of a graph? Find four spanning trees of the following Peterson’s graph?
22) Prove that w.r.t any of its spanning trees a connected graph with n vertices and e edges has (n-1) tree branches and (e-n+1) chords?
23) Find a shortest spanning tree in a weighted graph G, using the PRIM’s algorithms where G is as follows?
24) Construct a tree with 16 vertices, each corresponding to a spanning tree of a labeled completed graph with four vertices?
25) Define fundamental circuit and cut-sets. Find five fundamental circuits and fundamental cut-sets of the graph:
26) If G is a non-trivial tree, then prove that G contains at least two vertices of degree 1?27) Define binary trees and discuss two important applications of it?28) Apply Dijakstra algorithm to find out the shortest path from the vertices graph.
29) Use prims algorithm to find out the minimal spanning tree of the following graph?
30) Define fundamental circuits? Find the sets of fundamental circuits(four only) of the graph given above? Take any spanning tree and find it corresponding to that spanning tree?
31) Define eccentricity of the vertex and centre of a graph? Find the centre of the graph given above?
Unit: - 3
1) Draw a graph with Edge connectivity = 4Vertex connectivity = 3Degree of every vertex >= 5
2) Show that the complete bipartite graph K3,3 is non-planer?3) In a simple connected planner graph G, there are r regions, v vertices (v>= 3) and e edges (e>1)
thena) e >= 3*2^rb) e <= 3v – 6c) there is a vertex v of G such that degree(v) <= 5
4) Prove that a graph has a dual if and only if it is planar?5) Show by sketching that the thickness of nine vertex complete graph is three?6) Define a planar graph? Prove that for a connected planar with n vertices and e edges e <= 3n - 6
and e <= 2n – 4?7) Write an algorithm to detect the planarity of a graph? Detect the planarity of the graph k5 and
K3,3?8) Define the dual of the graph? Show that the complete graph of four vertices is self dual? Also, if n,
e and f are the number of vertices, number of edges and number of regions of a planar graph, find these numbers for the dual of this graph?
9) Prove that in a graph every circuit has an even number of edges in common with any cut set?10) Define a planar graph? State and prove the Euler’s theorem for a planar graph?11) Define the edge connectivity and vertex connectivity of a connected graph? Find them for the
following graphs—
12) Show that a complete graph kn is planar if n <= 4?13) Draw a spanning tree of the following graph given below and list all the fundamental circuits with
respect to this tree---
14) Find the dual of the following graph?
15) Prove that a graph G has a dual if and only if it is a planar?16) Show by sketching that the thickness of eight-vertex complete graph is two?17) Define the vertex connectivity and edge connectivity of a graph? Prove that for a graph G with n
vertices and e edges vertex connectivity <= edge connectivity <= 2e/n?18) Define the capacity of a cut-set? Prove that the maximum flow possible between two vertices a and
b in a network is equal to the minimum of capacities of all cut-sets with respect to a and b?19) Define a separable graph? Prove that in a non-separable graph G set of edges incident on each
vertex of G is a cut-set?20) Define a planar graph? Prove that a complete graph with five vertices is non-planar?21) For a planar graph with n vertices and e edges prove that e <= 3n-6?
22) Define thickness and crossing number of a graph? Find thickness and crossing numbers of the graph k5 and K3, 3?
23) Define a planar graph? State and prove the euler’s formula for planar graph?24) Define edge and vertex connectivity of a graph? Prove that the vertex connectivity of any graph
will never be more than the edge connectivity?25) Show that the kuratowski’s first (K5) and second (K3,3) are nonplanar graphs?26) Show that a graph has a dual if and only if it is planar?27) Define the thickness of a graph, give one example? Find the thickness of Kuratowski’s first and
second graph?28) Define cut-sets? List all cut-sets with respect to the vertex pair v2, v3 in the following graph?
Unit: - 4
1) What is the difference between incidence and adjacency matrices? Prepare both matrices for given graph---
2) Define the term with example—a) Circuit matrixb) Cutset matrix c) Fundamental cut set matrix
3) Prove that m-vertex graph is a tree if its chromatic polynomial is Pm (n) = n (n-1) ^ (m-1)? 4) Define Arborescence with example? Discuss its one application? Also prove that an Arborescence
is a tree in which every vertex other than root has an in-degree of exactly one?5) Define a vector space associated with a graph G and its two subspaces the circuit subspace and cut
set subspace? Find all the distinct bases of the circuit subspace of K5?6) Define the circuit matrix B (G) of a connected graph G with n vertices and e edges? Prove that the
rank of B (G) is e-n+1?7) Define the adjacency matrix A (G) of a simple graph G? Prove that two graphs G1 and G2 are
isomorphic if and only if A (G1) and A (G2) differ only by the permutations of rows and columns?8) Define a k-chromatic graph? Prove that every tree with two or more vertices is 2-chromatic? Find
an example of a 2-chromatic graph which is not a tree. Also, find the chromatic polynomial of a tree with n vertices?
9) Define a vector space for a graph G, and the circuit subspace and cut sets subspace of this vector space? Prove that the circuit subspace and cut set subspace are orthogonal to each other?
10) Define the incidence matrix, of a graph G? Prove that the rank of an incidence matrix of a connected graph with n vertices is n-1?
11) Define the circuit matrix B of a connected graph with n vertices and e edges? Prove that the rank of B is e-n+1?
12) Define the chromatic number and chromatic polynomial of a graph? Find the chromatic number and the chromatic polynomial of the following graph-----
13) Define basis vectors of a graph? Find the number of distinct basis possible in a cut-set subspace?14) Define
a) Reduced incidence matrix b) Fundamental circuit matrix andc) Fundamental cut-set matrixOf a connected graph? Also device the relationship between them?
15) Consider the circuit matrix (B) and incidence matrix (A) of a simple connected graph whose columns are arranged using the same order of edges. Then prove that every row of B is orthogonal to every row of A? also verify the result for the following graph-----
16) What do you mean by chromatic number and chromatic polynomial of a graph? Determine the chromatic number and chromatic polynomial of the following graphs---
17) Define a vector space of a graph? Find five base and number of vectors in the vector space of graph given below? Also find five cut-set vectors and five circuit vectors of this vector space?
18) Define the adjacency matrix of a graph? Find the rank of the regular graph with n vertices and with degree p (<n) of any vertex?
19) Define reduced matrix AF, fundamental circuit matrix bf and the fundamental cut-set matrix Cf of a connected graph G with n vertices and e edges. Derive the relationship among AF, bf and Cf?
20) Define the chromatic polynomial of a graph? Find the chromatic polynomial of the graph given below?
21) State and prove five colour theorem?22) Define basis vectors of a graph? Show that the number of distinct basis possible in a cut-set
subspace is :1/r! (2^r – 2^0) (2^r – 2^1) (2^r – 2^2)……. (2^r – 2^ r-1)
23) If B is a circuit matrix of a connected graph G, with e edges and n vertices, then show that the rank of B is equal to the nullity of G?
24) Prove that the rank of a cut-set matrix is equal to the rank of the graph?25) Prove that the m-vertex graph is a tree if and only if its chromatic polynomial is
Pm(x) = x (x-1) ^m-1.
Visual Programming & DotNet Technologies (TCS-605)UNIT 1 The Philosophy of .NETUnderstanding the previous states affair, The .NET Solution, The building Block of the .NET platform (CLR,CTS,CLS), the role of the .NET base class libraries, C# characteristics, additional .NET Aware programming Languages, An overview of .NET binaries (assemblies), The role of the common intermediate language, The role of .NET type metadata, The role of the assembly manifest, Compiling CIL to platform specific instruction, Understanding the common type system, Intrinsic CTS data types, Understanding the common languages specification, Understanding the common languages runtime, A tour of the .NET namespace, increasing your namespace nomenclature, Deploying the .NET runtime.UNIT 2 Building C# ApplicationsThe role of the command line compiler (CSC.exe), Building application using csc.exe, Working with csc.exe response file, generating bug reports, C# compiler option, The command line debugger, using the visual studio .Net IDE, Other key aspects of the VS.Net IDE, Documenting source code via XML, C# preprocessor directives, An interesting Aside: The System.Environment class.C# Language Fundamentals : An Anatomy of a basic class, Creating objects: Constructor basic, the composition of an application, Default Assignment and variable scope, member initialization syntax, Basic input and output with the console class, Understanding value types and reference types, The master node: System. Objects, The system Data type (And C# aliases), Converting between value type and reference type: Boxing and Unboxing, Defining program constraints, Iterations constructs, control flow constructs, The complete set operator, Defining Custom class methods, Understanding static methods, Method parameter modifiers, Array manipulation, String manipulation, Enumerations, Defining structures, Defining custom namespaces.UNIT 3 Object Oriented Programming with C#Formal definition of the class, Definition the “Default public interface” of a type, Recapping the pillars of OOP,The first pillar: Encapsulation services, Pseudo Encapsulation: Creating read only field, The second pillar: Inheritance supports keeping family secrets: The “Protected” keyword, The Nested type definitions, The third pillar: Polymorphic support casting between types, Generating class definitions using Visual Studio.Net. Exceptions and Objects Life Time Ode to errors, Bugs andexceptions, The role of .NET exceptions handling, The system. Exception base class throwing a generic exception catching exception, CLR system level exception (System. system exception),Custom application level exception (System. application exception), Handling multiple exception, The finally block The last chance exception, dynamically identify application and system level exception, Debugging system exception using VS.Net, Understanding Object life time, The CIT of new, The basicof garbage collection, Finalizing a type, Finalization process, building and Ad hoc destruction method, garbage collection optimization, The system .GC type.UNIT 4 Interfaces and CollectionsDefining interfaces using C#, Invoking interface member at the object level, Exercising the shape hierarchy, Understanding explicit interface implementation, Interfaces as Polymorphic agents, Building interface hierarchies, Implementing interface using VS.Net, Understanding the Iconvertible interface, Building a custom enumerator, Building cloneable objects, Building comparable objects, Exploring the system the collection namespace, Building a custom container (Retrofitting the cars type).UNIT 5Understanding .Net Assembles Problems with classic COM Binaries, An overview of .Net assembly, Building a simple file test assembly, A C# Client Application, A Visual Basic .Net Client application, Cross Language Inheritance, Exploring the Carlibrary’s manifest, Exploring the Carlibrary’s Types, Building the multi file assembly, Using the multi file assembly, Understanding private assemblies, Probing for private assemblies (The Basics), Private assemblies and XML Configuration files, Probing for private assemblies (The details),Understanding Shared assembly, Understanding Shared Names, Building a Shared assembly, Understanding delay Signing, Installing/Removing shared assemblies, Using a Shared assembly.Text Book:1. Andrew Troelsen; Pro C# 2008 And The . Net 3. 5 Platform, 4Th Ed; Dreamtech Press2. Bill Evjen, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner; Proffessional C# 20083. Joel Murach; Murach's C# 2008; Shroff/murachs (2008)
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : VP & DotNet Technologies
Subject Code : TCS -605Faculty : Ms. Abhilasha Rathor
Branch: CSE Semester: 6th
DEVBHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
LESSON PLAN
SEMESTER/YEAR: 6th
/3rd
DEPARTMENT : CSE
COURSE: Visual Programming & DotNet Tech. COURSE CODE: TCS 605
S.
No.
Topic Name
Refernce/
Text Book/
Web
(R/T/W)
No. Of
Lectures
Delivery
Method
Remarks
1. Prerequisite(Understanding the previous states affair) R1, T2 1 Chalk &
Talk
2. The .NET Solution, The building Block of the .NET
platform(CLR,CTS,CLS), the role of the .NET base class libraries,
T1 1 Chalk &
Talk
3. C# characteristics, additional .NET Aware programming Languages,
An overview of .NET binaries (assemblies),
T1 1 PPT
4. The role of the common intermediate language, The role of .NET
type metadata, The role of the assembly manifest, Compiling CIL to
platform specific instruction, Understanding the common type
system, Intrinsic CTS data types, Understanding the common
languages specification,
T1 2 Chalk &
Talk
7. Understanding the common languages runtime, A tour of the .NET
namespace, increasing your namespace nomenclature, Deploying the
.NET runtime
R1 1 Chalk &
Talk
8. The role of the command line compiler (CSC.exe), Building
application using csc.exe, C# compiler option, The command line
debugger,
T2, R1 1 Chalk &
Talk
9. Using the visual studio .Net IDE, Other key aspects of the VS.Net
IDE, Documenting source code via XML,
T1 1 Chalk &
Talk
10. C# preprocessor directives, An interesting Aside: The System.
Environment class.
T2 1 Chalk &
Talk
11. C# Language Fundamentals : An Anatomy of a basic class, Creating
objects: Constructor basic, the composition of an application,
T1 1 PPT
12. Default Assignment and variable scope, member initialization
syntax, Basic input and output with the console class, Understanding
value types and reference types,
T1 1 PPT
13. The master node: System. Objects, The system Data type (And C#
aliases), Converting between value type and reference type: Boxing
and Unboxing,
T1 2 PPT
14. Defining program constraints, Iterations constructs, control flow
constructs,
T1 1 PPT
15. The complete set operator, Defining Custom class methods,
Understanding static methods, Method parameter modifiers,
T1 1 PPT
16. Array manipulation, String manipulation, Enumerations, Defining
structures, Defining custom namespaces
T1 2 PPT
17. Formal definition of the class, Definition the “Default public interface” of a type, Recapping the pillars of OOP,
T2 1 Chalk &
Talk
18. The first pillar: Encapsulation services, T2 1 PPT
19. Pseudo Encapsulation: Creating read only field, T2 1 PPT
20. The second pillar: Inheritance supports keeping family secrets: The
“Protected” keyword, The Nested type definitions, T1 1 PPT
21. The third pillar: Polymorphic support casting between types,
Generating class definitions using Visual Studio.
T1 1 PPT
23. Net. Exceptions and Objects Life Time Ode to errors, Bugs and
exceptions,
R2 2 PPT
24. The role of .NET exceptions handling, The system. Exception base R2 1 PPT
class throwing a generic exception catching exception,
25. CLR system level exception (System. system exception), Custom
application level exception (System. application exception),
R1 2 PPT
26. Handling multiple exception, R1 1 PPT
27. The finally block The last chance exception, R1 1 PPT
28. dynamically identify application and system level exception, R1 1 PPT
29. Debugging system exception using VS.Net, Understanding Object
life time, The CIT of new,
R1 2 Chalk &
Talk
30. The basic of garbage collection, Finalizing a type, Finalization
process, building and Ad hoc destruction method, garbage collection
optimization, The system .GC type.
R2 1 Chalk &
Talk
31. Defining interfaces using C#, Invoking interface member at the
object level, Exercising the shape hierarchy,
T1 2 PPT
32. Understanding explicit interface implementation, Interfaces as
Polymorphic agents, Building interface hierarchies,
T1 1 PPT
33. Implementing interface using VS.Net, T1 1 PPT
34. Understanding the Iconvertible interface, R1 1 PPT
35. Building a custom enumerator, Building cloneable objects, Building
comparable objects,
R1 2 PPT
36. Exploring the system the collection namespace, Building a custom
container (Retrofitting the cars type).
T2 1 PPT
37. Understanding .Net Assembles Problems with classic COM
Binaries, An overview of .Net assembly, Building a simple file test
assembly,
R1 2 Chalk &
Talk
38. A C# Client Application, A Visual Basic .Net Client application, R1 1 Chalk &
Talk
39. Cross Language Inheritance, Exploring the Carlibrary’s manifest, R1 1 PPT
40. Exploring the Carlibrary’s Types, Building the multi file assembly, Using the multi file assembly, Understanding private assemblies,
R1 1 Chalk &
Talk
41. Probing for private assemblies (The Basics), Private assemblies and
XML Configuration files, Probing for private assemblies (The
Details),
T1 1 PPT
42. Understanding Shared assembly, Understanding Shared Names,
Building a Shared assembly,
R2 3 Chalk &
Talk
43. Understanding delay Signing, Installing/Removing shared
assemblies, Using a Shared assembly.
R1 2 Chalk &
Talk
Total Lectures: 52
TEXT BOOKS: [T1] Andrew Troelsen; Pro C# 2008 And The . Net 3. 5 Platform, 4Th Ed; Dreamtech Press
[T2] Bill Evjen, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner; Professional C# 2008
REFERENCE BOOKS: [R1] Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson, Professional
ASP.NET 1.1
[R2] Joel Murach; Murach's C# 2008; Shroff/murachs (2008)
Signature of HOD:__________
Date: __________
1. Discuss .NET Framework architecture in detail by drawing suitable diagram.
2. Describe the components of the .NET framework and explain the features of each
component
3. Discuss the significance of namespace in C#. What are the different entities that can be put
inside a namespace?
4. List the working of CLR in .NET Framework.
5. What is Enumerator Base Type? Explain with an example.
6. Explain .NET Type Metadata. What is role of .NET Type Metadata?
7. What are Unified Classes? List its uses.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Visual Programming & DotNet
Technologies
Assignment No. 1
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 1 Date of Issue: Date of Submission:
1. Discuss the different access modifiers used in C# in detail.
2. Explain any three preprocessor directives with example.
3. What do you mean by Boxing and Unboxing? Explain with the help of examples.
4. What is constructor? Explain its types by giving suitable example in C#.
5. Write a complete procedure for developing application through Command Line Compiler(csc.exe).
6. What are different options available in compilation?
7. Explain the significance of CIL in .NET Framework.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Visual Programming & DotNet
Technologies
Assignment No. 2
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 2 Date of Issue: Date of Submission:
1. Implement a class “Complex” (for the manipulation of Complex Numbers) in C# which should
at least contain the following:
a. Constructor for 0, 1 and 2 arguments.
b. Overloading basic mathematical operator(+,-,/,*) and pre increment operator ++.
c. Appending the format to display the complex numbers.
2. What do you mean by Understanding Object Lifetime?
3. Explain the process of forceful garbage collection in C#, and explain how it is done.
4. What is exception handling? How it can be done in a program for finding the factorial of a
given number.
5. What are different types of inheritance that are supported by C#? Write programs in support of
your answer.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Visual Programming & DotNet
Technologies
Assignment No. 3
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 3 Date of Issue: Date of Submission:
1. Explain Constructors? Its types with suitable examples.
2. What do you mean by Invoking Interface Members at Object Level, Exercise the shape
hierarchy, Interface as Polymorphic agents and interface using C#.
3. Show usage of Iconvertible Interface and Cloneable Objects.
4. Write a program in C# to implement hash table. Use system collection for this purpose.
5. Explain clearly the use of interfaces (used instead of multiple inheritances in C#). Use a
banking system as a programming example.
6. List out the various value and reference types supported in C#?
7. What is the use of static constructor in C#?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Visual Programming & DotNet
Technologies
Assignment No.4
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 4 Date of Issue: Date of Submission:
1. What is an assembly? Discuss the four sections of an assembly. Explain its types
2. What is format of XML document in C#. How it is created in C#?
3. Discuss the elements of XML family.
4. Write short notes on Cross Language Inheritance
5. Describe steps for Installing/Removing shared assembly
6. Describe usage of Delegates in event handling
7. What are sealed classes? Explain with example.
8. What is a delegate? Explain with an example.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Visual Programming & DotNet
Technologies
Assignment No.5
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 5 Date of Issue: Date of Submission:
1. Discuss .NET namespaces.
2. What is an assembly?
3. Use a diagram and briefly discuss the evolution of C# language.
4. Distinguish clearly between value types and reference types in C#
5. Draw .NET framework architecture and explain all its components.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 1
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: UNIT 1 Date of Discussion:
1. Explain conditional statements in .NET.
2. Differentiate between for, while, dowhile and foreach loop.
3. Write a program to find number entered by user is prime or not
4. Write a program to find number entered by user is Armstrong or not.
5. Write a program to draw following pattern
A
ABA
ABCBA
ABCDCBA
ABCDEDBCA
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 2
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Conditional and looping statements Date of Discussion:
1. Define class with suitable example.
2. Define objects, and its role in Object oriented programming.
3. Define class student with data members
a. Roll number
b. Name
c. Course
d. Branch
And functions getdata() and putdata() for inserting record of one student and printing
it.
4. Define class Employee with datamembers
a. Employee ID
b. Name
c. Salary
Insert records of 10 employees and print record of those employees whose salary is
greater than 30000.
5. What is the use of New Keyword?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 3
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Classes and Objects Date of Discussion:
1. What is a base class and derived class?
2. What is inheritance? Explain with example.
3. What is implementation and interface inheritance?
4. How do you prevent a class from being inherited?
5. What is the difference between an abstract class and interface? Explain with suitable
example.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 4
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Inheritance Date of Discussion:
1. Explain in detail, using an appropriate programming example, the use of events
2. Write a program in Visual Basic .Net using C# language to demonstrate multiple
catch statements.
3. What are errors and exception handling in C# .Net? Explain exception handling with
example.
4. What to you understand by object life time?
5. Write a C# program for constructors, static constructors and destructors.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 5
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Events and Exceptions Date of Discussion:
1. Define arrays and its types with suitable example.
2. Explain clearly the difference between jagged arrays and rectangular arrays with
appropriate program examples.
3. Define functions and its types
4. Explain ref, out and params keyword with suitable example.
5. Write function to find factorial of number.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 6
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Array & Functions Date of Discussion:
1. Explain clearly the use of indexors.
2. Use a simple student information system as a programming example.
3. Show usage of Iconvertible Interface and Cloneable Objects.
4. Write a program in C# to implement hash table. Use system collection for this
purpose.
5. Explain creating and using delegates with example.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 7
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 4 (Collection) Date of Discussion:
1. What is an assembly?
2. Discuss the four sections of an assembly. Explain its types
3. What is format of XML document in C#.
4. How it is created in C#? Discuss the elements of XML family.
5. Explain Installing/Removing shared assembly
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Visual Programming & DotNet
Technologies
Tutorial Sheet No. 8
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: UNIT 5 (Assembly) Date of Discussion:
1. How is common language runtime different from other runtimes available?
2. Discuss .NET Framework architecture in detail by drawing suitable diagram.
3. Describe the components of the .NET framework and explain the features of each
component
4. What are different types of JIT.
5. What is an Assembly? What are different types of assembly? If you want to view an
assembly how would you go about it?
6. Discuss the significance of namespace in C#. What are the different entities that can be put
inside a namespace?
7. Use a diagram and briefly discuss the evolution of C# language.
8. Explain different services available with .NET Framework.
9. “C# is a type safe language” verify this statement.
10. Distinguish clearly between value types and reference types in C#.
11. List the working of CLR in .NET Framework.
12. What is Enumerator Base Type? Explain with an example.
13. Explain .NET Type Metadata. What is role of .NET Type Metadata?
14. What are Unified Classes? List its uses.
15. Discuss key features of C# language.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Visual Programming & DotNet Technologies
QB No. 1
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 1 Date of Issue: Date of Submission:
1. Discuss the different access modifiers used in C# in detail.
2. What’s the advantage of using System.Text.StringBuilder over System.String?
3. What is constructor? Explain its types by giving suitable example in C#.
4. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
5. Explain any three preprocessor directives with example.
6. How do I call a member method and pass a primitive type( value type) by reference?
7. What do you mean by Boxing and Unboxing? Explain with the help of examples.
8. Write C# code which shows the usage of switch statement. What is purpose of break statement in
this code?
9. Write a complete procedure for developing application through Command Line Compiler(csc.exe).
10. Write program in C# to find whether a given string is palindrome or not.
11. Discuss a way of defining a custom namespace in C#.
12. What are different options available in compilation?
13. Write program in C# to sort given list of names.
14. Explain the significance of CIL in .NET Framework.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Visual Programming & DotNet Technologies
QB No. 2
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 2 Date of Issue: Date of Submission:
1. What is synchronization of threads? Why it is required.
2. Explain Web Form Life cycle in C# in detail.
3. Implement a class “Complex” (for the manipulation of Complex Numbers) in C# which should
at least contain the following:
a. Constructor for 0, 1 and 2 arguments.
b. Overloading basic mathematical operator(+,-,/,*) and pre increment operator ++.
c. Appending the format to display the complex numbers.
4. Explain how delegate is used in event handling.
5. What do you mean by Understanding Object Lifetime?
6. Explain the process of forceful garbage collection in C#, and explain how it is done.
7. Write short note on Ad Hoc destructor method.
8. What is exception handling? How it can be done in a program for finding the factorial of a
given number.
9. How do you convert a numeric type to a string?
10. What is mutable string in C#? Explain with an example.
11. What are different types of inheritance that are supported by C#? Write programs in support of
your answer.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Visual Programming & DotNet Technologies
QB No. 3
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 3 Date of Issue: Date of Submission:
1. Explain thefollowing in context with interface :
a. Multicast delegates
b. Cloneable object
2. Explain Constructors? Its types with suitable examples.
3. What do you mean by Invoking Interface Members at Object Level, Exercise the shape
hierarchy, Interface as Polymorphic agents and interface using C#.
4. Explain ICollection, IList, IEnumerator and IComparer interface in detail.
5. Show usage of Iconvertible Interface.
6. Write a program in C# to implement hash table. Use system collection for this purpose.
7. Explain clearly the use of interfaces (used instead of multiple inheritances in C#). Use a
banking system as a programming example.
8. What are various containers in C#? State difference between finalize and finally in C#?
9. List out the various value and reference types supported in C#?
10. What is the use of static constructor in C#?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Visual Programming & DotNet Technologies
QB No.4
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 4 Date of Issue: Date of Submission:
1. Explain the concept of shared libraries in C#?
2. What is an assembly? Discuss the four sections of an assembly. Explain its types
3. What do you mean by COM/DCOM? Explain their disadvantages.
4. What do you mean by delay signing and what are private assemblies?
5. What is format of XML document in C#. How it is created in C#?
6. Discuss the elements of XML family.
7. Write short notes on Cross Language Inheritance
8. Describe steps for Installing/Removing shared assembly
9. Describe usage of Delegates in event handling
10. What are sealed classes? Explain with example.
11. What is a delegate? Explain with an example.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Visual Programming & DotNet Technologies
QB No.5
Course Code: TCS 605
Faculty : Abhilasha Singh Rathor
Branch: CSE Semester: 6th
Unit/Title: Unit 5 Date of Issue: Date of Submission:
PRINCIPLES OF MANAGEMENT (THU-608)UNIT 1INTRODUCTION TO MANAGEMENT: Theories of management: Traditional behavioral, contingency and systems approach. Organization as a system.UNIT 2MANAGEMENT INFORMATION: Interaction with external environment. Managerial decision making and MIS.UNIT 3PLANNING APPROACH TO ORGANIZATIONAL ANALYSIS: design of organization structure; job design and enrichment; job evaluation and merit rating.UNIT 4MOTIVATION AND PRODUCTIVITY: Theories of motivation, leadership styles and managerial grid. Co-ordination, monitoring and control in organizations. Techniques of control. Japanese management techniques. Case studies.
TEXT BOOK:1. Peter Drucker, Harper and Row: The Practice of Management.2. Koontz: Essentials of Management, PHI Learning.3. Staner: Management, PHI Learning.4. Daft: Principles of Management, Cengage Learning.5. T. N. Chhabra: Principle and Practice of Management, Dhanpat Rai, New Delhi.6. Hirschey: Managerial Economics, Cengage Learning.7. T. R. Banga and S.C. Sharma: Industrial Organisation and Engineering Economics,Khanna Publishers.8. O.P. Khanna: Industrial Engineering and Management, Dhanpat Rai.9. Joel Dean: Managerial Economics, PHI learning.10. V. L. Mote, Samuel Paul and G.S. Gupta: Managerial Economics Concepts & Cases,TMH, New Delhi.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
SYLLABUS
Subject Name : Principles of Management
Subject Code : THU-608Faculty : Ms. Manvi Chopra
Branch: CSE Semester: 6th
DBIT DEHRADUN
LESSON PLAN
SEMESTER/YEAR: 6th
/3rd
DEPARTMENT: ECE
COURSE: PRINCIPLES OF MANAGEMENT CODE: THU-601
S.
No.
Topic Name
Reference/
Text Book/
Web
(R/T/W)
No. Of
Lectures
Delivery
Method
Remarks
1. INTRODUCTION TO MANAGEMENT:
T1,R1 2 Chalk & Talk
Theories of management: Traditional behavioral
T1,R1 2 Chalk & Talk
contingency and systems approach
T1,R1 2 Chalk & Talk
Organization as a system.
T1,R1 2 Chalk & Talk
2 MANAGEMENT INFORMATION:
T1,R1 2 Chalk & Talk
Interaction with external environment T1,R1 2 Chalk & Talk
Managerial decision,making
T1,R1 2 Chalk & Talk
MIS T1,R1 2 Chalk & Talk
3 PLANNING APPROACH TO ORGANIZATIONAL
ANALYSIS:
T1,R1 2 Chalk & Talk
design of organization structure;
T1,R1 2 Chalk & Talk
job design and enrichment
T1,R1 2 Chalk & Talk
job evaluation
T1,R1 1 Chalk & Talk
merit rating.
T1,R1 2 Chalk & Talk
4.. MOTIVATION AND PRODUCTIVITY:
T1,R1 2 Chalk & Talk
Theories of motivation
T1,R1 2 Chalk & Talk
leadership styles
T1,R1 1 Chalk & Talk
managerial grid
T1,R1 2 Chalk & Talk
Co-ordination T1,R1 1 Chalk & Talk
Monitoring
T1,R1 1 Chalk & Talk
control in organizations
T1 1 Chalk & Talk
Techniques of control
T1,R1 2 Chalk & Talk
Japanese management techniques.
T1 1 Chalk & Talk
Total Lectures: 40
REMARKS/RECOMMENDATIONS FOR FUTURE:
EXTRA CLASS TAKEN (IF ANY):
TEXT BOOKS:
[T1] Himanshu Aggarwal
[T2]
REFERENCE BOOKS:
[R1] L M Parsad
Approved By
Signature of HOD:__________
Date: __________
Q.1 What is Management and why is it important to learn about management?
Q.2 List the principles of scientific management.
Q.3 How does the job of a top manger differ from those of the several levels of middle management?
Q.4 What are the 14 principles given by Hennry Fayol related to modern management.
Q.5 What are the essential skills of a manager?
Q.6 What are the functions of managers? Explain the roles of managers as suggest by Henry Mintzberg.
Q.7 What do you understand by bureaucracy? Discuss the characteristics of Max weber bureaucratic model.
Q.8 The Neo Classical Theory is human Oriented. Discuss. State the characteristics of Neo Classical Theory.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Principle of Management Assignment No. 1
Course Code:THU-601
Faculty :Ms. Manvi Chopra
Branch: All
Branches
Semester: VI
Unit/Title: 1/ Introduction of Management
Date of Issue: Date of Submission:
Q.1 Define and describe business process and their relationship to information systems.
Q.2 What are business processes? What role do they play in organizations? How are they enhanced by
information systems?
Q.3 Explain the major constraints in operating the MIS.
Q.4 Explain the role of organizations environment on the MIS and business processes?
Q.5 What is Decision Support System? Briefly explain the characteristics of Decision Support System.
Q.6 What do you understand by environmental analysis? Discuss the procedure of environmental
analysis.
Q.7 Explain the planning for implementation step in MIS.
Q.8 Define an information system from both a technical and a business perspective.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Principle of Management Assignment No. 2
Course Code:THU-601
Faculty :Ms. Manvi Chopra
Branch: All
Branches
Semester: VI
Unit/Title: 2/ Management information system
Date of Issue: Date of Submission:
Q.1 Explain the nature and significance of planning?
Q.2 Explain the roles of planning function?
Q.3 What is Job Evaluation Process Chart.
Q.4 Define Performance Appraisal. What are its salient features? What are its merits & demerits.
Q.5 What are the various methods of job Appraisal?
Q.6 What is organizational analysis? Explain the models of organizational analysis?
Q.7 Discuss the planning approach to organizational analysis?
Q.8 What is merit rating and discuss its limitations.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Principle of Management Assignment No. 3
Course Code:THU-601
Faculty :Ms. Manvi Chopra
Branch: All
Branches
Semester: VI
Unit/Title: 3/ Planning Approach to organization Analysis
Date of Issue: Date of Submission:
1. Name the steps involved in motivation process.
2. What is Motivation and how is Moslow’s hierarchy of needs theory a theory of motivation? 3. What are McGregor’s Theory X and Theory Y assumptions? 4. What are three needs Mc Clelland proposed which are present in work situation?
5. What is the relationship between planning and controlling in Organization control process? 6. “ Leadership is a driving force which gets things done by others.” Examine and comment. 7. “Good Leadership is an integral part of effectiveness direction.” Discuss, bringing out clearly the
qualities of an effective leader. 8. Define Leadership. Explain the various Styles and theories of leadership.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
ASSIGNMENT SHEET
Course Name: Principle of Management Assignment No. 3
Course Code:THU-601
Faculty :Ms. Manvi Chopra
Branch: All
Branches
Semester: VI
Unit/Title: 4/ Motivation and Productivity
Date of Issue: Date of Submission:
CASE -1
“Managing by objective is nothing new here” , said commissioner Gaurav of the metropolis Police Department. “ We have always had important objectives toward which every one in my department
strives. Our job is to maintain law and order, firmly but fairly; to protect human lives and property; and to
be the conscience and spirit of the general welfare of the millions of people who call our city home.
Everyone in this department knows these objectives. Every man and woman knows that he or she must
work toward them and that, if they do not, they will be replaced. I recognize that in a manufacturing
concern you can measure objectives by profits, sales, costs and product output. We can’t, of course, do that, for we are service operation. But this does not mean that we are not managing by objectives. Ask
anyone in my department?
Questions
1. (a) Is commissioner Gaurav engaging in managing by objectives? What, if anything, is missing?
(b) What would you suggest the commissioner do?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name: Principles of Management Tutorial Sheet No. 1
Course Code:THU-608
Faculty :Ms. Manvi Chopra
Branch: CSE Semester: VI
Unit/Title: Date of Discussion:
CASE - 2
The personnel Manager of Bushan steels, an engineering unit based at Kolkata has been banging the
executive conference table of the company for some months asserting that the true function of
Management is to take care of the needs of the staff and let the staff take care of the goals of the
organization. The marketing Manager has, on the other hand, been expressing the view that the real
function of management is to take care of the market and staff must fall in line with the objectives, plans
and priorities of the company.
Question
Which of these views is correct and why?
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
TUTORIAL SHEET
Course Name:Principles of Management Tutorial Sheet No. 2
Course Code:THU-608
Faculty :Ms. Manvi Chopra
Branch: CSE Semester: VI
Unit/Title: Date of Discussion:
Unit - 1
1) Define Management.
2) Is management – an art or science?
3) Give some features of management.
4) What are the essential skills of a manager?
5) Define scientific management.
6) List the principles of scientific management.
8) State the contributions of Fayol towards management.
9) What do you mean by ‘Scalar chain’?
10) What do you mean by ‘Esprit de corps’?
11) What are the various levels of management?
12) What are the roles played by a manager?
13) What are the functions of management?
14) What are the classifications of business organization?.
15) Trace the evolution of management with reference to the contributions made by management thinkers.
16) What is the role of scientific management in the modern era?
17) Explain the contributions of F.W.Taylor to Management.
18) Explain the contributions of Henri Fayol.
19) Explain the contributions of Abraham Maslow and McGregor.
20) Discuss the nature, purpose, merits and demerits of management.
21) Differentiate between Management and Administration with suitable examples.
22 )Discuss the merits and demerits of various types of organization.
23) Explain the recent developments in modern management theory.
Unit-2 &3
1) Trace the steps involved in the decision-making process.
2) Explain in detail the classification of decisions.
DEV BHOOMI INSTITUTE OF TECHNOLOGY, DEHRADUN
QUESTION BANK
Course Name: Principles of Management
Course Code:THU-608
Faculty :Ms. Manvi Chopra
Branch: CSE Semester: VI
Unit/Title: Date of Discussion:
3) Discuss the various quantitative techniques for decision-making
1) Define ‘Planning’. 2) What are the types of planning? .
3) Define the ‘mission’ and ‘vision’ of an organization?
4) What do you mean by MBO?
5) What are policies?
6) What are the various types of plans?
7) Define the term ‘Strategy’. 8) State the features of Policies. .
9) What do you understand by the term ‘Planning premises’?
10) What are the main factors to considered for implementation of a strategy?
11) Differentiate objectives and goals.
12) Distinguish between strategy and tactics.
13) State the hierarchy of objectives.
14) Differentiate policies and procedures.
15) What are the different types of policies?
16) What do you mean by SWOT analysis
17) State the levels of strategy.
18) What are the main objectives of a project?
19) Mention the features of MBO.
20) What is Forecasting?
21) Define planning. Discuss the steps involved in planning.
22) “Planning is all pervasive.”- Discuss with reference to its nature, merits and demerits.
23) Explain the various characteristics identified in planning.
24) Discuss in detail the planning of premises.
25) What are objectives? State the characteristic features and requirements of a sound objective.
26) Discuss in detail the features and process of MBO. (or) Discuss the contributions of Peter.F.Drucker to management.
27) Differentiate between Objectives & Goals with examples.
28) Differentiate between Strategy & Policy.
29) Discuss about the effective implementation of a strategy.
30) Explain in detail the strategic planning process.
31) Discuss the steps involved in formulation of a Policy.
32) Classify and explain policies. Give the requisites of a sound. 13) Discuss the merits and demerits of different types of plans
35) Discuss the different types of planning.
36) What is job design?
37) What are the benefits of specialization?
38) What are the limitations of specialization?
39) What is job rotation?
40) What is job enlargement?
41) What is job enrichment?
Unit-4
1) Define Motivation.
2) Name the steps involved in motivation process.
3) What are the types of motivation?
4) What are the different Motivational theories?
5) List out the basic needs in hierarchy.
6) Who is a leader?
7) Define Leadership.
8) List the few leadership theories.
9) State house path goal approach.
10) Name the various leadership styles.
11) Explain the importance of leadership.
12) Explain the motivation process.
13) Explain the Maslow’s need hierarchy theory. 14) Explain the special motivational techniques.
15) Explain the different styles of leadership.
16) What are the four basic ingredients of leadership skill?
17) Explain the McClelland’s needs theory. 18) Explain the special motivational techniques.
19)Explain the trait approaches to leadership theories.
20) What is Control?
21) Define control.
22) What are the characteristics of control?
23) Why need of control in the organization?
24) What are the importances of controlling?
25) What are the disadvantages of control?
26) What are the interrelationship between planning and control?
27) Give some critical point standards of control
28) What are the types of control?
29) What is feedback control?
30) What is concurrent control?
31) What is feed forward control?
32) List the differences between feedback control and feed forward
33) What are the requirements for effective control?
34) Explain briefly the control techniques.
35) Discuss the control process and types of control.
36) What are the characteristics of control? Explain its need for management.
37) Explain the characteristic of an ideal control system.
38) Define control. Describe the features of a good control system.
39) What are the various good qualities of efficient controlling system?