The max Mod values is 2n.
So 2n ≥ 258 ⇒ n = 9
On per-thread basis, the OS maintains only CPU register state
The OS does not maintain a separate stack for each thread
On per-thread basis, the OS does not maintain virtual memory state
On per thread basis, the OS maintains only scheduling and accounting information
B) False, OS do maintain a separate stack for each thread.
K4 is planar while Q3 is not
Both K4 and Q3 are planar
Q3 is planar while K4 is not
Neither K4 not Q3 is planar
Both the above graphs are planar.
R = 0
R < 0
R ≥ 0
R > 0
So the answer will be R≥0.
Finite state automata
Deterministic pushdown automata
Non-Deterministic pushdown automata
EA = p × page fault service time + (1 – p) × Memory access time
=1/106×10×106+(1-1/106)×20 ≅29.9 ns
Register Indirect Scaled Addressing
Base Indexed Addressing
p - p = 4, and p+4 will be pointing to the fifth position in the array 'c'. So printf starts printing from 2 and prints 2011.
Option A: It violates the property of complete binary tree.
Option C: 8 is greater than 5. The root value is always greater than his children. So, the above tree is violating the property of max heap
Option D: 10 is greater than 8. The root value is always greater than his children. So, the above tree is violating the property of max heap
The algorithm uses dynamic programming paradigm
The algorithm has a linear complexity and uses branch and bound paradigm
The algorithm has a non-linear polynomial complexity and uses branch and bound paradigm
The algorithm uses divide and conquer paradigm.
2. Dynamic programming is a technique used to avoid computing multiple time the same sub-problem in a recursive algorithm.
Note: It is neither backtracking nor branch and bound because we are not branching anywhere in the solution space. The algorithm is not divide and conquer as we are not dividing the problem and then merging the solution
P ∩ Q
P – Q
Σ* – P
Σ* – Q
since regular languages are closed under complementation
parsing of the program
the code generation
the lexical analysis of the program
block entire HTTP traffic during 9:00PM and 5:00AM
block all ICMP traffic
stop incoming traffic from a specific IP address but allow outgoing traffic to the same IP address
block TCP traffic from a specific user on a multi-user system during 9:00PM and 5:00AM
(B) Possible because it is network layer protocol.
(C) Possible because SP address is present in Network layer.
(D) Not possible, because to block specific user, we need user id which is present in Application layer.
m1: Send an email from a mail client to a mail server m2: Download an email from mailbox server to a mail client m3: Checking email in a web browserWhich is the application level protocol used in each activity?
m1:HTTP m2: SMTP m3: POP
m1:SMTP m2:FTP m3:HTTP
m1: SMTP m2: POP m3: HTTP
m1: POP m2: SMTP m3: IMAP
(t1) > (t2)
(t1) = (t2)
(t1) < (t2)
Nothing can be said about the relation between t1 and t2
Deterministic finite automata (DFA) and Non-deterministic finite automata (NFA)
Deterministic push down automata (DPDA) and Non-deterministic push down automata (NFDA)
Deterministic single-tape Turning machine and Non-deterministic single tape Turning machine
Single-tape Turning machine and multi-tape Turning machine
Hence answer is (B)
Embed web objects from different sites into the same page
Refresh the page automatically after a specified interval
Automatically redirect to another page upon download
Display the client time as part of the page
Goals of Implementation
Algorithms for Software Implementation
. Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high) . Interrupt from Mouse(raises interrupt if the mouse is moved or a button is pressed) . Interrupt from Keyboard(raises interrupt when a key is pressed or released) . Interrupt from Hard Disk(raises interrupt when a disk read is completed) Which one of these will be handled at the HIGHEST priority?
Interrupt from Hard Dist
Interrupt from Mouse
Interrupt from Keyboard
Interrupt from CPU temperature sensor
Therefore, we can say that priorities are,
CPU temperature sensor > Hard disk > Mouse > Keyboard.
1. Registration_Num: Unique registration number of each registered student 2. UID: Unique identity number, unique at the national level for each citizen 3. BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or join accounts. This attribute stores the primary account number. 4. Name: Name of the student 5. Hostel_Room: Room number of the hostel Which one of the following option is INCORRECT?
BankAccount_Num is a candidate key
Registration_Num can be a primary key
UID is a candidate key if all students are from the same country
If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey
f3, f2, f4, f1
f3, f2, f1, f4
f2, f3, f1, f4
f2, f3, f4, f1
→ Divide functions into 2 categories
1. Polynomial functions
2. Exponential functions
Above 4 functions we have only one exponential function is f1 (n) = 2n . So, It’s value is higher than to rest of the functions.
Substitute log on both sides then we get an ascending order is f3, f2, f4.
p = 10
q = 100
r = 20
s = 5
t = 80
Total no. of matrix multiplication for (n+1) matrices,
n+1 = 4
n = 3
So, total no. of matrix multiplication possible is,
6C3/4 = ∠6/∠3×∠3×4 = 5
So, total 5 cases are possible,
(((M1 × M2) × M3) × M4)
∴ Total no. of scalar multiplications needed is,
20000 + 4000 + 1000 = 25000
((M1 × M2) × (M3 × M4))
∴ Total no. of scalar multiplications needed is,
20000 + 8000 + 16000 = 44000
(M1 ×(M2 ×(M3 × M4)))
∴ Total scalar multiplications,
160000 + 80000 + 8000 = 248000
((M1 ×(M2 ×M 3)) × M4)
∴ Total scalar multiplications,
10000 + 5000 + 4000 = 19000
(M1 × ((M2 × M3) × M4))
∴ Total scalar multiplications,
10000 + 40000 + 80000 = 130000
Hence, the minimum number of scalar multiplications is, 19000.
Ordered indexing will always outperform hashing for both queries
Hashing will always outperform ordered indexing for both queries
Hashing will outperform ordered indexing on Q1, but not on Q2
Hashing will outperform ordered indexing on Q2, but not on Q1.
For example, consider B+ tree, once you have searched a key in B+; you can find range of values via the block pointers pointing to another block of values on the leaf node level.
1, 4, 3
3, 7, 3
7, 3, 2
1, 2, 3
Clock cycle time of pipelining
= max (5ns, 6ns, 11ns, 8ns) + 1ns
= 11 + 1
Time without pipelining = 5 + 6 + 11 + 8 = 30 ns
∴ Speedup = 30/12 = 2.5
So lets check of n = 2,
L = a2k, k>0
Since k>0 than zero.
So L is the language accepting even no. of a's except 'ε'.
So DFA will be,
So, no. of states required is 2+1 = 3.
So for ank, (n+1) states will be required.
So we need 8 bits for indexing the 256 blocks in the cache. And since a block is 32 bytes we need 5 word bits to address each byte.
So out of remaining (32 - 8 - 5), 19 bits should be tag bits.
So tag entry size = 19 + 1 (valid bit) + 1 (modified bit) = 21 bits
∴ Total size of metadata = 21 × Number blocks = 21 × 256 = 5376 bits
= 10ms + (60/12000)+0
For 100 libraries = 100(10ms + (60/12000)+0) = 1.5seconds
(B) False, as it accepts string 'b', which is not accepted by original DFA.
(C) Same reason as (B).
(D) False, as it accepts string 'bba' which is not accepted by the given DFA.
/* This function computes the roots of a quadratic equation a.x^2 + b.x + c = . The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases. (i) When coefficient a is zero irrespective of discriminant (ii) When discreminant is positive (iii) When discriminant is zero (iv) When discriminant is negative. Only in case (ii) and (iii) the stored roots are valid. Otherwise 0 is stored in roots. The function returns 0 when the roots are valid and -1 otherwise. The function also ensures root1 >= root2 int get_QuadRoots( float a, float b, float c, float *root1, float *root2); */
A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?
T1, T2, T3, T6
T1, T3, T4, T5
T2, T4, T5, T6
T2, T3, T4, T5
T1 and T2 checking same condition a = 0 hence, any one of T1 and T2 is redundant.
T3, T4: in both case discriminant (D) = b2 – 4ac = 0. Hence any one of it is
T5 : D > 0
T6 : D < 0
Borrower Bank_Manager Loan_Amount Ramesh Sunderajan 10000.00 Suresh Ramgopal 5000.00 Mahesh Sunderajan 7000.00What is the output of the following SQL query?
SELECT Count(*) FROM ( ( SELECT Borrower, Bank_Manager FROM Loan_Records) AS S NATURAL JOIN ( SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T );
⇒ 7 ↓ (3 ↑ (4 ↑ 3)) ↓ 2
⇒ 7 ↓ (3 ↑ (4 ↑ 3))) ↓ 2 as ↓ is left associative
Push Down Automate (PDA) can be used to recognize L1 and L2
L1 is a regular language
All the three languages are context free
Turing machines can be used to recognize all the languages
L2: context free language
L3: context sensitive language
Initialize the address register Initialize the count to 500 LOOP: Load a byte from device Store in memory at address given by address register Increment the address register Decrement the count If count != 0 go to LOOP
Assume that each statement in this program is equivalent to machine instruction which takes one clock cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to execute. The designer of the system also has an alternate approach of using DMA controller to implement the same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory. What is the approximate speedup when the DMA controller based design is used in place of the interrupt driven program based input-output?
using DMA = 20 + 500 × 2 = 1020
Required speed up = 3502/1020=3.4
P(x) being true means that x is a prime number
P(x) being true means that x is a number other than 1
P(x) is always true irrespective of the value of x
P(x) being true means that x has exactly two factors other than 1 and x
This is the definition of prime nos.
SELECT Y FROM T WHERE X=7;`
Index position of mode of X in X is the same as the index position of mode of Y in Y.
Index position of median of X in X is the same as the index position of median of Y in Y.
μy = aμx + b
σy = aσx + b
(σy)2 is variance so,
yi = a * xi + b
(σy)2 = a2 (σx)2
⇒ σy = a σx
Hence option (D) is incorrect.
(2,1) (3,2) (4,3) (5,4).
So only 4 possibilities are there and sample space will be,
5C1 × 4C1 = 20
So probability = 4/20 = 1/5
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
CT = Completion time
TAT = Turn Around Time
WT = Waiting Time
TAT = CT - AT
WT = TAT - BT
Gantt Chart using pre-emptive shortest job first scheduling algorithm,
Avg. WT = 4+0+11/3 = 5ns
Load R2, b ; R2 ← M[b]
Sub R1, R2 ; R1 ← R1 – R2
Load R2, c ; R2 ← M[c]
Load R3, d ; R3 ← M[d]
Add R2, R3 ; R2 ← R2 + R3
Load R3, e ; R3 ← M[e]
Sub R3, 3 ; R3 ← R3 – R2
Add R1, R3 ; R1 ← R1 + R3
Total 3 Registers are required minimum
∴ 1+0+0+0+0+0+0+0+0+1+0 = 2
∴ 5+4+3+0 = 12
So total no. of distinct output (states) are 4.
So, after 010 it moves to 011.
n2 – n + 1
6n – 11
2n + 1
Cost of MST,
= 3+4+6+8 = 21
Only option (B) satisfies it.
Now MST of above graph is,
∴ The length of path from v5 to v6 in the MST is,
8+4+3+6+10 = 31
(3, 2, 0, 2, 5)
(3, 2, 0, 2, 6)
(7, 2, 0, 2, 5)
(7, 2, 0, 2, 6)
N2 has made entry ∞
N4 has the distance of 8 to N1
N3 has the distance of 2 to N4
So 2 + 8 = 10
P2 = Q3R2
Q2 = PR
Q2 = R3P
R = P2Q2
∴ P = bk, Q = b2k, R = b3k
Now, Q2 = b4k = b3k bk = PR
having to visit
for a visit
2800 = 4n + e; n = normal
300 = 10n + 2; e = excess/pending
n = 100/3, e = 8000/3
5 days: 500 ×(5⋅100/3)+ 8000/3
Minimum possible = 6
how to write a letter of condolence
what emotional stages are passed through in the healing process
what the leading causes of death are
how to give support to a grieving friend