WELCOME TO GTU MATERIAL

GTU MATERIAL PROVIDE YOU ALL TYPE OF EDUCATION MATERIAL | DOWNLOAD FREE MATERIAL | ALL TYPE OF EDUCATION SOFTWARES | EXAM ALERTS | EBOOKS | EXAM PAPERS | TIME TABLE | ALL TYPE OF SYLLABUS | MBA | MCA | ENGINEERING | BE | FREE MATERIAL PROVEDE

SHARE YOUR MATERIAL ALSO.. PLEASE SEND ME YOUR MATERIAL WHO SHARE WITH PEOPLE WE PUBLISH IN GTU MATERIAL WITH YOU NAME.. PLEASE SEND US YOUR NAME, COLLEGE NAME, AND STREAM SO THAT WE CAN PUBLISH WITH YOUR NAME..

THANKS YOU SO MUCH.....

Showing posts with label GTU MATERIAL. Show all posts
Showing posts with label GTU MATERIAL. Show all posts

Friday, 26 August 2011

Useful Material for MBA students - sem-III ~ GTU MATERIAL

YOUR 3rd SEMESTER MATERIAL PROVIDE YOU AS SOON AS POSSIBLE ..

THANK YOU FOR VISIT..

 - GTU MATERIAL


Friday, 18 February 2011

GTU C PROGRAMS | HEAP SORT PROGRAM

C:
-------------------------------------------------------------------------
/* HEAP SORT */
/* HEAP.C */
# include<stdio.h>
void  heap_sort(int *, int );
void create_heap(int *, int);
void display(int *, int);
/*  Definition of the function */
void create_heap(int list[], int n )
{
 int k, j, i, temp;
 for(k = 2 ; k <= n;  ++k)
 {
  i = k ;
  temp = list[k];
  j = i / 2 ;
  while((i > 1) && (temp > list[j]))
  {
   list[i] = list[j];
   i = j ;
   j = i / 2 ;
   if ( j < 1 )
    j = 1 ;
  }
  list[i] = temp ;
 }
}
/* End of heap creation function */
/* Definition of the function */
void heap_sort(int list[], int n)
{
 int k, temp, value, j, i, p;
 int step = 1;
 for(k = n ; k >= 2; --k)
 {
  temp = list[1] ;
  list[1] = list[k];
  list[k] = temp ;
  i = 1 ;
  value = list[1];
  j = 2 ;
  if((j+1) < k)
   if(list[j+1] > list[j])
    j ++;
  while((j <= ( k-1)) && (list[j] > value))
  {
   list[i] = list[j];
   i = j ;
   j = 2*i ;
   if((j+1) < k)
    if(list[j+1] > list[j])
     j++;
    else
     if( j > n)
      j = n ;
   list[i] = value;
  } /* end of while statement */
  printf("\n Step = %d ", step);
  step++;
  for(p = 1; p <= n; p++)
   printf(" %d", list[p]);
 } /* end for loop */
}
/* Display function */
void display(int list[], int n)
{
 int i;
 for(i = 1 ; i <= n; ++ i)
 {
  printf("  %d", list[i]);
 }
}
/* Function main */
void main()
{
 int list[]={ 0,10,23,64,21,74,95,2,59,44,87,55};
 int i, size = 11 ;
 clrscr();
/* printf("\n Size of the list: %d", size);
 for(i = 1 ; i <= size ; ++i)
 {
  list[i] = rand() % 100;
 }*/
 printf("\n Entered list is as follows:\n");
 display(list, size);
 create_heap(list, size);
 printf("\n Heap\n");
 display(list, size);
 printf("\n\n");
 heap_sort(list,size);
 printf("\n\n Sorted list is as follows :\n\n");
 display(list,size);
 getch();
}

