Question

3. Application: Telephone Switching Networks In a directly connected telephone network, all telephones are connected and don

full coding with answer

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution :-

Logic :

Here, to connect n telephones we use (n*(n-1))/2 lines.

When we add an additional telephones, then to connect it to all telephone we need exactly n additional lines. So, total number of telephones becomes (n+1).

Similarly, to add an additional telephones, we need exactly (n+1) additional lines. So, total number of telephones becomes (n+2). And, so on.

eg. To add 1 additional telephone in 10 telephone network, we require 10 additional lines as to connect to all telephones.

Screenshot: -

- o х TDM-GCC 4.9.2 €4-bit Release F:\Documents\test.cpp - Dev-C++ 5.11 File Edit Search View Project Execute Tools AStyle Wi

Output :

We show two output : - a) For n=4 and additional telephones =1 (Left hand figure)

b) For n=100 and additional telephones = 10 (Right hand figure)

- O X F:\Documents\test.exe Enter the number of telephones : 4 - O X T Select F: Documents\test.exe Enter the number of telep

Code : -

#include<bits/stdc++.h>
using namespace std;
int main(){
   int n;
   cout<<"Enter the number of telephones : ";
   cin>>n;
  
   int no_direct_lines ; //Number of direct lines to connect
   no_direct_lines = ((n*(n-1))/2);
  
   cout<<"\n Number of direct lines required for connecting "
       << n <<" telephones : "<<no_direct_lines<<endl;
      
   int added_telephone;   //Number of extra added telephones
   cout<<"\nEnter number of added additional telephone : ";
   cin>>added_telephone;
  
   int additional_lines=0; //Number of additional lines required to connect
  
   for(int i=1;i<=added_telephone;i++){
       additional_lines = additional_lines + (n);
       n=n+1; //Updating no. of telephones as we are adding one telephone
   }
   cout<<"\n Number of additional lines to be added : "<<additional_lines;
}

Answer :

When n = 100, we require 4950 connecting lines.

If we add 10 additional telephones then we require 1045 additional lines.

-----x----x----x------

Please give your valuable feedback and also rate my efforts.

Thank You.

Add a comment
Know the answer?
Add Answer to:
full coding with answer 3. Application: Telephone Switching Networks In a directly connected telephone network, all...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A simple telephone system consists of a single toll office and two end offices, each connected...

    A simple telephone system consists of a single toll office and two end offices, each connected to the toll office with N telephones. The wires between each end office and the toll office has 1 MHz capacity in each direction and each active telephone call requires 5 kHz bandwidth. 10% of the calls are long distance (calls that do not pass through the toll office are ‘local calls’, e.g. phone calls within the network, while calls that do pass through...

  • ACP Network+ Guide to Networks - CIS221 - 3 Year Option, 6th Edition Dean, T. (2013)....

    ACP Network+ Guide to Networks - CIS221 - 3 Year Option, 6th Edition Dean, T. (2013). ISBN-10: 113360 8191 | ISBN-13: 9781133608196 1.Complete Project 5-1 from the book and submit a snapshot of the outcome before you exit In this project, you will use a software program called Wireshark to view frames and datagrams traveling through a computer's NIC. Network managers may use Wireshark to aid in troubleshooting. For example, if a network suddenly acts sluggish, viewing its traffic could...

  • help me answer the following questions please 1. Stack (LIFO) & its application 1. Stack overflow...

    help me answer the following questions please 1. Stack (LIFO) & its application 1. Stack overflow & underflow 2. Implementation: partially filled array & linked list 3. Applications: reverse string, backtracking Exercises: 1) Which of the following applications may use a stack? A. parentheses balancing program. B. Keeping track of local variables at run time. C. Syntax analyzer for a compiler. D. All of the above. 2) Consider the usual algorithm for determining whether a sequence of parentheses is balanced....

  • 166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls...

    166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls and Os) goes in and out of a machine physically is through the NIC (network interface card). The way network communication goes in and out of a machine logically though, is through a program or service. A service is a program that runs in the background, independent of a logon, that provides functionalities to a system. Windows client machines, for instance, have a Workstation...

  • PART A 21 MARKS SHORT ANSWER QUESTIONS Answer ALL questions from this part. Write your answers...

    PART A 21 MARKS SHORT ANSWER QUESTIONS Answer ALL questions from this part. Write your answers in the Examination Answer Booklet. Each question is worth 1.5 marks (14 x 1.5 = 21 marks). Question 1 An organisation has been granted a block of addresses with the mask /22. If the organisation creates 8 equal-sized subnets, how many addresses (including the special addresses) are available in each subnet? Show your calculations. Question 2 Give an example of a valid classful address...

  • In this stage you should read all of the data into internal structures suitable for use in the later stages and create...

    In this stage you should read all of the data into internal structures suitable for use in the later stages and create an output representation that provides an overview of the data that was read. Photo 1&2 - Question Photo 3 - Input data Photo 4 - Introduction please write a code that will execute such function & generate a required output (as stated on the question). Input data is not required to write a code but if you need...

  • D4 Exćel Tutorial As you learned in the previous chapters, Current Designs has two main product...

    D4 Exćel Tutorial As you learned in the previous chapters, Current Designs has two main product lines- composite kayaks, which are handmade and very labor-intensive, and rotomolded kayaks, which require less labor but employ more expensive equipment. Current Design's controller, Diane Buswell, is now evaluating several different methods of assigning overhead to these products. It is important to ensure that costs are appropriately assigned to the company's products. At the same time, the system that is used must not be...

  • Global Airline Alliances, Airline Joint Ventures, and Network Difficulties Star Alliance (initiated by United Airlines) became...

    Global Airline Alliances, Airline Joint Ventures, and Network Difficulties Star Alliance (initiated by United Airlines) became the first multi-airline global network where member carriers could book seamless schedules and share frequent flyer benefits among their passengers. It was a convenient way for airlines to expand and maintain market share internationally without having to invest billions of dollars in market growth initiatives. It gave alliance partners airport access in regions where it might be difficult to obtain. Many of the partners...

  • is this better? i posted this question two times and everyone is saying its not clear....

    is this better? i posted this question two times and everyone is saying its not clear. i cant make it more clear then this. its due soon can someone please do it. its been two days since i post it the bottom pics that are in the end should be visable 10 current Design has two main product lines.compoule yale, which are handmade and 11 very laborIntensive and retomolded kayaks, which require less laber but employ more expensive equipment Current...

  • Python Coding The script, `eparser.py`, should: 1. Open the file specified as the first argument to...

    Python Coding The script, `eparser.py`, should: 1. Open the file specified as the first argument to the script (see below) 2. Read the file one line at a time (i.e., for line in file--each line will be a separate email address) 3. Print (to the screen) a line that "interprets" the email address as described below 4. When finished, display the total number of email addresses and a count unique domain names Each email address will either be in the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT