1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Drupady [299]
3 years ago
9

The goal of this problem is to cover all roads with cameras. A camera placed at a station can cover all the roads connected to i

t. For example, if we place a camera at station 0, the roads (or edges) (0,3) and (0,8) are covered. Note: the edges (0,3) and (3,0) are the same. We want to find all solutions that can cover a network. For example, one solution is to place a camera at each station will cover all roads. In G2, which has 10 stations, this solution is the set {0,1,2,3,4,5,6,7,8,9} or [True, True, True, True, True, True, True True, True, True). Another solution for G2 is {2, 3, 5, 8} or [False, False, True, True, False, True, False, False, True, False, False]. Any road/edge in G2 is connected to one of these 2 or 3 or 5 or 8. Therefore, {2,3,5, 8} is one of the solutions we look for. The code below is almost complete in printing out all solutions, i.e. sets of stations that cover an entire network. What you need to do for this problem is modyfing the is_coverage function, which returns True if the solution is a coverage, and False if it is not. At this time, it's just a placeholder, which always returns True. This is obviously incorrect. You need to fix it. [42]: def is_coverage (solution, G): return True def get_stations(s): return set([i for i in range(len(s)) if s[i]==True]) def cover(G, solution, i): if i==len(solution): if is_coverage (solution, G): print(get_stations ( solution)) else: solution[i] = True cover(G, solution, i+1) solution[i] = False cover(G, solution, i+1)
Computers and Technology
1 answer:
Sergeeva-Olga [200]3 years ago
6 0

Answer:

srry dont know

Explanation:

You might be interested in
A curb of this color means you may stop only to pick up or drop offs passengers or male
Delicious77 [7]
I believe it is a white curb!
7 0
3 years ago
Is science fiction always set in the future
Natali5045456 [20]
Yes and No it all depends on how the author wants the poem how to be and become. Majority of the time science fiction is set for the future.
5 0
2 years ago
What is the series of process in which light energy is converted into simple sugar called
tangare [24]

photosynthesis i think

7 0
3 years ago
Kali, a Python programmer, is using the turtle module to write the word "hello." Which code should she use to indicate the locat
Sever21 [200]

Answer:

a) penup()

goto(-100, 200)

pendown()

Explanation:

The python program to indicate the location to begin writing the word can be

penup()

goto(-100, 200)

pendown()

# in python is use to add comment so it is incorrect.

all other option does not have correct syntex.

4 0
3 years ago
Read 2 more answers
What domain name would you be likely to find in the url of a large environmental group?
horrorfan [7]
The domain name you are likely will find in a url of  a large environmental group is .org.
The domain name .org is a generic top-level domain name system(DNS) used in the internet.The name is truncated from organization.
5 0
3 years ago
Other questions:
  • Adam would like to reduce the size of an image that he inserted into a document. He selects the image and chooses the Crop optio
    11·2 answers
  • 1. Jesse wants a recommendation about creating an SCR help desk. She said that I can find lots of information about help desks o
    7·1 answer
  • Your laptop doesn't have a serial port. what type of connector will your laptop require
    6·1 answer
  • Which of the following terms best describes the security domain that relates to how data is classified and valued?
    14·1 answer
  • Creating a newsletter
    8·1 answer
  • How do I send the face to the back? Seriously, I can't find out how...
    13·1 answer
  • I need help about computer program. Solve C language code...... please​
    7·1 answer
  • In order for a sort to work, which of the following is required?
    14·1 answer
  • Which of the following best explains why algorithms are written in the design phase?
    11·1 answer
  • What is one problem caused by spending too much time studying at your computer? A. It increases stress and negatively affects yo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!