--------------------------------------------------------------------------
C++ :
--------------------------------------------------------------------------
  // HEAP SORT
  // HEAP.CPP
  # include<iostream.h>
  class heap_s
    {
 private:
 public:
    void  heap_sort(int *, int );
    void create_heap(int *, int);
    void display(int *, int);
    };

 //  definition of the function
  void heap_s :: create_heap(int list[], int n )
  {
    for( int k = 2 ; k <= n;  ++k)
       {
  int i = k ;
  int temp = list[k];
  int j = i / 2 ;
  while((i > 1) && (temp > list[j]))
     {
      list[i] = list[j];
      i = j ;
      j = i / 2 ;
      if ( j < 1 )
        j = 1 ;
     }
     list[i] = temp ;
   }
       }
// end of heap creation function
// definition of the function
 void  heap_s :: heap_sort(int list[], int n)
 {
    for( int k = n ; k >= 2; --k)
      {
  int temp = list[1] ;
  list[1] = list[k];
  list[k] = temp ;
  int i = 1 ;
  int value = list[1];
  int j = 2 ;
  if((j+1) < k)
     if(list[j+1] > list[j])
        j ++;
         while((j <= ( k-1)) && (list[j] > value))
   {
    list[i] = list[j];
    i = j ;
    j = 2*i ;
     if((j+1) < k)
       if(list[j+1] > list[j])
         j++;
         else
         if( j > n)
         j = n ;
         list[i] = value;
         } // end of while statement
       cout<<"\n";
       for(int p=1; p<=n; p++)
       cout<<"  "<<list[p];
    } //end for loop
        }
  void heap_s :: display(int list[], int n)
      {
 for( int i = 1 ; i <= n; ++ i)
     {
       cout<<"  "<<list[i];
     }
       }
    void main()
  {
    heap_s sort;
    int list[100];
    int size ;
    cout<<"\n Input the size of the list :";
    cin>>size;

    for(int i = 1 ; i <= size ; ++i)
     {
       cout<<"\n Input values for :" <<i<< " : ";
       cin>>list[i];
     }
     cout<<"\n Entered list is as follows:\n";
     sort.display(list, size);
     sort.create_heap(list, size);
     cout<<"\n Heap\n";
     sort.display(list, size);
     sort.heap_sort(list,size);
     cout<<"\n Sorted list is as follows :\n";
     sort.display(list,size);
  }



GTU C PROGRAMS | SHELL SORT PROGRAM

C :
-------------------------------------------------------------------------
/* shell.c */
/* shell sort */
#include <stdio.h>
#include <stdlib.h>
void shell_sort(int array[], int size)
{
 int temp, gap, i, exchange_occurred;
 gap = size / 2;
 do {
  do {
   exchange_occurred = 0;
   for (i = 0; i < size - gap; i++)
    if (array[i] > array[i + gap])
    {
     temp = array[i];
     array[i] = array[i + gap];
     array[i + gap] = temp;
     exchange_occurred = 1;
    }
  } while (exchange_occurred);
 } while (gap == gap / 2);
}
void main(void)
{
 int values[50], i;
 printf("\n Unsorted list is as follows \n");
 for (i = 0; i < 50; i++)
 {
  values[i] = rand() % 100;
  printf(" %d", rand() %100);
 }
 shell_sort(values, 50);
 printf("\n Sorted list is as follows \n");
 for (i = 0; i < 50; i++)
  printf("%d ", values[i]);
}
-------------------------------------------------------------------------
C++
-------------------------------------------------------------------------
// SHELL SORTING
// SHELL.CPP
# include<iostream.h>
#include <stdio.h>
#include <stdlib.h>
   class shell
       {
 private:
  int temp, gap, i, swap;
 public:
  void shell_sort(int *, int );
  void display(int *, int);
       };
void shell :: shell_sort(int array[], int size)
   {
     gap = size / 2;
     int k =0;
   do {
    do {
      swap = 0;
      k++;
      for (i = 0; i < size - gap; i++)
       if (array[i] > array[i + gap])
        { 
          temp = array[i];
          array[i] = array[i + gap];
          array[i + gap] = temp;
   swap = 1;
 }
 for(int t=0;t<size; t++)
  cout<<" "<<array[t];
 cout<<"  Swap="<<swap;
 cout<<"\n";
    } while (swap);
   } while (gap = gap / 2);
  }
  void shell :: display(int list[], int n)
     {
       cout<<"\n Sorted list is as follows:\n";
       for( int i = 0; i < n; i++)
 cout<<"  " << list[i];
     }
   void main(void)
    {
    shell sort;
    int list[50];
    int number;
   cout<<"\n Input the number of elements in the list:";
   cin>>number;
   for (int i = 0; i < number; i++)
   {
      cout<<"\n Input the value for the "<< i+1<<" : ";
      cin>>list[i];
   }
   sort.shell_sort(list, number);
   sort.display(list,number);
 }

GTU C PROGRAMS | RADIX SORT PROGRAM

C :
--------------------------------------------------------------------------

/* RADIX SORT */
/* RADIX.C*/
# include<stdio.h>
# include<malloc.h>
# include<stdlib.h>
struct node
{
 int data ;
 struct node *next;
};
typedef struct node node1;
node1 *first;
node1 *pocket[100], *pocket1[100];
void create_node(node1 *, int);
void display(node1 *);
node1 *radix_sort(node1 *);
int large(node1 * );
int numdig(int );
int digit(int , int);
void update(int, node1 *);
node1 *Make_link(int, node1 *);
/* This function create nodes and take input data */
void  create_node(node1 *rec, int n)
{
 int i, j, k;
 for(i = 0 ; i< n; i++)
 {
  rec->next = (node1 *) malloc(sizeof(node1));
  printf("\n First node value: %d: ", i);
  scanf("%d", &rec->data);
  rec = rec->next;
 }
 rec->data = NULL;
 rec->next = NULL;
}
/* Output Function */
void  display(node1 *rec)
{
 while(rec != NULL)
 {
  printf(" %d", rec->data);
  rec= rec->next;
 }
}
/* This radix sort function */
node1 *radix_sort(node1 *rec)
{
 node1 *r, *nex;
 int poc = 0 ;
 int i, j, k;
 int larg = large(rec);
 int m = numdig(larg);
 /* These statements create pockets */
 for(k = 0 ; k < 10; k++)
 {
  pocket[k] = (node1 *)malloc(sizeof(node1));
  pocket1[k] = (node1 *)malloc(9*sizeof(node1));
 }
 /* These statements initialize pockets */
 for(j = 1; j <= m ; j++)
 {
  for(i = 0 ; i < 10 ; i++)
  {
   pocket[i] = NULL;
   pocket1[i] = NULL ;
  }
  r = rec ;
  while(r != NULL)
  {
   int dig = digit(r->data, j);
   nex = r->next ;
   update(dig,r);
   r = nex;
  }
  if(r!= NULL)
  {
   int dig = digit(r->data,j);
   update(dig,r);
  }
  while(pocket1[poc] == NULL)
   poc ++;
  rec = Make_link(poc, rec);
 }
 return(rec);
}
/* This function finds largest number in the list */
int large(node1 *rec)
{
 node1 *save ;
 int p = 0;
 save = rec ;
 while(save != NULL)
 {
  if(save ->data > p)
  {
   p = save->data;
  }
  save = save->next ;
 }
 printf("\n Largest element: %d", p);
 return(p);
}
/* This Function finds number digits in a number */
int numdig(int large)
{
 int temp = large ;
 int num = 0 ;
 while(temp != 0)
 {
  ++num ;
  temp = temp/10 ;
 }
 printf("\n  Number of digits of the number %d is %d\n", large, num);
 return(num);
}
/* This function scarve a number into digits */
int digit(int num, int j)
{
 int dig, i, k;
 int temp = num ;
 for(i = 0 ; i < j ; i++)
 {
  dig = temp % 10 ;
  temp = temp / 10 ;
 }
 printf("\n  %d digit of number  %d is %d", j, num, dig);
 return(dig);
}
/* This function updates the pockets value */
void  update(int dig, node1 *r)
{
 if(pocket[dig] == NULL)
 {
  pocket[dig] = r ;
  pocket1[dig] = r ;
 }
 else
 {
  pocket[dig]->next = r ;
  pocket[dig] = r ;
 }
 r->next = NULL;
}
/* This function create links between the nodes */
node1* Make_link(int poc , node1 *rec)
{
 int i, j, k;
 node1 *pointer;
 rec = pocket1[poc];
 for(i = poc +1 ; i< 10 ; i++)
 {
  pointer = pocket[i-1];
  if(pocket[i] != NULL)
   pointer->next= pocket1[i];
  else
   pocket[i] = pointer ;
 }
 return(rec);
}
/* Main function */
void  main()
{
 node1 *start, *pointer;
 int number;
 printf("\n Input the number of elements in the list:");
 scanf("%d", &number);
 start = (node1 *)malloc(sizeof(node1));
 create_node(start, number);
 printf("\n Given list is as follows \n");
 display(start);
 start = radix_sort(start);
 printf("\n Sorted list is as follows:\n");
 display (start);
}
-------------------------------------------------------------------------
C++

-------------------------------------------------------------------------
 // RADIX SORT
 // RADIX.CPP
#include<iostream.h>
#include<conio.h>
#include<malloc.h>
#include<stdlib.h>
struct node
{
 int data;
 struct node *next;
};
typedef struct node node1;
class radix
{
 public:
  node1 *first;
  node1 *pocket[100], *pocket1[100];
 public:
  void create_node(node1 *, int);
  void display(node1 *);
  node1 *radix_sort(node1 *);
  int large(node1 * );
  int numdig(int );
  int digit(int , int);
  void update(int, node1 *);
  node1 *Make_link(int, node1 *);
};
// This function create nodes and take input data
void radix :: create_node(node1 *rec, int n)
{
 for( int i = 1 ; i<= n; i++)
 {
  rec->next = (node1 *) malloc(sizeof(node1));
  cout<<"\n First node value:"<<i<<":";
  cin>>rec->data;
  rec = rec->next;
 }
 rec->next = NULL;
}
// Output Function
void radix ::  display(node1 * rec)
{
 while(rec)
 {
  cout<<"  "<<rec->data;
  rec= rec->next;
 }
 getch();
}
// This radix sort function
node1 * radix ::  radix_sort(node1 *rec)
{
 int larg = large(rec);
 int m = numdig(larg);
// These statements create pockets
 for(int k = 0 ; k < 10; k++)
 {
  pocket[k] = (node1 *)malloc(sizeof(node1));
  pocket1[k] = (node1 *)malloc(9*sizeof(node1));
 }
// These statements initialize pockets
 for(int j = 1; j <= m ; j++)
 {
  for(int i = 0 ; i < 10 ; i++)
  {
   pocket[i] = NULL;
   pocket1[i] = NULL ;
  }
  node1 *r = rec ;
  while(r != NULL)
  {
   int dig = digit(r->data, j);
   node1 *nex = r->next ;
   update(dig,r);
   r = nex;
  }
  if(r!= NULL)
  {
   int dig = digit(r->data,j);
   update(dig,r);
  }
  int poc = 0 ;
  while(pocket1[poc] == NULL)
   poc ++;
  rec = Make_link(poc, rec);
  cout<<"\n Newly ordered list:\n";
  display(rec);
 }
 return(rec);
}
// This function finds largest number in the list
int radix :: large(node1 *rec)
{
 node1 *save ;
 int p = 0;
 save = rec ;
 while(save != NULL)
 {
  if(save ->data > p)
   p = save->data;
  save = save->next ;
 }
 cout <<"\n Largest element:"<<p;
 return(p);
}
// This Function finds number digits in a number
int radix :: numdig(int large)
{
 int temp = large ;
 int num = 0 ;
 while(temp != 0)
 {
  ++num ;
  temp = temp/10 ;
 }
 cout <<"\n Number of digits of the number "<<large<<" is "<<num ;
 return(num);
}
// This function scarve a number into digits
int radix :: digit(int num, int j)
{
 int dig ;
 int temp = num ;
 for( int i = 0 ; i < j ; i++)
 {
  dig = temp % 10 ;
  temp = temp / 10 ;
 }
 cout<<"\n";
 cout <<j <<" digit of number "<<num <<" is "<<dig;
 getch();
 return(dig);
}
// This function updates the pockets value
void radix :: update(int dig, node1 *r)
{
 if(pocket[dig] == NULL)
 {
  pocket[dig] = r ;
  pocket1[dig] = r ;
 }
 else
 {
  pocket[dig]->next = r ;
  pocket[dig] = r ;
 }
 r->next = NULL;
}
// This function create links between the nodes
node1* radix :: Make_link(int poc , node1 *rec)
{
 node1 *pointer;
 rec = pocket1[poc];
 for(int i = poc +1 ; i< 10 ; i++)
 {
  pointer = pocket[i-1];
  if(pocket[i] != NULL)
   pointer->next= pocket1[i];
  else
   pocket[i] = pointer ;
 }
 return(rec);
}
// Main function
void  main()
{
 radix rad;
 node1 *start, *pointer;
 int number;
 cout<<"\n Input the elements of the list :\n";
 cout<<"\n Input the number of elements in the list:";
 cin>>number;
 start = (node1 *)malloc(sizeof(node1));
 rad.create_node(start, number);
 cout<<"\n Given list is as follows \n";
 rad.display(start);
 start = rad.radix_sort(start);
 cout<<"\n Sorted list is as follows:\n";
 rad.display (start);
}

GTU C PROGRAMS | QUICK SORT PROGRAM

C :

/* quick.c */
#include <stdio.h>
#include <stdlib.h>
void quick_sort(int array[], int first, int last)
{
 int temp, low, high, list_separator,i;
 low = first;
 high = last;
 list_separator = array[(first + last) / 2];
 do {
  while (array[low] < list_separator)
   low++;
  while (array[high] > list_separator)
   high--;
  if (low <= high)
  {
   temp = array[low];
   array[low++] = array[high];
   array[high--] = temp;
  }
 } while (low <= high);
 for (i = 0; i < 11; i++)
  printf("%d ", array[i]);
 printf("\n");
 getch();
 if (first < high)
  quick_sort(array, first, high);
 if (low < last)
  quick_sort(array, low, last);
}
void main(void)
{
 int values[]={10,23,64,21,74,95,2,59,44,87,55}, i;
 clrscr();
 for (i = 0; i < 11; i++)
  printf("%d ", values[i]);
 printf("\n");
/* printf("\n Unsorted list is as follows \n");
 for (i = 0; i < 20; i++)
 {
  values[i] = rand() % 100;
  printf(" %d", rand() %100);
 }*/
 quick_sort(values, 0, 10);
 printf("\n Sorted list as follows\n");
 for (i = 0; i < 11; i++)
  printf("%d ", values[i]);
 getch();
}

------------------------------------------------------------------

C++

  // QUICK SORT
  # include<iostream.h>
  # include <stdlib.h>
    class quick
       {
 private: int temp, low, high, pivot;
 public:
 void Q_sort(int *, int , int );
 void display(int *, int );
      };
// sorting function
void quick :: Q_sort(int array[], int first, int last)
 {
   low = first;
   high = last;
   pivot = array[(first + last) / 2];
   do {
     while (array[low] < pivot )
       low++;
     while (array[high] > pivot)
       high--;
     if (low <= high)
      {
 temp = array[low];
 array[low++] = array[high];
 array[high--] = temp;
      }
   } while (low <= high);
  if (first < high)
    Q_sort(array, first, high);
  if (low < last)
    Q_sort(array, low, last);
 }
   void quick :: display(int list[], int n)
     {
       cout<<"\n List after sorting the elements:\n";
       for( int i = 1 ; i <= n ; i++)
       {
  cout<<"  "<<list[i];
       }
     }
 void main(void)
  {
   quick sort;
   int list[100];
   int number ;
   cout<< "\n Input the number of elements in the list:";
   cin>> number;
   for ( int i = 1; i <= number; i++)
    {
     cout<<" Input the value for : "<< i <<" : ";
     cin>>list[i];
    }
  sort.Q_sort(list, 1, number);
  sort.display(list, number);
   }

