Maximum number of edges in a n – node undirected graph without self loops is
-
Solution
In a graph of n vertices draw an edge from vertex to (n –1)vertex. So the total number of edges is n(n – 1). Now, each is counted twice. So the maximum number of edges is
\(\frac{(n)(n+1)}{2}\)
The optimal page replacement algorithm will select the page that
-
Solution
An optimal page replacement algorithm has the lowest page fault rate of all algorithms. An optimal algorithm will never suffer from Be lady anamoly. It is simply said → Replace the page that will not be used for the longest period of time.
Which of the following scheduling algorithms is non-preemptive?
-
Solution
In first in first out scheduling is non preemptive because it never prompt.
Ten thousand airline stations are competing for the use of a single soltted ALOHA channel. The average station makes 18 request/hour. A slot is of 125 micro-second.What is the approximate total channel load?
-
Solution
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3,5, 15, 12, 16. The height of the binary search trree (the height is the maximum distance of a leaf node from the root) is_________.
-
Solution
A binary search tree, in which the numbers in the order 10, 1, 3, 5,15, 12, 16 are inserted.
With regard to the expressive power of the formal relational query languages, which the following statements is true?
-
Solution
A query can be formulated in relational calculus if and only if it can be formulated in relational algebra. So, relational algebra has the same power as relational calculus.But, it is possible to write syntactically correct relational calculus queries that have infinite number of answers. Such queries are unsafe.Queries that have an finite number of answers are safe relational calculus queries.Thus, Relational algebra has the same power as safe relational calculus.
Relation R with an associated set of functional dependencies,F is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set relations is
-
Solution
In functional dependency, mean relation R is in 3–NF. In 3-NF very few error left.In BCNF, redundancy is resulting set of relations is not present or zero.
The overhead required to read an entry in a page table(including the time to access associative memory) is 60 ns. To reduce this overhead, the computer has an associative memory that can hold 16 entries and can be access in 10ns.what hit ratio is needed to reduce effective access time to 70 ns?
-
Solution
Let E =associative memory look up time
T = memory cycle time
h =hit ratio
E + T = 60 ns
⇒E = 10, T = 50
EAT = h × (E + T) +(1 – h) × (E + 2T)
= (2 – h)× T + E
So, EAT = (2 – h)× 50 + 10 = 110 – 50 h
110 – 50 h = 70
50 h = 40
⇒h = 80%
In the C language
-
Solution
Information needed by a single execution of a procedure is managed using a contiguous block of storage called an activation record, or frame, consisting of the collection of fields. Pascal and C uses all these fields. Often register can take the place of one of one or more of them. It customary to push the activation record of a procedure on the run-times lack when the procedure is called and top of the activation record off the stack when control returns to the caller.
Sign extension is a step in
-
Solution
Floating point is always interpreted to represent a number in the following form : m × re