Surface area and Volumes

 Surface area and Volumes

Cube

Lateral surface area: 4a**2

Total surface area: 6a**2

Volume: a**3

Cuboid

Lateral surface area: 2(l+b)h

Total surface area: 2(lb+bh+hl)

Volume: l*b*h

Cylinder

Curved Surface area: 2*pi*r*h

Total surface area: 2*pi*r(r+h)

Volume: pi*r**2*h

Cone:

Lateral surface area: pi*r*l

Total surface area: pi*r(r+l)

Volume: 1/3*pi*r**2*h

Sphere:

Surface area: 4*pi*r**2*h

Volume: 4/3*pi*r**2*h

Simple Interest

 1. Difference between simple interest & compound interest for 2 years = pr**2/100**2

2. Same for 3 years = pr**2(300+r)/100**3

3. Compound Interest > Simple Interest

4. Simple Interest = PTR/100

5. Amount = Principle + interest

6. Compound Interest = P(1+r/100)**n - p

Work and Time

 Work and Time Apptitude Questions

Trick 1If M1 men can finish W1 work in D1 days and M2 men can finish W2 work in D2 days then, the relation is: M1*D1/W1 = M2*D2/W2

Trick 2: If M1 men finish W1 work in D1 days, working T1 time each day and M2 men finish W2 work in D2 days, working T2 time each day, then the relation is: M1*D1*T1/W1 = M2*D2*T2/W2

Trick 3: If A completes a piece of work in ‘x’ days, and B completes the same work in ‘y’ days, then, 

Work done by A in 1 day = 1/X

Work done by B in 1 day = 1/Y

Work done by A and B in 1 day = 1/X + 1/Y 

Total time taken to complete the work by A and B both = XY/(X + Y)

Trick 4: If A can do a work in ‘x’ days, B can do the same work in ‘y’ days, C can do the same work in ‘z’ days, then the total time taken by A, B and C to complete the work together = XYZ/(XY + YZ + ZX)

Trick 5:  If A alone can do a certain work in ‘x’ days and A and B together can do the same work in ‘y’ days, then B alone can do the same work in = XY/(X – Y)

Trick 7: If A can do a work in ‘x’ days and B can do the same work in ‘y’ days and when they started working together, B left the work ‘m’ days before completion then the total time taken to complete work is = (Y + M)X / (X+Y)

Trick 8: If A leaves the work ‘m’ days before its completion then the total time taken to complete work is = (X + M)Y / (X+Y)


Algorithms Gate CS&IT

Sorting Algorithms - 

Selection Sort Questions : Inplace, Straight selection, Time Com, Space Com

Recuccernce relations for sorting algorithms.

Bubble Sort Questions: External sorting

Insertion sort

Quick sort

merge sort

GATE QUESTIONS
Sorting gate que

Knapsack Problem - PPT

Dijkstras algorithm

Bellmanford Algorithm

Huffman Coding

Variable length coding.


All pair shortest path problem

Floyed - Warshall Algorithm - Watch in UT

Travelling salesman Problem - web

Optimal merge Pattern.

Prim's Algorithm

krushkal Algorithm


Previous year GATE Questions

https://practicepaper.in/gate-cse/algorithm

https://www.geeksforgeeks.org/algorithms-gate-questions/

https://questions.examside.com/past-years/gate/gate-cse/algorithms

CN numerical problems

 IP addresses and Fragmentation

https://cexpertvision.com/2021/03/19/numerical-practice-datagram-fragments/


Data link layer

1Q. A link has a transmission speed of 106 bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgement has negligible transmission delay, and that its propagation delay is the same as the data propagation delay. Also assume that the processing delays at the nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is ___ Ans 12


2Q. Consider the sliding window algorithm where sender window size is 9 and receiver window size is 7 and no out of order arrivals. What is the smallest value for maximum sequence number?


3Q. Suppose two hosts are connected by a point-to-point link and they are configured to use stop and waitStop-and-Waitprotocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest.

  1. Longer link length and lower transmission rate
  2. Longer link length and higher transmission rate
  3. Shorter link length and lower transmission rate
  4. Shorter link length and higher transmission rate

4Q. In a stop and wait ARQ, Bandwidth Delay product is 20,000 bits. Given the frame size is 1000 bits. What is the percentage of utilization of link if we have a protocol that can send 15 frames without waiting for acknowledgement? 75%


5Q. A sender uses the stop and wait ARQ protocol for reliable transmission of frames. Frames are of size 100 bytes and the transmission rate at the sender is 20 Kbps. Size of an acknowledgement is 10 bytes and the transmission rate at the receiver is 8 Kbps. The one way propagation delay is 10 msec.

Assuming no frame is lost, the sender throughput is ________ bytes/sec.

6Q. In the GO back N ARQ sender is sending the 20 packets to the destination with a window size of 4. Every sixth packet is lost and after a packet loss sender is sending one dummy packet outside the window for ensuring everything is correct [ dummy packet is an outside packet not the part of the window]. How many number of transmissions will be there?


Transport layer questions: 

1Q. Assume a TCP implementation over a 10Gbps link with one way dealy of 80ms if TCP receiver window size is 2MB and TCP send 1KB packet then how many RTT does it take until slow start phase open the congesion windows of 2MB. Assume no congestion and no loss of packet.

a) 11 RTT b) 10 RTT c) 12 RTT d) 13 RTT     solution


2Q. In TCP, MSS is 8B. If during the 6th RTT the network is congested and timeout occurs, by using the congestion algorithm, then the threshold value is _________(in Bytes). (assume initial congestion window size for the first transmission is 1 MSS)   solution

3Q.  Which layer connects the network support layers and user support layers ?  solution

  1. transport layer
  2. network layer
  3. data link layer
  4. session layer

4Q. Suppose two TCP connections are present over some bottleneck link of rate R bps. Both connections have a huge file to send (in the same direction over the bottleneck link). The transmissions of the files start at the same time. What transmission rate would TCP like to give to each of the connections? sol


5Q. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110.

  1. How much data is in the first segment?
  1. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number? sol

Popular Post

MindMaps

Featured post

Question 1: Reverse Words in a String III

  def reverseWords(s: str) -> str: words = s.split() return ' '.join(word[::-1] for word in words)