codercoder
BAN USER- 0of 0 votes
AnswersContext:
- codercoder in United States
There's a network of computers. Each computer accepts connections at certain incoming port numbers and can make outgoing connections to a possibly different set of outgoing port numbers. Some computers are connected through cables to each other. Computer A can directly transmit data to computer B if and only if:
there is a direct cable connection between computer A and B,
there exists a port number X, that is an outgoing port on computer A and an incoming port on computer B.
Some of the computers are connected directly to the outside, unsafe network. If there is a way to connect to computer Z either directly or indirecly from the outside network, that computer Z is "at risk". If there is no way to connect to computer Z from outside network, that computer is "safe".
Question:
Write a program that given:
computers (each computer has incoming and outgoing port numbers),
cable connections between computers (a pair of computers),
computers accessible from outside network,
Print out all "safe” computers and all possible ways to access a specific computer from outside network.| Report Duplicate | Flag | PURGE
Trees and Graphs