Question
stringlengths
39
1.33k
Tag
stringlengths
3
46
label
int64
0
206
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
Choose the correct option to fill 1 and 2 so that the program below prints an input string in reverse order Assume that the input string is terminated by a new line character void reverse void int c if 1 reverse 2 main printf Enter text printf reverse printf 1 is getchar u2019 setminus n u2019 2 is getchar c 1 is c getchar u2019 setminus n u2019 2 is getchar c 1 is c u2019 setminus n u2019 2 is putchar c 1 is c getchar u2019 setminus n u2019 2 is putchar c
Pseudo Code
145
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
A language L satisfies the Pumping Lemma for regular languages and also the Pumping Lemma for context free languages Which of the following statements about L is TRUE L is necessarily a regular language L is necessarily a context free language but not necessarily a regular language L is necessarily a non regular language None of the above
Pumping Lemma
146
Consider the NPDA left langle Q left q_ 0 q_ 1 q_ 2 right Sigma left 0 1 right Gamma left 0 1 perp right delta q_ 0 perp F left q_ 2 right right rangle where as per usual convention Q is the set of states Sigma is the input alphabet Gamma is the stack alphabet delta is the state transition function q_ 0 is the initial state perp is the initial stack symbol and F is the set of accepting states The state transition is as follows Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton 10110 10010 01010 01001
Pushdown Automata
147
Consider the NPDA left langle Q left q_ 0 q_ 1 q_ 2 right Sigma left 0 1 right Gamma left 0 1 perp right delta q_ 0 perp F left q_ 2 right right rangle where as per usual convention Q is the set of states Sigma is the input alphabet Gamma is the stack alphabet delta is the state transition function q_ 0 is the initial state perp is the initial stack symbol and F is the set of accepting states The state transition is as follows Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton 10110 10010 01010 01001
Pushdown Automata
147
Let P be a non deterministic push down automaton NPDA with exactly one state q and exactly one symbol Z in its stack alphabet State q is both the starting as well as the accepting state of the PDA The stack is initialized with one Z before the start of the operation of the PDA Let the input alphabet of the PDA be u03a3 Let L P be the language accepted by the PDA by reading a string and reaching its accepting state Let N P be the language accepted by the PDA by reading a string and emptying its stack Which of the following statements is TRUE L P is necessarily u03a3 but N P is not necessarily u03a3 N P is necessarily u03a3 but L P is not necessarily u03a3 Both L P and N P are necessarily u03a3 Neither L P nor N P are necessarily u03a3
Pushdown Automata
147
Let M K u03a3 u0413 u0394 s F be a pushdown automaton where K s f F f Sigma a b u0413 a and u0394 s a epsilon s a s b epsilon s a s a epsilon f epsilon f a a f epsilon f b a f epsilon Which one of the following strings is not a member of L M aaa aabab baaba bab
Pushdown Automata
147
A push down automation pda is given in the following extended notation of finite state diagram The nodes denote the states while the edges denote the moves of the pda The edge labels are of the form d s s where d is the input symbol read and s s are the stack contents before and after the move For example the edge labeled 1 s 1 s denotes the move from state q_0 to q_0 in which the input symbol 1 is read and pushed to the stack Introduce two edges with appropriate labels in the above diagram so that the resulting pda accepts the language left x2x R mid x in left 0 1 right x R ext denotes reverse of x right by empty stack Describe a non deterministic pda with three states in the above notation that accept the language left 0 n 1 m mid n leq m leq 2n right by empty stack
Pushdown Automata
147
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
The roots of ax2 bx c 0 are real and positive a b and c are real Then ax2 b x c 0 has no roots 2 real roots 3 real roots 4 real roots
Quadratic Equations
148
In a quadratic function the value of the product of the roots alpha beta is 4 Find the value of dfrac alpha n beta n alpha n beta n n 4 4 n 2 2n 1 4 n 1
Quadratic Equations
148
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
In a quadratic function the value of the product of the roots alpha beta is 4 Find the value of dfrac alpha n beta n alpha n beta n n 4 4 n 2 2n 1 4 n 1
Quadratic Equations
148
The roots of ax2 bx c 0 are real and positive a b and c are real Then ax2 b x c 0 has no roots 2 real roots 3 real roots 4 real roots
Quadratic Equations
148
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
The roots of ax2 bx c 0 are real and positive a b and c are real Then ax2 b x c 0 has no roots 2 real roots 3 real roots 4 real roots
Quadratic Equations
148
The set of values of p for which the roots of the equation 3x 2 2x p p u20131 0 are of opposite sign is A u2013 u221e 0 B 0 1 C 1 u221e D 0 u221e
Quadratic Equations
148
The roots of ax2 bx c 0 are real and positive a b and c are real Then ax2 b x c 0 has no roots 2 real roots 3 real roots 4 real roots
Quadratic Equations
148
What is the minimum number of stacks of size n required to implement a queue of size n One Two Three Four
Queues
149
Suggest a data structure for representing a subset S of integers from 1 to n Following operations on the set S are to be performed in constant time independent of cardinality of S i MEMBER X Check whether X is in the set S or not ii FIND ONE S If S is not empty return one element of the set S any arbitrary element will do iii ADD X Add integer X to set S iv DELETE X Delete integer X from S Give pictorial examples of your data structure Give routines for these operations in an English like language You may assume that the data structure has been suitable initialized Clearly state your assumptions regarding initialization
Queues
149
Let Q denote a queue containing sixteen numbers and S be an empty stack Head Q returns the element at the head of the queue Q without removing it from Q Similarly Top S returns the element at the top of S without removing it from S Consider the algorithm given below while Q is not Empty do if S is Empty OR Top S u2264 Head Q then x Dequeue Q Push S x else x Pop S Enqueue Q x end end The maximum possible number of iterations of the while loop in the algorithm is _______
Queues
149
Suggest a data structure for representing a subset S of integers from 1 to n Following operations on the set S are to be performed in constant time independent of cardinality of S i MEMBER X Check whether X is in the set S or not ii FIND ONE S If S is not empty return one element of the set S any arbitrary element will do iii ADD X Add integer X to set S iv DELETE X Delete integer X from S Give pictorial examples of your data structure Give routines for these operations in an English like language You may assume that the data structure has been suitable initialized Clearly state your assumptions regarding initialization
Queues
149
A main memory unit with a capacity of 4 megabytes is built using 1M imes 1 bit DRAM chips Each DRAM chip has 1K rows of cells with 1K cells in each row The time taken for a single refresh operation is 100 nanoseconds The time required to perform one refresh operation on all the cells in the memory unit is 100 nanoseconds 100 imes 2 10 nanoseconds 100 imes 2 20 nanoseconds 3200 imes 2 20 nanosesonds
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A main memory unit with a capacity of 4 megabytes is built using 1M imes 1 bit DRAM chips Each DRAM chip has 1K rows of cells with 1K cells in each row The time taken for a single refresh operation is 100 nanoseconds The time required to perform one refresh operation on all the cells in the memory unit is 100 nanoseconds 100 imes 2 10 nanoseconds 100 imes 2 20 nanoseconds 3200 imes 2 20 nanosesonds
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A main memory unit with a capacity of 4 megabytes is built using 1M imes 1 bit DRAM chips Each DRAM chip has 1K rows of cells with 1K cells in each row The time taken for a single refresh operation is 100 nanoseconds The time required to perform one refresh operation on all the cells in the memory unit is 100 nanoseconds 100 imes 2 10 nanoseconds 100 imes 2 20 nanoseconds 3200 imes 2 20 nanosesonds
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A main memory unit with a capacity of 4 megabytes is built using 1M imes 1 bit DRAM chips Each DRAM chip has 1K rows of cells with 1K cells in each row The time taken for a single refresh operation is 100 nanoseconds The time required to perform one refresh operation on all the cells in the memory unit is 100 nanoseconds 100 imes 2 10 nanoseconds 100 imes 2 20 nanoseconds 3200 imes 2 20 nanosesonds
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
A dynamic RAM has a memory cycle time of 64 nsec It has to be refreshed 100 times per msec and each refresh takes 100 nsec What percentage of the memory cycle time is used for refreshing 10 6 4 1 0 64
Ram
150
Consider a finite sequence of random values X x_1 x_2 dots x_n Let mu_x be the mean and sigma_x be he standard deviation of X Let another finite sequence Y of equal length be derived from this as y_i a x_i b where a and b are positive constants Let mu_y be the mean and sigma_y be the standard deviation of this sequence Which one of the following statements is INCORRECT A Index position of mode of X in X is the same as the index position of mode of Y in Y B Index position of median of X in X is the same as the index position of median of Y in Y C mu_y a mu_x b D sigma_y a sigma_x b
Random Variable
151
Let f x be the continuous probability density function of a random variable x the probability that a lt x leq b is f b a f b f a int limits_a b f x dx int limits_a b xf x dx
Random Variable
151
If the difference between the expectation of the square of a random variable left E left X 2 right right and he square of the expectation of the random variable left E left X right right 2 is denoted by R then A R 0 B R lt 0 C R geq 0 D R gt 0
Random Variable
151
For any discrete random variable X with probability mass function P X j p_j p_j geq 0 j in 0 dots N and Sigma_ j 0 N p_j 1 define the polynomial function g_x z Sigma_ j 0 N p_j z j For a certain discrete random variable Y there exists a scalar beta in 0 1 such that g_y z 1 beta beta z N The expectation of Y is N beta 1 beta N beta N 1 beta Not expressible in terms of N and beta alone
Random Variable
151
For any discrete random variable X with probability mass function P X j p_j p_j geq 0 j in 0 dots N and Sigma_ j 0 N p_j 1 define the polynomial function g_x z Sigma_ j 0 N p_j z j For a certain discrete random variable Y there exists a scalar beta in 0 1 such that g_y z 1 beta beta z N The expectation of Y is N beta 1 beta N beta N 1 beta Not expressible in terms of N and beta alone
Random Variable
151
Consider a finite sequence of random values X x_1 x_2 dots x_n Let mu_x be the mean and sigma_x be he standard deviation of X Let another finite sequence Y of equal length be derived from this as y_i a x_i b where a and b are positive constants Let mu_y be the mean and sigma_y be the standard deviation of this sequence Which one of the following statements is INCORRECT A Index position of mode of X in X is the same as the index position of mode of Y in Y B Index position of median of X in X is the same as the index position of median of Y in Y C mu_y a mu_x b D sigma_y a sigma_x b
Random Variable
151
Let f x be the continuous probability density function of a random variable x the probability that a lt x leq b is f b a f b f a int limits_a b f x dx int limits_a b xf x dx
Random Variable
151
Consider a random variable X that takes values 1 and u22121 with probability 0 5 each The values of the cumulative distribution function F x at x u22121 and 1 are A 0 and 0 5 B 0 and 1 C 0 5 and 1 D 0 25 and 0 75
Random Variable
151
Nobody knows yet if P NP Consider the language L defined as follows L begin cases 0 1 amp ext if P NP phi amp otherwise end cases Which of the following statements is true L is recursive L is recursively enumerable but not recursive L is not recursively enumerable Whether L is recursively enumerable or not will be known after we find out if P NP
Recursive And Recursively Enumerable Languages
152
Choose the correct alternatives More than one may be correct Recursive languages are A proper superset of context free languages Always recognizable by pushdown automata Also called type emptyset languages Recognizable by Turing machines
Recursive And Recursively Enumerable Languages
152
If L and bar L are recursively enumerable then L is regular context free context sensitive recursive
Recursive And Recursively Enumerable Languages
152
Let A leq_m B denotes that language A is mapping reducible also known as many to one reducible to language B Which one of the following is FALSE If A leq_m B and B is recursive then A is recursive If A leq_m B and A is undecidable then B is undecidable If A leq_m B and B is recursively enumerable then A is recursively enumerable If A leq_m B and B is not recursively enumerable then A is not recursively enumerable
Recursive And Recursively Enumerable Languages
152
Choose the correct alternatives More than one may be correct Recursive languages are A proper superset of context free languages Always recognizable by pushdown automata Also called type emptyset languages Recognizable by Turing machines
Recursive And Recursively Enumerable Languages
152
Let R a b c and S d e f be two relations in which d is the foreign key of S that refers to the primary key of R Consider the following four operations R and S Insert into R Insert into S Delete from R Delete from S Which of the following can cause violation of the referential integrity constraint above Both I and IV Both II and III All of these None of these
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
Let R a b c and S d e f be two relations in which d is the foreign key of S that refers to the primary key of R Consider the following four operations R and S Insert into R Insert into S Delete from R Delete from S Which of the following can cause violation of the referential integrity constraint above Both I and IV Both II and III All of these None of these
Referential Integrity
153
The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on delete cascade A C 2 4 3 4 4 3 5 2 7 2 9 5 6 4 The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple 2 4 is deleted is 3 4 and 6 4 5 2 and 7 2 5 2 7 2 and 9 5 3 4 4 3 and 6 4
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
Let R a b c and S d e f be two relations in which d is the foreign key of S that refers to the primary key of R Consider the following four operations R and S Insert into R Insert into S Delete from R Delete from S Which of the following can cause violation of the referential integrity constraint above Both I and IV Both II and III All of these None of these
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
Let R a b c and S d e f be two relations in which d is the foreign key of S that refers to the primary key of R Consider the following four operations R and S Insert into R Insert into S Delete from R Delete from S Which of the following can cause violation of the referential integrity constraint above Both I and IV Both II and III All of these None of these
Referential Integrity
153
The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on delete cascade A C 2 4 3 4 4 3 5 2 7 2 9 5 6 4 The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple 2 4 is deleted is 3 4 and 6 4 5 2 and 7 2 5 2 7 2 and 9 5 3 4 4 3 and 6 4
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
Consider the following tables T1 and T2 T1 P Q 2 2 3 8 7 3 5 8 6 9 8 5 9 8 T2 R S 2 2 8 3 3 2 9 7 5 7 7 2 In table T1 P is the primary key and Q is the foreign key referencing R in table T2 with on delete cascade and on update cascade In table T2 R is the primary key and S is the foreign key referencing P in table T1 with on delete set NULL and on update cascade In order to delete record langle 3 8 rangle from the table T1 the number of additional records that need to be deleted from table T1 is _______
Referential Integrity
153
If the regular set A is represented by A 01 1 and the regular set B is represented by B left left 01 right 1 right which of the following is true a A subset B b B subset A c A and B are incomparable d A B
Regular Expressions
154
Give a regular expression for the set of binary strings where every 0 is immediately followed by exactly k 1 s and preceded by at least k 1 u2019s k is a fixed integer
Regular Expressions
154
The string 1101 does not belong to the set represented by a 110 0 1 b 1 0 1 101 c 10 01 00 11 d 00 11 0
Regular Expressions
154
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Consider the regular grammar below S u2192 bS aA u03f5 A u2192 aS bA The Myhill Nerode equivalence classes for the language generated by the grammar are w u220a a b a w is even and w u220a a b a w is odd w u220a a b a w is even and w u220a a b b w is odd w u220a a b a w b w and w u220a a b a w u2260 b w u03f5 wa w u220a a b and wb w u220a a b
Regular Grammar
155
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Is the language generated by the grammer G regular If so give a regular expression for it else prove otherwise G S rightarrow aB B rightarrow bC C rightarrow xB C rightarrow c
Regular Grammar
155
Is the language generated by the grammer G regular If so give a regular expression for it else prove otherwise G S rightarrow aB B rightarrow bC C rightarrow xB C rightarrow c
Regular Grammar
155
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Consider the alphabet Sigma 0 1 the null empty string lambda and the set of strings X_0 X_1 ext and X_2 generated by the corresponding non terminals of a regular grammar X_0 X_1 ext and X_2 are related as follows X_0 1 X_1 X_1 0 X_1 1 X_2 X_2 0 X_1 lambda Which one of the following choices precisely represents the strings in X_0 10 0 10 1 10 0 10 1 1 0 10 1 10 0 10 1 110 0 10 1
Regular Grammar
155
Consider the regular grammar below S u2192 bS aA u03f5 A u2192 aS bA The Myhill Nerode equivalence classes for the language generated by the grammar are w u220a a b a w is even and w u220a a b a w is odd w u220a a b a w is even and w u220a a b b w is odd w u220a a b a w b w and w u220a a b a w u2260 b w u03f5 wa w u220a a b and wb w u220a a b
Regular Grammar
155
Is the language generated by the grammer G regular If so give a regular expression for it else prove otherwise G S rightarrow aB B rightarrow bC C rightarrow xB C rightarrow c
Regular Grammar
155
Is the language generated by the grammer G regular If so give a regular expression for it else prove otherwise G S rightarrow aB B rightarrow bC C rightarrow xB C rightarrow c
Regular Grammar
155
The number of edges in a regular graph of degree d and n vertices is ____________
Regular Graph
156
The number of edges in a regular graph of degree d and n vertices is ____________
Regular Graph
156
The number of edges in a regular graph of degree d and n vertices is ____________
Regular Graph
156
The number of edges in a regular graph of degree d and n vertices is ____________
Regular Graph
156