GTU C PROGRAMS MATERIAL | BUBBLE SORT PROGRAM

C :

/* bubble.c */
#include <stdio.h>
#include <stdlib.h>
void bubble_sort(int array[], int size)
{
 int temp, i, j;
 for (i = 0; i < size; i++)
  for (j = 0; j < size; j++)
   if (array[i] < array[j])
   {
    temp = array[i];
    array[i] = array[j];
    array[j] = temp;
   }
}
void main(void)
{
 int values[30], i;
 printf("\n Unsorted list is as follows\n");
 for (i = 0; i < 10; i++)
 {
  values[i] = rand() % 100;
  printf(" %d", rand()%100);
 }
 bubble_sort(values, 10);
 printf("\n Sorted list is as follows\n");
 for (i = 0; i < 10; i++)
  printf("%d ", values[i]);
}

------------------------------------------------------------
C++

 // BUBBLE SORT
 # include<iostream.h>
 # include<conio.h>
     class bubble
      {
 private:
 public:
       void bubble_sort(int , int *); // prototype
       void display(int *, int);
      };
// definition of function
void bubble ::  bubble_sort(int n, int l[])
  {
      int limit = n - 1 ;
      int flag = 1 ;
   for(int j = 0 ; j< n - 1; j++)
   {
     for(int k = 0 ; k<  limit - j ; k++)
      {
        if(l[k] > l[k+1])
   {
    int  temp = l[k];
         l[k] = l[k+1];
         l[k+1] = temp ;
         flag = 0;
    }
        }
    if(flag)
       break ;
       else
        flag = 1;
     }
 }
      void bubble :: display(int list[], int number)
 {
   for( int i = 0 ; i < number ; i++)
   cout<<"  "<< list[i];
 }

 void main()
        {
  bubble sort;
  int number, key, list[200];
  clrscr();
  cout <<"Input the number of elements in the list:";
  cin >> number;
  cout <<"\n Number  of elements in the list is :"<<number;
  for(int i = 0 ; i < number; i++)
  {
  cout<<"\nInput the elements of the list : "<< i+1<<" : ";
  cin >> list[i];
  }
  cout<<"\n Entered list is as follows:\n";
  sort.display(list,number);
  sort.bubble_sort(number, list);
  cout<<"\n After sorting list is as  follows:\n";
  sort.display(list, number);
 }

Monday, 29 November 2010

Assignment – 8 Regular Language & Finite Automata

MCA Semester – II
Subject: 620007 – Theory of Computation

Assignment – 8
Regular Language & Finite Automata




1
Regular Language
2
Regular Expression
3
Regular Language & Regular Expression Over Σ
4
Finite Automata / Finite State Machine / DFA
5
Transition Table
6
Types of State
7
Transition Diagram
8
Transition Function ( δ )
9
Extended Transition Function ( δ* )
10
String Accepted by FA
11
String Rejected by FA
12
Regular Language ( In Context of  FA)
13
Distinguishable String With Respect To Language




Note: Write all Answers with Example.

Theory Of Computation | Assignment – Nondeterminism and Kleene’s Theorem

MCA Semester – II
Subject: 620007 – Theory of Computation
Assignment – 9
Nondeterminism and Kleene’s Theorem



1
Nondeterministic Finite Automata
2
Non-Recursive Definition of δ* for an NFA
3
Recursive Definition of  Î´* for an NFA
4
Acceptance by an NFA
5
NFA with Λ – Transition (NFA–Λ)
6
Non-Recursive Definition of δ* for an NFA – Λ
7
Λ – Closure of a Set of States
8
Recursive Definition of  Î´* for an NFA – Λ
9
Statement & Application of Kleene’s Theorem - I
10
Statement & Application of Kleene’s Theorem - II
11
Relationship Between DFA and NFA
12
DFA Vs. NFA



