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
What is a unit to measure loudness
FinnZ [79.3K]

decibels i believe is the correct answer. hope it helps :)

3 0
2 years ago
Point mode allows you to select cells for use in a formula by using your finger or the pointer
Serga [27]
That statement is true

in excel, you could enter point mode by pressing any keyboard navigation such as page down, page up, or the arrow keys or by clicking any cells in the worksheet

This mode will select a cell or range as formula operand


7 0
3 years ago
Complete the following sentences with the correct form of the verbs in brackets.
Rina8888 [55]

Answer:

1. don't pass, will be

2. will get, eat

3. don't help, won't help

4. are meeting, will you go?

5. will stay, rains

Is

6.Will

Puts on

7.Will go

Asks

8.Will... tell

9.Tell

Will

10.Go... Will find out...

Explanation:

5 0
2 years ago
Before you can use a navigation control, you must _____. A. configure the web.config B. configure the global.asax C. configure t
natita [175]

Answer:

C

Explanation:

6 0
3 years ago
Read 2 more answers
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion
Jlenok [28]

Direct marketing (APEX)


6 0
3 years ago
Read 2 more answers
Other questions:
  • How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? what system transl
    11·1 answer
  • What is tuple and attribute of a relation​
    11·1 answer
  • Which of the following is not a good technique for photographing groups? Visiting the location.
    9·1 answer
  • The File method lastModified() returns
    10·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • (9.10 Code Practice: Question 1)
    12·1 answer
  • Please help I need help with web technology I forgot to post the question in the last one. here it is tho.
    9·1 answer
  • 8. Choose the 3 correct statements for the code below.
    11·1 answer
  • the first thing to do when your computer gives you an error message is A restart the computer B press the F2 key C write down th
    12·1 answer
  • The designers of a database typically begin by developing a​ __________ to construct a logical representation of the database be
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!