370 FORMULA Book Free Unacademy
370 FORMULA Book Free Unacademy
HELLOSONU01
NEW BATCH
HELLOSONU01
COMPLETED 10 LECTURES
TODAY LIVE CLASS - REGULAR EXPRESSIONS
You can expect FULL MARKS in TOC
NEW
HELLOSONU01
MY UPCOMING COURSES
COMPLETE COURSE ON DISCRETE
MATHEMATICS STARTING
From 8th NOV
For GATE 2023/24/25
1 to 4
1. p → q = ∼p ∨ q.
2. p → q = ∼q → ∼p.
3. Biconditional is equivalent to EX-NOR Gate.
4. p ↔ q = (p ∧ q) ∨ (∼p ∧ ∼q).
p unless q ∼q → p
13 - 15
16 - 17
For a conditional statement p → q,
1. Its converse statement (q → p) and inverse statement
(∼p → ∼q) are equivalent to each other.
2. p → q and its contrapositive statement (∼q → ∼p) are
equivalent to each other.
30
|E(G)| + |E(G’)|
= C(n,2)
= n(n-1) / 2
|V(G)| = |V(G’)| 41
42 - 45
If |V1| = m and |V2| = n, then the complete bipartite graph is denoted by Km, n.
1. Km,n has (m+n) vertices and (mn) edges.
2. Km,n is a regular graph if m=n.
In general, a complete bipartite graph is not a complete graph.
3. Km,n is a complete graph if m=n=1.
4. The maximum number of edges in a bipartite graph with n vertices is ⌊n2 /4⌋
Simple Graph 46 - 47
A graph with no loops and no parallel edges is called a simple graph.
•The maximum number of edges possible in a simple graph with ‘n’ vertices
is nC2 where nC2 = n(n – 1)/2.
•The number of simple graphs possible with ‘n’ vertices = 2nc2 = 2n(n-1)/2.
2^n
58
59 TRANSALTE IN
PROPOSITIONAL LOGIC
“I will not go to school unless you come.”
This QUESTION is of the form- “p unless q”.
r=e–v+2
In any graph,
•The sum of degree of all the vertices is always even.
•The sum of degree of all the vertices with odd degree is always even.
•The number of vertices with odd degree are always even.
62
Because, In Binary Tree, number of leaf nodes is always one more than nodes with
two children.
L=T+1
where, L=Number of leaf nodes
199
#include <stdio.h>
int main()
{
printf("Hello World"); 1
}
TIME COMPLEXITY–
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1st Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31st Oct
4. Plus subscription 4 + 1 months Offer last date – 31st Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1st Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31st Oct
4. Plus subscription 4 + 1 months Offer last date – 31st Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
#include <stdio.h>
void main()
3
{
int i, n = 8;
for (i = 1; i <= n; i++) {
printf("Hello Word !!!");
}
}
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
Here we are using the for loop so that 0(n*(n/3)*(n*n)/3) so that 0(n^4)
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
for i <--- 1 to n 9
for j <---- 1 to n/2
X=X+1
(i and j both are incrementing by 1)
Outer runs for n times and inner for
n+1
Inner runs for n/2 + 1 times
So will it be n(n/2) => O(n^2) times...
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use code HELLOSONU01 to get maximum discount on Unacademy Subscription.
Also get 350 SRPs book (Best revision book for GATE CS IT) & 3500 + Practice questions.
12
O(LogLogn) Time Complexity of a loop is considered as O(LogLogn) if
the loop variables is reduced / increased exponentially by a constant
amount.
// Here c is a constant greater than 1
for (int i = 2; i <=n; i = pow(i, c)) { // some O(1) expressions }
//Here fun is sqrt or cuberoot or any other constant root
for (int i = n; i > 1; i = fun(i)) { // some O(1) expressions }
ANNOUNCEMENTS
4 BIG Announcements :
1. New Batch For GATE 2023 Starting from 3rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1st Nov
3. Plus subscription 12 + 4 months Offer last date – 31st Oct
4. Plus subscription 4 + 1 months Offer last date – 31st Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
13
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
13
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
15
16
17
19
20
DATA STRUCTURES
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
22 - 26
COMPLEXITIES RELATED TO LINKED LIST
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount On
1. New Batch For GATE 2023 Starting from 3rd rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription. 27 - 40
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
COMPLEXITY
Time complexity for the following operations on Singly
Linked Lists of n nodes: TRICKS
Add a new node to the beginning of list: O(1) Time complexity for the following operations on
Add a new node to the end: O(n) Doubly Linked Lists of n nodes:
Add a new node after k'th node: O(n)
Search a node with a given data: O(n) Add a new node to the beginning of list: O(1)
Add a new node after a node with a given data: O(n) Add a new node to the end: O(n)
Add a new node before a node with a given data: O(n) Add a new node after k'th node: O(n)
Traverse all nodes: O(n) Search a node with a given data: O(n)
Delete a node from the beginning: O(1) Add a new node after a node with a given data: O(n)
Delete a node from the end: O(n) Add a new node before a node with a given data: O(n)
Delete a node with a given data: O(n) Traverse all nodes: O(n)
Delete the k'th node: O(n) Delete a node from the beginning: O(1)
Modify the data of all nodes in a linked list: O(n) Delete a node from the end: O(n)
Delete a node with a given data: O(n)
ANNOUNCEMENTS
ANNOUNCEMENTS Delete the k'th node: O(n)
4 BIG Announcements :
Modify the data of all nodes in a linked list: O(n)
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting 3rd
max
from discount On
rd Nov
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
UseCOMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum discount on
Unacademy Subscription. 40-COMPLEXITY
41 52 COMPLEXITY
MATHEMATICS STARTING
Also get 350 SRPs book (Best TOMORROW
revision book
AT
for GATE CS IT) & 3500
6:15questions.
+ Practice PM TRICKS
TRICKS
Time complexity for the following operations on Circular Singly Linked Time complexity for the following operations on
Lists of n nodes: Circular Doubly Linked Lists of n nodes:
Add a new node to the beginning of list: O(n)
Add a new node to the end: O(n) Add a new node to the beginning of list: O(1)
Add a new node after k'th node: O(n) Add a new node to the end: O(1)
Search a node with a given data: O(n) Add a new node after k'th node: O(n)
Add a new node after a node with a given data: O(n) Search a node with a given data: O(n)
Add a new node before a node with a given data: O(n) Add a new node after a node with a given data:
Traverse all nodes: O(n)
O(n)
Delete a node from the beginning: O(n)
Delete a node from the end: O(n) Add a new node before a node with a given
Delete a node with a given data: O(n) data: O(n)
Delete the k'th node: O(n) Traverse all nodes: O(n)
Modify the data of all nodes in a linked list: O(n) Delete a node from the beginning: O(1)
Delete a node from the end: O(1)
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements : Delete a node with a given data: O(n)
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting from 3rd
max discount On
rd Nov Delete the k'th node: O(n)
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free Modify the data of all nodes in a linked list: O(n)
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
UseCOMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum discount on
MATHEMATICS Unacademy Subscription.
STARTING TOMORROW AT 53 - 73 COMPLEXITY
Also get 350 SRPs book (Best revision book for GATE CS IT) & 3500
6:15questions.
+ Practice PM TRICKS
PARAMETERS LINKED LIST ARRAY DYNAMIC ARRAY
Indexing O(n) O(1) O(1)
Insertion/Deletion at O(1) O(n), if array is not full O(n)
Beginning
Insertion at ending O(n) O(1), if array is not full O(1), if array is not full
O(n), if array is full
Deletion at ending O(n) O(1) O(n)
Insertion in middle O(n) O(n), if array is not full O(n)
Deletion in middle O(n) O(n), if array is not full O(n)
Wasted space O(n) 0 O(n)
(for pointers)
ANNOUNCEMENTS
4 BIG Announcements :
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting 3rd
max
from discount On
rd Nov
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Sort Average Best Worst
Bubble sort O(n^2) O(n^2) O(n^2)
Modified Bubble
O(n^2) O(n) O(n^2)
sort
Selection Sort O(n^2) O(n^2) O(n^2)
Insertion Sort O(n^2) O(n) O(n^2)
Heap Sort O(n*log(n)) O(n*log(n)) O(n*log(n))
Merge Sort O(n*log(n)) O(n*log(n)) O(n*log(n))
Quicksort O(n*log(n)) O(n*log(n)) O(n^2)
Bucket Sort O(n+k) O(n+k) O(n^2)
Radix Sort O(nk) O(nk) O(n+k)
Tim Sort O(n) O(nlogn) O(nlogn)
Shell Sort O(n) O((nlogn)^2) O((nlogn)^2)
Counting Sort O(n+k) O(n+k) O(n+k)
Randomized O(nlogn) O(nlogn) O(nlogn)
Quick Sort 74 - 103
4
4 BIG
BIG Announcements
Announcements ::
ANNOUNCEMENTS
ANNOUNCEMENTS COMPLEXITY
1. New Batch rd
1. Use Batch For
For GATE
NewHELLOSONU01 GATE 2023 Starting
code
2023 from
to get
Starting from 3
max rd Nov
3rd discountst On
Nov
2. Iconic Subscription
subscription (GATE)
& PriceSRPs
350 hikingBook from 1stst Nov
to 7.5%Free TRICKS
3. Plus
3. Plus subscription 12 ++ 4
subscription 12 4 months
months Offer
Offer last date –– 31
last date 31ststst Oct
Oct
date –– 31
4. st
4. Plus subscription 4
Plus subscription 4 ++ 1
1 months
months Offer
Offer last
last date 31stst Oct
Oct
Use code HELLOSONU01 to get maximum discount on Unacademy
Subscription. 104 - 108
Also get 350 SRPs book (Best revision book for GATE CS IT) & 3500 + Practice
questions. COMPLEXITY
TRICKS
ANNOUNCEMENTS
4 BIG Announcements :
1. New Batch For GATE 2023 Starting from 3rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1st Nov
3. Plus subscription 12 + 4 months Offer last date – 31st Oct
4. Plus subscription 4 + 1 months Offer last date – 31st Oct
Use code HELLOSONU01 to get maximum discount on Unacademy Subscription.
Also get 350 SRPs book (Best revision book for GATE CS IT) & 3500 + Practice questions.
ANNOUNCEMENTS
4 BIG Announcements :
1. New Batch For GATE 2023 Starting from 3rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1st Nov
3. Plus subscription 12 + 4 months Offer last date – 31st Oct
4. Plus subscription 4 + 1 months Offer last date – 31st Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
119 - 123
COMPLEXITY TRICKS
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting 3rd
max
from discount On
rd Nov
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
124 - 129
COMPLEXITY
TRICKS
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting 3rd
max
from discount On
rd Nov
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
Use COMPLETE
code HELLOSONU01COURSE to getON DISCRETE
maximum MATHEMATICS
discount on Unacademy Subscription.
STARTING
Also get 350 SRPs TOMORROW
book (Best revision ATIT)6:15
book for GATE CS & 3500PM
+ Practice questions.
130 - 149
COMPLEXITY
DATA ACCESS SEARCH INSERTION DELETE
STRUCTURE
TRICKS
QUEUE FUNCTIONS :
1. isfull() − Checks if the queue is
full.
2. isempty() − Checks if the
queue is empty.
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
1. Use
NewHELLOSONU01 code
Batch For GATE 2023 to get
Starting 3rd
max
from discount On
rd Nov
2. Iconic Subscription (GATE)
subscription PriceSRPs
& 350 hikingBook from 1stst Nov
to 7.5%Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
OPERATING
SYSTEMS
FORMULA 1
Total no. of process created ={ (2n) -1)+1 }
ANNOUNCEMENTS
ANNOUNCEMENTS
4 BIG Announcements :
Use HELLOSONU01 code to get max discount
1. NEW Batches
New Batch For 2023
For GATE GATEStarting
Startingfromfrom
3rd 20th Oct on Unacademy plus.
rd Nov
2. Iconic Subscription (GATE) Price hiking to 7.5% from 1stst Nov
On subscription & 350 SRPs Book Free
3. Plus subscription 12 + 4 months Offer last date – 31stst Oct
4. Plus subscription 4 + 1 months Offer last date – 31stst Oct
FORMULA 2
size of memory = 2n x Size of one location.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
•Given n processes P1, P2, … , Pn and burst time of each process Pi as ti.
•Then, predicted burst time for process Pn+1 is given as-
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
FORMULA 11-12
NEW Batches For GATE Starting from 20th Oct on Unacademy plus.
FORMULA 13
n bits of address →
2 ^ n memory locations
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
We know-
•Segment Offset must always lie in the range [0, limit-1].
•If segment offset becomes greater than or equal to the limit of segment, then
trap addressing error is produced.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
NEW Batches For GATE Starting from 20th Oct on Unacademy plus.
FORMULA 27
Page table size
= Number of entries in the page table x Page table entry size
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
Use
NEWHELLOSONU01 code
Batches For GATE Starting fromto
20thget max
Oct on discount
Unacademy plus.
locate Track
FORMULA 2
Thus,
Non-pipelined execution time
= Total number of instructions x Time taken to execute one instruction
= n x k clock cycles
Thus,
Pipelined execution time
= Time taken to execute first instruction + Time taken to execute remaining instructions
= 1 x k clock cycles + (n-1) x 1 clock cycle
= (k + n – 1) clock cycles
Speed up
FORMULA 6
= Non-pipelined execution time / Pipelined execution time
= n x k clock cycles / (k + n – 1) clock cycles
= n x k / (k + n – 1)
= n x k / n + (k – 1)
= k / { 1 + (k – 1)/n }
i = j modulo m
where
•If k = Total number of lines in the cache, then k-way set associative mapping becomes fully associative
mapping.
M/M Organization
FORMULA 24
CPU L1 L2 L3
FORMULA 25
FORMULA 26
FORMULA 27 - 30
Instruction set size – It tells the total number of instructions defined in the processor.
Opcode size – It is the number of bits occupied by the opcode which is calculated by taking log of instruction set size.
Operand size – It is the number of bits occupied by the operand.
Instruction size – It is calculated as sum of bits occupied by opcode and operands.
FORMULA 31 , 32
In Horizontal micro-programmed control unit, the control signals are
represented in the decoded binary format, i.e., 1 bit/CS. Here ‘n’ control
signals require n bit encoding. On the other hand.
L = (n-1)*I + 1
FORMULA 24
e=v–1
Degree = 2 * e
FORMULA 25
Degree = 2 * e
FORMULA 26
Height h
2h+1 – 1 nodes
FORMULA 28
PERFECT BINARY TREE
Height h
Height h
2h leaf nodes
FORMULA 30
Ports = 2
Links = 3
N= 3
Efficiency of Stop & Wait protocol
Efficiency (η) = Useful Time / Total Time
where-
•Useful time = Transmission delay of data
packet = (Transmission delay)packet
•Useless time = Time for which sender is
forced to wait and do nothing = 2 x
Propagation delay
FORMULA 7
20 Questions (DLL)
FORMULA 8,9,10
FORMULA 11,12,13
FORMULA 14,15,16
Meaning-
Let us perform the probabilistic analysis to find the average number of collisions before a successful
transmission.
Consider-
•Number of stations connected to a CSMA / CD network = n
•Probability of each station to transmit the data = p FORMULA 18
Transmission will be successful only when-
•One station transmits the data
•Other (n-1) stations do not transmit the data.
IP 00100110.00001001.11010011.00010011
Mask 11111111.11111111.11111111.11110000
Subnet ID 00100110.00001001.11010011.00010000
Broadcast 00100110.00001001.11010011.00011111
SID = 38.9.211.16
•Sender should not send data greater than receiver window size.
•Otherwise, it leads to dropping the TCP segments which causes TCP Retransmission.
•So, sender should always send data less than or equal to receiver window size.
•Receiver dictates its window size to the sender through TCP Header.
Sender window size = Minimum (Receiver window size, Congestion window size)
1. Slow Start
2. Congestion Avoidance
3. Congestion Detection FORMULA 31
1. Slow Start Phase-
•Initially, sender sets congestion window size = Maximum Segment Size (1 MSS).
•After receiving each acknowledgment, sender increases the congestion window size by 1 MSS.
•In this phase, the size of congestion window increases exponentially.
Threshold
= Maximum number of TCP segments that receiver window can
accommodate / 2
= (Receiver window size / Maximum Segment Size) /2
•Time Out Timer expires before receiving the acknowledgement for a segment.
•This case suggests the stronger possibility of congestion in the network.
•There are chances that a segment has been dropped in the network.
Reaction-
Reaction-
FORMULA 40