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
Which of the following allows a user to quickly access a frequently used computer app? Alphabetize program icons. O Create a sho
professor190 [17]

Answer:

Create a shortcut on the toolbar

Explanation:

You can use process of elimination. alphabetizing would not help to find it quicker, but it is an easier way. Deleting all icons wouldn't help at all. And placing all icons in a folder would make it even messier. So, it is creating a shortcut. Plus, I got it right on my test :)

7 0
3 years ago
Read 2 more answers
Write a function that receives a StaticArray where the elements are already in sorted order, and returns a new StaticArray with
Allisa [31]

The code that remove duplicate is as follows:

def remove_duplicate(mylist):

    mylist = list(dict.fromkeys(mylist))

    return mylist

print(remove_duplicate([1, 1, 2, 3, 3, 5, 6, 7]))

<h3>Code explanation</h3>

The code is written in python.

  • we defined a function named "remove_duplicate" and it accept the parameter "mylist".
  • The variable "mylist" is used to store the new value after the duplicate vallues has been removed.
  • Then, wed returned mylist.
  • Finally, we call the function with the print statement . The function takes the required parameter.

learn more on python here: brainly.com/question/21126936

7 0
2 years ago
Amye is in high school. As part of one of her classes, she had to identify the legality of different situations that involved
adell [148]
I say you should pick answer 1. an HR makes more sense since she is interested in a topic about the legality of different situations that are related to workers and their employers.
8 0
2 years ago
Read 2 more answers
What are the technical details about each hardware component called?
RideAnS [48]
Specifications are the technical details about each hardware component
8 0
3 years ago
What scientific principle would a plumber need to know when designing and installing plumbing a new construction
Volgvan
Diong reasearch to know what your dion
7 0
3 years ago
Other questions:
  • A ____________ is a set of commands which can be run by calling it by name.
    11·2 answers
  • Write a set of pseudocode instructions to feed a pet, using at least five steps?<br><br> Thank you!!
    6·1 answer
  • The global network that links millions of computers is the
    9·2 answers
  • Texture fills are available to add as a slide background true or false
    7·2 answers
  • Create a class Str that subclasses str. Add a method to the subclass that checks if the string does not start with a given strin
    15·1 answer
  • The ____ auto fill option that fills the destination area using the format of the source area; no content is filled.
    12·1 answer
  • Calculate the number of telephone
    5·1 answer
  • Hi who plays among us
    9·1 answer
  • Fish Aquarium System of functional and Non-Functional requirement of the system.
    14·1 answer
  • True or False. A Windows Server 2016 that was installed in Desktop Experience mode can be converted to Server Core mode.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!