Question
stringlengths
39
1.33k
Tag
stringlengths
3
46
label
int64
0
206
Determine whether each of the following is a tautology a contradiction or neither quot lor quot is disjunction quot land quot is conjunction quot rightarrow quot is implication quot eg quot is negation and quot leftrightarrow quot is biconditional if and only if A leftrightarrow A lor A A lor B rightarrow B A land eg A...
Propositional Logic
144
Consider two well formed formulas in propositional logic F1 P Rightarrow eg P F2 P Rightarrow eg P lor eg P Rightarrow P Which one of the following statements is correct F1 is satisfiable F2 is valid F1 unsatisfiable F2 is satisfiable F1 is unsatisfiable F2 is valid F1 and F2 are both satisfiable
Propositional Logic
144
Choose the correct alternatives More than one may be correct Indicate which of the following well formed formulae are valid left P Rightarrow Q right wedge left Q Rightarrow R right Rightarrow left P Rightarrow R right left P Rightarrow Q right Rightarrow left eg P Rightarrow eg Q right left P wedge left eg P vee eg Q...
Propositional Logic
144
Choose the correct alternatives more than one may be correct and write the corresponding letters only Which of the following is are a tautology a vee b o b wedge c a wedge b o b vee c a vee b o left b o c right a o b o left b o c right
Propositional Logic
144
Choose the correct alternatives more than one may be correct and write the corresponding letters only If F_1 F_2 and F_3 are propositional formulae such that F_1 land F_2 rightarrow F_3 and F_1 land F_2 rightarrow sim F_3 are both tautologies then which of the following is true a Both F_1 and F_2 are tautologies b The...
Propositional Logic
144
If X then Y unless Z is represented by which of the following formulas in prepositional logic eg is negation land is conjunction and rightarrow is implication X land eg Z rightarrow Y X land Y rightarrow eg Z X rightarrow Y land eg Z X rightarrow Y land eg Z
Propositional Logic
144
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 ...
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 langua...
Pumping Lemma
146
Let Q left left q_1 q_2 right left a b right left a b bot right delta bot phi right be a pushdown automaton accepting by empty stack for the language which is the set of all nonempty even palindromes over the set left a b right Below is an incomplete specification of the transitions delta Complete the specification The...
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...
Pushdown Automata
147
Let M q_0 q_1 0 1 z_0 X delta q_0 z_0 phi be a Pushdown automation where delta is given by delta q_0 1 z_0 q_0 xz_0 delta q_0 epsilon z_0 q_0 epsilon delta q_0 1 X q_0 XX delta q_1 1 X q_1 epsilon delta q_0 0 X q_1 X delta q_0 0 z_0 q_0 z_0 z What is the language accepted by this PDA by empty stack Describe informally...
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
Let L_1 be the set of all languages accepted by a PDA by final state and L_2 the set of all languages accepted by empty stack Which of the following is true L_1 L_2 L_1 supset L_2 L_1 subset L_2 None
Pushdown Automata
147
Give a deterministic PDA for the language L a ncb 2n mid n geq 1 over the alphabet Sigma a b c Specify the acceptance state
Pushdown Automata
147
Consider the transition diagram of a PDA given below with input alphabet Sigma a b and stack alphabet Gamma X Z Z is the initial stack symbol Let L denote the language accepted by the PDA Which one of the following is TRUE L a nb n mid n geq0 and is not accepted by any finite automata L a n mid n geq0 cup a nb n ...
Pushdown Automata
147
Consider the pushdown automaton PDA below which runs over the input alphabet a b c It has the stack alphabet Z_0 X where Z_0 is the bottom of stack marker The set of states of the PDA is s t u f where s is the start state and f is the final state The PDA accepts by final state The transitions of the PDA given below ar...
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 ini...
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...
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
What is the minimum number of stacks of size n required to implement a queue of size n One Two Three Four
Queues
149
Suppose you are given an implementation of a queue of integers The operations that can be performed on the queue are isEmpty Q u2014 returns true if the queue is empty false otherwise delete Q u2014 deletes the element at the front of the queue and returns its value insert Q i u2014 inserts the integer i at the rear of...
Queues
149
Suppose a circular queue of capacity n u22121 elements is implemented with an array of n elements Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables respectively Initially REAR FRONT 0 The conditions to detect queue full and queue empty are full REAR 1 mod n ...
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...
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 ...
Queues
149
Consider the following statements First in first out types of computations are efficiently supported by STACKS Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations Implementing QUEUES on a circular array is more efficient than implementing QUE...
Queues
149
Consider the following operation along with Enqueue and Dequeue operations on queues where k is a global parameter MultiDequeue Q m k while Q is not empty and m gt 0 Dequeue Q m m u2013 1 What is the worst case time complexity of a sequence of n queue operations on an initially empty queue u0398 n u0398 n k u0398 nk u...
Queues
149
An implementation of a queue Q using two stacks S1 and S2 is given below void insert Q x push S1 x void delete Q if stack empty S2 then if stack empty S1 then print u201cQ is empty u201d return else while stack empty S1 x pop S1 push S2 x x pop S2 let n insert and m leq n delete operations be performed in an arbitr...
Queues
149
A queue Q containing n items and an empty stack S are given It is required to transfer all the items from the queue to the stack so that the item at the front of queue is on the TOP of the stack and the order of all other items are preserved Show how this can be done in O n time using only a constant amount of addition...
Queues
149
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently Which one of the following statements is CORRECT n refers to the number of items in the queue Both operations can be performed in O 1 time At most one operation can be performed in O 1 time but the worst case time f...
Queues
149
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue respectively Which of the following statements is are COR...
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 nanosecon...
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
Suppose X_i for i 1 2 3 are independent and identically distributed random variables whose probability mass functions are Pr X_i 0 Pr X_i 1 frac 1 2 ext for i 1 2 3 Define another random variable Y X_1X_2 oplus X_3 where oplus denotes XOR Then Pr Y 0 mid X_3 0 ______
Random Variable
151
Let X be a Gaussian random variable with mean 0 and variance sigma 2 Let Y max left X 0 right where max left a b right is the maximum of a and b The median of Y is ______________
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...
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
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...
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
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 know...
Recursive And Recursively Enumerable Languages
152
Let X be a recursive language and Y be a recursively enumerable but not recursive language Let W and Z be two languages such that overline Y reduces to W and Z reduces to overline X reduction means the standard many one reduction Which one of the following statements is TRUE W can be recursively enumerable and Z is re...
Recursive And Recursively Enumerable Languages
152
Let L1 be a recursive language and let L2 be a recursively enumerable but not a recursive language Which one of the following is TRUE L1 is recursive and L2 is recursively enumerable L1 is recursive and L2 is not recursively enumerable L1 and L2 are recursively enumerable L1 is recursively enumerable and L2 is recursi...
Recursive And Recursively Enumerable Languages
152
Let L_1 be the recursive language Let L_2 and L_3 be languages that are recursively enumerable but not recursive Which of the following statements is not necessarily true L_2 L_1 ext is recursively enumerable L_1 L_3 ext is recursively enumerable L_2 cap L_3 ext is recursively enumerable L_2 cup L_3 ext is recursively ...
Recursive And Recursively Enumerable Languages
152
Let L be a language and bar L be its complement Which one of the following is NOT a viable possibility Neither L nor bar L is recursively enumerable r e One of L and bar L is r e but not recursive the other is not r e Both L and bar L are r e but not recursive Both L and bar L are 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 recursivel...
Recursive And Recursively Enumerable Languages
152
If the strings of a language L can be effectively enumerated in lexicographic i e alphabetic order which of the following statements is true L is necessarily finite L is regular but not necessarily finite L is context free but not necessarily regular L is recursive but not necessarily context free
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
For any two languages L_ 1 and L_ 2 such that L_ 1 is context free and L_ 2 is recursively enumerable but not recursive which of the following is are necessarily true bar L _ 1 Compliment of L_ 1 is recursive bar L _ 2 Compliment of L_ 2 is recursive bar L _ 1 is context free bar L _ 1 u222a L_ 2 is recursively enumer...
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
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 ...
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...
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 B...
Referential Integrity
153
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
The regular expression 0 10 denotes the same set as 1 0 1 0 0 10 0 1 10 0 1 None of the above
Regular Expressions
154
Let S and T be languages over Sigma a b represented by the regular expressions a b and a b respectively Which of the following is true S subset T T subset S S T S cap T phi
Regular Expressions
154
In some programming language an identifier is permitted to be a letter followed by any number of letters or digits If L and D denote the sets of letters and digits respectively which of the following expressions defines an identifier L D L D L L D L L D
Regular Expressions
154
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 over the alphabet 0 1 to denote the set of proper non null substrings of the string 0110
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
02 Choose the correct alternatives more than one may be correct and write the corresponding letters only Which of the following regular expression identities is are TRUE a r r b r s r s c r s r s d r s r s
Regular Expressions
154
Which two of the following four regular expressions are equivalent varepsilon is the empty string 00 varepsilon 0 00 0 0 00 i and ii ii and iii i and iii iii and iv
Regular Expressions
154
Which one of the following regular expressions represents the language the set of all binary strings having two consecutive 0 s and two consecutive 1 s 0 1 0011 0 1 0 1 1100 0 1 0 1 00 0 1 11 11 0 1 00 0 1 0 1 00 0 1 0 1 11 0 1 00 0 1 11 11 0 1 00
Regular Expressions
154
The regular expression for the language recognized by the finite state automaton of figure is ______
Regular Expressions
154
Choose the correct alternatives more than one may be correct and write the corresponding letters only Let r 1 1 0 s 11 0 ext and t 1 0 be three regular expressions Which one of the following is true L s subseteq L r and L s subseteq L t L r subseteq L s and L s subseteq L t L s subseteq L t and L s subseteq L r L t su...
Regular Expressions
154
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 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 u...
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 stri...
Regular Grammar
155
The number of edges in a regular graph of degree d and n vertices is ____________
Regular Graph
156
What can be said about a regular language L over a whose minimal finite state automaton has two states L must be an n is odd L must be an n is even L must be an n u2265 0 Either L must be an n is odd or L must be an n is even
Regular Languages
157
Let Sigma left 0 1 right L Sigma and R left 0 n1 n mid n gt 0 right then the languages L cup R and R are respectively A regular regular B not regular regular C regular not regular D not regular not regular
Regular Languages
157
Let L subseteq Sigma where Sigma left a b right Which of the following is true a L left x mid x ext has an equal number of a ext s and b ext s right is regular b L left a nb n mid n geq 1 right is regular c L left x mid x ext has more number of a ext s than b ext s right is regular d L left a mb n mid m geq 1 n geq 1 r...
Regular Languages
157
Let L be a regular language Consider the constructions on L below repeat L ww w u220a L prefix L u u2203v uv u220a L suffix L v u2203u uv u220a L half L u u2203v v u and uv u220a L Which of the constructions could lead to a non regular language Both I and IV Only I Only IV Both II and III
Regular Languages
157
Let L be a regular language Consider the constructions on L below ext repeat L ww mid w in L ext prefix L u mid exists v uv in L ext suffix L v mid exists u uv in L ext half L u mid exists v v u ext and uv in L Which of the constructions could lead to a non regular language Both I and IV Only 1 Only IV Both II and III ...
Regular Languages
157
If s is a string over 0 1 then let n0 s denote the number of 0 u2019s in s and n1 s the number of 1 u2019s in s Which one of the following languages is not regular L left s in 0 1 mid n_ 0 s ext is a 3 digit prime right L left s in 0 1 mid ext for every prefix s of s mid n_ 0 s n_ 1 s mid leq 2 right L left s i...
Regular Languages
157
Consider the following two statements S_1 left 0 2n mid n geq 1 right is a regular language S_2 left 0 m1 n0 m n mid m geq 1 ext and n geq 1 right is a regular language Which of the following statement is correct Only S_1 is correct Only S_2 is correct Both S_1 and S_2 are correct None of S_1 and S_2 is correct
Regular Languages
157
Consider the following languages L1 left ww mid w in a b right L2 left ww R mid w in a b w R ext is the reverse of w right L3 left 0 2i mid ext i is an integer right L4 left 0 i 2 mid ext i is an integer right Which of the languages are regular Only L1 and L2 Only L2 L3 and L4 Only L3 and L4 Only L3
Regular Languages
157
Choose the correct alternatives More than one may be correct Let R_ 1 and R_ 2 be regular sets defined over the alphabet Sigma Then R_ 1 cap R_ 2 is not regular R_ 1 cup R_ 2 is regular Sigma R_ 1 is regular R_ 1 is not regular
Regular Languages
157
Choose the correct alternatives more than one may be correct and write the corresponding letters only Which of the following is the strongest correct statement about a finite language over some finite alphabet Sigma a It could be undecidable b It is Turing machine recognizable c It is a context sensitive language d It ...
Regular Languages
157
Given that A is regular and A cup B is regular does it follow that B is necessarily regular Justify your answer Given two finite automata M1 M2 outline an algorithm to decide if L M1 subset L M2 note strict subset
Regular Languages
157
Suppose the adjacency relation of vertices in a graph is represented in a table Adj X Y Which of the following queries cannot be expressed by a relational algebra expression of constant length List all vertices adjacent to a given vertex List all vertices which have self loops List all vertices which belong to cycles o...
Relational Algebra
158
Let r and s be two relations over the relation schemes R and S respectively and let A be an attribute in R The relational algebra expression sigma_ A a r bowtie s is always equal to sigma_ A a r r sigma_ A a r bowtie s None of the above
Relational Algebra
158
Information about a collection of students is given by the relation ext studInfo underline ext studId ext name sex The relation ext enroll underline ext studId underline ext courseId gives which student has enrolled for or taken what course s Assume that every course is taken by at least one male and at least one femal...
Relational Algebra
158
Given two union compatible relations R_1 A B and R_2 C D what is the result of the operation R_1 Join_ A C wedge B D R_2 R_1 cup R_2 R_1 imes R_2 R_1 u2013 R_2 R_1 cap R_2
Relational Algebra
158
Consider the relation Student name sex marks where the primary key is shown underlined pertaining to students in a class that has at least one boy and one girl What does the following relational algebra expression produce Note rho is the rename operator pi_ name mathcal r _ sex female Student pi_ name Student_ sex fema...
Relational Algebra
158
Consider the relation scheme AUTHOR ANAME INSTITUTION ACITY AGE PUBLISHER PNAME PCITY BOOK TITLE ANAME PNAME Express the following queries using one or more of SELECT PROJECT JOIN and DIVIDE operations Get the names of all publishers Get values of all attributes of all authors who have published a book for the publishe...
Relational Algebra
158
Consider the join of a relation R with a relation S If R has m tuples and S has n tuples then the maximum and minimum sizes of the join respectively are m n and 0 mn and 0 m n and m n mn and m n
Relational Algebra
158
Consider the following SQL query Select distinct a_1 a_2 u2026 a_n from r_1 r_2 u2026 r_m where P For an arbitrary predicate P this query is equivalent to which of the following relational algebra expressions Pi_ a_1 a_2 u2026 a_n sigma_p left r_1 imes r_2 imes dots imes r_m right Pi_ a_1 a_2 u2026 a_n sigma_p left r...
Relational Algebra
158
Consider the following relational schema COURSES cno cname STUDENTS rollno sname age year REGISTERED FOR cno rollno The underlined attributes indicate the primary keys for the relations The u2018year u2019 attribute for the STUDENTS relation indicates the year in which the student is currently studying First year Secon...
Relational Algebra
158
Consider the following relational database schemes COURSES Cno name PRE REQ Cno pre Cno COMPLETED student_no Cno COURSES gives the number and name of all the available courses PRE REQ gives the information about which courses are pre requisites for a given course COMPLETED indicates what courses have been completed by ...
Relational Algebra
158
A university placement center maintains a relational database of companies that interview students on campus and make job offers to those successful in the interview The schema of the database is given below COMPANY cname clocation STUDENT scrollno sname sdegree INTERVIEW cname srollno idate OFFER cname srollno osalar...
Relational Algebra
158
A table student with schema roll name hostel marks and another table hobby with schema roll hobbyname contains records as shown below Table Student Roll Name Hostel Marks 1798 Manoj Rathod 7 95 2154 Soumic Banerjee 5 68 2369 Gumma Reddy 7 86 2581 Pradeep Pendse 6 92 2643 Suhas Kulkarni 5 78 2711 Nitin Kadam 8 72 2872 K...
Relational Algebra
158
A library relational database system uses the following schema USERS User User Name Home Town BOOKS Book Book Title Author Name ISSUED Book User Date Explain in one English sentence what each of the following relational algebra queries is designed to determine sigma_ ext User 6 left pi_ ext User Book Title left left e...
Relational Algebra
158
Suppose we have a database consisting of the following three relations FREQUENTS CUSTOMER HOTEL SERVES HOTEL SNACKS LIKES CUSTOMER SNACKS The first indicates the hotels each customer visits the second tells which snacks each hotel serves and last indicates which snacks are liked by each customer Express the followin...
Relational Algebra
158
Given the relations employee name salary dept no and department dept no dept name address Which of the following queries cannot be expressed using the basic relational algebra operations left sigma pi imes Join cup cap right Department address of every employee Employees whose name is the same as their department name...
Relational Algebra
158
The relational algebra expression equivalent to the following tuple calculus expression left t mid t in r land left t A 10 land t B 20 right right is sigma_ A 10 lor B 20 r sigma_ A 10 r cup sigma_ B 20 r sigma_ A 10 r cap sigma_ B 20 r sigma_ A 10 r sigma_ B 20 r
Relational Calculus
159
The following relations are used to store data about students courses enrollment of students in courses and teachers of courses Attributes for primary key in each relation are marked by u2018 u2019 Students rollno sname saddr courses cno cname enroll rollno cno grade each tno tname cao cno is course number cname is cou...
Relational Calculus
159
Student school id sch roll no sname saddress School school id sch name sch address sch phone Enrolment school id sch roll no erollno examname ExamResult erollno examname marks Consider the following tuple relational calculus query t u2203 E u220a Enrolment t E school id x x u220a Enrolment x school id t ...
Relational Calculus
159
Let R_1 left underline A B C right and R_2 left underline D E right be two relation schema where the primary keys are shown underlined and let C be a foreign key in R_1 referring to R_2 Suppose there is no violation of the above referential integrity constraint in the corresponding relation instances r_1 and r_2 Whic...
Relational Calculus
159