#include#include #include #define f(x) 3*x*x - 6*x + 2 int main() { int n; float x0,a[50],b[50]; a[0]=2; a[1]=-6; a[2]=3; clrscr(); n=2; //printf("Enter Degree of Polynomial : "); //scanf("%d", &n); printf("Enter the value at which polynomial is to be evaluated : "); scanf("%f", &x0); b[n] = a[n]; while(n>0){ b[n-1] = a[n-1]+b[n]*x0; n--; } printf("Value of polynomial f(%0.4f)=%0.4f",x0,b[0]); getch(); return 0; }
BSc CSIT (Computer Science and Information Technology) Old questions and notes
Thursday, January 11, 2018
Horner's Method Program
Fixed Point Iteration Method Program
#include#include #include #define E 0.0001 #define f(x) 3*x*x - 6*x + 2 #define g(x) (6*x-2)/(3*x) int main(){ float x0, x1, err; int count = 0; clrscr(); printf("Enter Initial Guess : "); scanf("%f", &x0); printf("\nIteration\tInitialValue\tNewValue\n"); do{ x1 = g(x0); count++; printf("\n%d\t\t%0.4f\t\t%0.4f\n",count, x0,x1); err = (x1-x0)/x1; x0 = x1; }while(fabs(err) > E); printf("\nIteration : %d\n", count); printf("\nThe root is %0.4f", x1); getch(); return 0; }
Bisection Method Program
#include#include #include #define E 0.0001 #define f(x) 3*x*x+6*x-2 int mainy(){ int count=0; float x0, x1, x2, f0, f1, f2, err; printf("Enter the value of Lower Limit: "); scanf("%f", &x1); printf("Enter the value of Upper Limit: "); scanf("%f", &x2); printf("\nLower Limit\tUpper Limit\tMid Value\n"); f1=f(x1); f2=f(x2); if((f1*f2)>0){ printf("Solution doesnot exist"); } else{ do{ count++; x0=(x1+x2)/2; f0=f(x0); printf("%0.4f\t\t%0.4f\t\t%0.4f\n", x1,x2, x0); if((f1*f0)<0){ x2=x0; f2=f0; } else{ x1=x0; f1=f0; } err=fabs((x2-x1)/x1); }while(err>E); printf("\nRoot: %0.4f", x0); printf("\nFunctional Value: %0.4f", f0); printf("\No of Iteration: %d", count); } getch(); return 0; }
Computer Graphics (CG) BSc CSIT 2074 Question Paper
Tribhuvan University
Institute of Science and Technology
Bachelor Level/Second Year/ Fourth Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc.254) Pass Marks: 24
(Computer Graphics) Time: 3 hours
Candidates are required to give their answers in their own words as far as possible.
The figures in the margin indicate full marks.
Attempt all the questions.
- Digitize the endpoint (10,18), (15,8) using Bresenham's algorithm. [6]
- What are the object space and image space method of hidden surface removal? Describe the back face detection method of hidden surface removal. [6]
- Perform the scaling transformation to the triangle with vertices A(6,9), B(10,5), C(4,3) with scaling factors Sx = 3 and Sy = 2. [6]
- Explain about parametric cubic curve. Describe the properties of Bezier Curve. [3+3=6]
-
Explain the visual effect that occurs when during animation of a Gouraud shading polyhedron, the center of a highlight moves from one
vertex to another along an edge. [6]
OR
Illustrate the difference between orthographic (parallel) and perspective projection. [6] - Define window and view port. Describe three dimension windows to view port transformation with matrix representation for each step. [2+4=6]
- Consider a raster scan system having 12 inch by 10 inch screen with resolution of 100 pixels per inch in each direction. If the display controller of this system refreshes the screen at the rate of 50 frames per second, how many pixels could be accessed per second and what is the access time per pixel of the system? [6]
- Find the composite transformation matrix for reflection about a line y=mx+c. [6]
-
Construct the polygon table for a object with six vertex, eight edge and three surface. [6]
OR
Explain the role of computer graphics on animation. Define clipping operation with example. [3+3=6] -
Digitize an ellipse with center (20,20) and x-radius=8 and y-radius=6. [6]
OR
Find the new co-ordinates of a unit cube 90 degree rotated about an axis defined by its end points A(2, 1, 0) and B(3, 3, 1). [6]
Monday, January 8, 2018
System Analysis and Design (SAD) BSc CSIT 2074 Question Paper
Tribhuvan University
Institute of Science and Technology
Bachelor Level/Second Year/ Fourth Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc.252) Pass Marks: 24
(System Analysis and Design) Time: 3 hours
Candidates are required to give their answers in their own words as far as possible.
The figures in the margin indicate full marks.
Attempt any two: (2 x 10 = 20)
- Define informartion system? Why do we need it? Discuss different types of information systems with suitable example of each.
- What is DFD? Discuss different levels of DFD with suitable example.
- What is system implementation? Discuss different activities of system implementation in detail.
- What is forward, reverse and round-trip engineering? Discuss.
- Discuss structured English with suitable example.
- Define feasibility study. Why do we need it?
- What is cost benefit analysis? How can you find system cost?
- How can you format forms and reports? Discuss.
- Why do we need normalization? Discuss 3NF with example.
- What is file organization? What are the objectives for choosing file organization? Discuss sequential file organization.
- What is maintenance? Discuss different types of maintenance acitivites.
- What is project management? Discuss different acitivities of software project management.
-
Write short notes on:
(a) Joint application development (b) Role of CASE in data modeling
Attempt any eight: (8 x 5 = 40)
Theory of Computation (TOC) BSc CSIT 2074 Question Paper
Tribhuvan University
Institute of Science and Technology
Bachelor Level/Second Year/ Fourth Semester/ Science Full Marks: 80
Computer Science and Information Technology (CSc.251) Pass Marks: 32
(Thoery of Computation) Time: 3 hours
Candidates are required to give their answers in their own words as far as possible.
The figures in the margin indicate full marks.
Attempt all the questions.
-
Convert the NFA-ε into NFA without ε.
-
Find the regular expressions describing the following languages over alphabet {0, 1}*.
(a) The language of all strings containing atleast two 0's.
(b) The language of all strings containing both 00 and 010 as substrings. -
Construct FA recognizing the languages described by following regular expressions.
(a) (10* + 01*)11*
(b) (0 + 1)*(01+1000)0*
- What do you mean by a CFG in CNF? What are the criteria to be a CFG in CNF? Explain.
- Define the term Regular Grammar. What is the relation of Regular Grammar with other grammars? Explain
- Define the universal Turing machine and describe its role.
- Show that the complement of a recursive language is recursive.
- Explain, how can you encode a Turing machine into universal language.
- Describe the extended transition function of a NFA. Construct a NFA accepting the language over {a, b}* with each strings containing three consecutive b's. Show by extended function that it accepts abbb.
-
Define the term immediate left recursion. How can you convert a grammar with immediate left recursion into equivalent grammar
without left recursion? Remove left recursion from the following grammar.
S -> S1S
S1 -> S1 + T| T
T -> T*F| F
F -> (S1)| a - Contruct a PDA that accepts the strings of language L ={wwR| w is in {a,b}*}.
- Describe multi tape Turing machine. Show that multi-tape Turing machine and one tape Turing machines are equivalent.
- Define class P and NP with example. Show that: If P1 is NP complete and three is a polynomial time reduction of P1 to P2 then P2 is NP-complete.
-
Write short notes on (Any two)
(a) Solvable vs Unsolvable problems
(b) CNF Satisfiability
(c) Recursive and Recursively Enumerable Languages
Database Management System (DBMS) BSc CSIT 2074 Question Paper
Tribhuvan University
Institute of Science and Technology
Bachelor Level/Second Year/ Fourth Semester/ Science Full Marks: 60
Computer Science and Information Technology (CSc.253) Pass Marks: 24
(Database Management System) Time: 3 hours
Candidates are required to give their answers in their own words as far as possible.
The figures in the margin indicate full marks.
Attempt all the questions.
- Answer the following questions in short: [5x2=10]
(a) Data abstraction
(b) Network data model
(c) Trigger
(d) Trivial functional dependency
(e) Serializable schedule
- (a) Who is database administrator? What are the main functions of database adminstrator? [2+3=5]
(b) Construct an E-R diagram for online course registration where students registers courses online. [5] -
Consider the following database, where primary keys are underlined
teacher(TID, TName, Qualification)
teaches(TID, CID) course(CID, CName, CCode)
Construct the following relational algebra and SQL queries for this database. [10]
(a) Find the names of all teachers who have PhD qualification.
(b) Find the name of all courses taught by Ram Prasad.
(c) Find the total number of courses taught by Ram Prasad. -
(a) Discuss referential integrity with example. [5]
(b) What is functional dependency? Why do we need inference rules? [2.5+2.5=5] - What are the benefits of using normalization? Discuss 1NF, 2NF, and 3NF with suitable example. [2.5+7.5=10]
-
(a) Why do we need concurrency control? Discuss two phase locking protocol. [2+3=5]
(b) Why do we need database recovery? Discuss shadow paging technique for database recovery. [2+3=5]
Subscribe to:
Posts (Atom)