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
13. A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the other is called "tails".
serious [3.7K]

Answer: c

Explanation:

only reasonable answer

7 0
3 years ago
The Leal button is located in the
Fed [463]
The button is located on the left side of the gear shift right under the main shift button
7 0
3 years ago
Please, give me a comic or story idea. I will mark brainliest. ( i need 5 slides with 2 characters in the story or comic) Please
salantis [7]

Answer:

Jack and John

Explanation:

Jack called John and offered him to come with him and some other friends to go out to the mall.

.....

8 0
3 years ago
Read 2 more answers
Fill in the blank with the correct response.
andrew11 [14]

Answer:

entertainment.

Explanation:

i dunnoif it is right, but I would put this.

4 0
2 years ago
Which type of operating system is usually used in personal computers?
jeyben [28]

Answer:

A GUI based operating system is usually used in personal computers

Explanation:

The three most common operating systems for personal computers are Microsoft Windows, macOS, and Linux. Modern operating systems use a graphical user interface, or GUI (pronounced gooey).

4 0
3 years ago
Other questions:
  • Question 2 (2 points)
    6·1 answer
  • Write a Unix (Linux) find-like command (myFind) in Python3 where the function will return the full paths of all the files contai
    9·1 answer
  • The purpose of a malfunction indicator lamp (MIL) is to:
    12·1 answer
  • Insert in the Current Values section at the top of the worksheet summary functions that use the range I9:I54. In cell I2, calcul
    7·1 answer
  • Anyone wanna join my giggl?
    11·2 answers
  • First Computers and Technology question in 4 years..
    11·1 answer
  • In the Create Sparkline dialog, the _______ box refers to the cell range where you want the Sparklines to appear.
    9·1 answer
  • Which LIKE operator would match a single character?<br><br> *<br> ?<br> []<br> #
    14·1 answer
  • Functions are used to _________
    10·1 answer
  • A company organizes all of its client database in order of the amount of money that the account is worth. When a new account is
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!