Note: Write all Answers with Example.

Theory Of Computation | Assignment –Context Free Grammars

MCA Semester – II
Subject: 620007 – Theory of Computation
Assignment – 11
Context Free Grammars

1
Context Free Grammar ( CFG)
2
Context Free Language (CFL)
3
List out Applications of  Context Free Grammar ( CFG)
4
What is Meaning of Context Free?
5
Regular Grammar
6
Linear Grammar
7
Leftmost Derivation
8
Rightmost Derivation
9
What is Derivation Tree or Parse Tree?
10
An Ambiguous Grammar
11
Balanced Strings of Parentheses
12
Nullable Variables
13
Unit Production
14
Chomsky Normal Form (CNF)
15
Inherently Ambiguous
16
List out Steps to Convert CFG into CNF

GTU MCA 3rd SEMESTER | SOOADM ASSIGNEMENTS

Department of MCA
Semester – III
(1) What is System? Explain the types of System in brief.
(2) List and briefly define the seven phases of the systems development life cycle.
(3) Discuss the Roles & Qualities of System Analysts.
(4) Give the Differences:
(a) OAS vs. KWS
(b) MIS vs. DSS
(c) CSCWS vs. GDSS
(5) List the reasons for adopting CASE tools.
(6) List advantages of using Code Generation tools.
(7) List the advantages of using system analysis and design techniques.
(8) Discuss integrating technologies for systems.

Friday, 26 November 2010

system software material | question bank | SS Importatnt Questions


Unit 1 :- Introduction to System Software and Software Tools
Chapter 1 :-  Language Processors
 Define the following terms.

  1. Program
  2. Software
  3. application software
  4. system software
  5. Application domain
  6. execution domain
  7. semantics
  8. semantic gap
  9. PL Domain
  10. specification gap
  11. execution gap,
  12. Language Processor
  13. Language Processing
  14. Source Program
  15. Target Program
  16. Source Language
  17. Target Language
  18. Language Translator
  19. Detranslator
  20. Preprocessor
  21. Language Migrator
  22. Interpreter
  23. Problem Oriented Languages



  1. Procedure Oriented Languages
  2. Lexical rules
  3. syntax rules
  4. semantic rules
  5. Forward Reference
  6. Language Processor Pass
  7. Intermediate Representation of Programs
  8. Formal Language
  9. Alphabet
  10. Terminal Symbol
  11. Meta Symbol
  12. String, Length
  13. Null String
  14. Concatenation
  15. Non Terminal Symbol
  16. Production
  17. Distinguished Symbol
  18. Grammar
  19. Binding
  20. Binding Times
  21. Static Binding
  22. Dynamic Binding






 Write an answer of following questions in detail.
  1. Describe that how Language Processing Activities arise and how it is represented using domains.
  2. Advantages of Introducing PL domain between application domain and execution domain.
  3. Describe a spectrum (entire) of Language Processor.
  4. Explain Language Processing Activity (Program Generation & Program Execution Activity) in detail.
  5. Explain the comparison of Translation model and Interpretation model in terms of Advantage and Disadvantage.
  6. Explain Forward Reference with example.
  7. Draw and Explain Front-End of a Toy Compiler with Lexical Analysis, Syntax Analysis semantic analysis.
  8. Draw and Explain Back-End of a Toy Compiler with memory allocation and code generation.
  9. Explain Derivation, Reduction and Parse Trees with example.
  10. Explain different types of Grammars (Type 0, Type 1, Type 2, Type 3, Operator Grammar).
  11. What is ambiguity in Grammatic specification and how we can remove it?
  12. Explain Two Language Processor Development Tool (LPDT) LEX and YACC with example.

DBMS - II ASSIGNMENT | Assignment Database Backup and Recovery



M.C.A. Semester - II
620006 – Databse Management System - II
Assignment – 3 (Database Backup and Recovery)
------------------------------------------------------------------------------------------------------------ 
Q-1. Explain the Following Questions in detail.

1). What is Database Backup? Why backup is needed? Explain Types of Database Backup?
2). Discuss different types of database failures that may occur in database environment?
3). What is Recovery? Explain types of Recovery? (Forward and Backward Recovery)
4). What is Log Based Recovery? Explain all Log based Recovery technique with Example?
5). What is Checkpoint? How is checkpoint information is used in recovery operation following System crash explain with example?
6). Describe Shadow Paging Recovery Technique? Under what circumstances does it 
not require a transaction log? List advantages and disadvantage of shadow paging?
7). What is Database Buffer? Explain Buffer Management technique used in database recovery?
8). Table : Transaction T1

Time shot
Transaction Step
Actions
Time-1
Read (A,a1)
Read current employee’s load balance.
Time-2
a1:= a1 – 500
Debit the Account by INR 500
Time-3
Write(A,a1)
Write the new loan balance
Time-4
Read (B,b1)
Read the current account payable balance
Time-5
b1 := b1 + 500
Credit the account balance by INR 500
Time-6
Write(B,b1)
Write the new balance
Time-7
Commit T1
Commit entire transaction

Consider the transaction as above Table to create log entries for immediate updates. Suppose, that a failure occurs just after the transaction log record for action Write(B,b1) has been Written.
a). Show the Contents of transaction log at the time of failure.
b). What action is necessary and Why?
c). What are the Resulting value of A and B?


9). Consider the transaction as above Table to create log entries for deferred updates. Suppose, that a failure occurs just after the record is written to the transaction log?
a). Show the Contents of transaction log at the time of failure.
b). What action is necessary and Why?
c). What are the Resulting value of A and B?


10).  Consider the following Transaction Step for Immediate Update Technique. 
Initial Value of A=1000, B=2000 and C=700.
         
Transaction Step
Actions
Begin Transaction T1
Start Transaction T1
            Read (A)
Read Value A
            A:= A – 50
Deduct 50 from A
            Write(A)
Write the new value of A
            Read (B)
Read the Value of B
            B := B + 50
Add 50 to B
            Write(B)
Write the new value of B
End Transaction
Commit entire transaction T1
Begin Transaction T2
Start Transaction T2
           Read (C)
Read Value of C
           C:=C-100
Deduct 100 from C
           Write (C)
Write the new value for C
End Transaction T2
Commit Entrire transaction T2

  • Create Log entries for Above transaction steps.
  • Let us Assume that the crash occurs just after the log record for step write(B) of transaction T1 then
    • What action is necessary and why?
    • What are the resulting value of A and B
  • Let us Assume that Crash comes just after the log record for the Wrtite(C) of Transaction T2 then
    • What action is necessary and Why?
    • What are the resulting value of A and B?
  • Finally, Let us Assume that Crash occurs just after the log record for Transaction T2,Commit
    • What action is necessary and Why?
    • What are the resulting value of A and B?  
11). Consider the following log entries.
Log Entries
T1,Start
T1,A,5000,4500
T1,Commit
Checkpoint
T2,Start
T2,B,1000,1050
T2,C,4000,3900
T2,Commit
T3,Start
T3,D,2500,2000
T4,Start
T4,E,1000,1200
T4,F,1200,1400

Suppose, that system crash is occurs after the last write entry of F of transaction T4 
then What action is necessary and why?        

----------------------------------------------------------------------------------------------------------------------------------------------
 Q-2. Differentiate the following :
1). Deferred Update Vs Immediate Update
2). Rollforward Vs Rollback
3). Stable Storage Vs Disk
4). Volatile Storage Vs Non-Volatile Storage
5). System Crash Vs Media Failure
-----------------------------------------------------------------------------------------------------------------------------------------------

Q-3. Answer the following in One line?
1) If the buffer pool is large enough that uncommited data are never forced to disk, is UNDO still necessary?
2) How about REDO?
3) If updates are always forced to disk when a transaction is performed, is UNDO still necessary?
4) How about REDO?
5) After a soft crash, where in the log should Analysis start?
------------------------------------------------------------------------------------------------------------

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms