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 statements is not true? Group of answer choices
Nesterboy [21]

Answer:

A

Explanation:

Option A is not true because a Boolean variable type can hold one of two values only that is  (true/True or false/False).

All the other options given in the question are correct because

  1. A variable declaration refers to specifying its type and name
  2. If string variables are assigned a numeric values which is legal provided the values are enclosed in quaotes( " "), trying to carryout a mathematical operation like addition will result in string concatenation.
  3. The Variable name I_Love_to_eat_pizza is legal because it contains no special characters, doesn't start with a number and its not a reserved word in any language
4 0
3 years ago
Technology question.
Gnoma [55]

You should select the text by clicking and holding the mouse at the beginning of the text and then dragging it to the end of the area you want to change. You can also use the arrow keys and hold shift, but this takes longer typically.

5 0
3 years ago
You are working on a project and need to be able to access the content from home and share the files with other team members. Th
inn [45]
Local server so you can all you use if you guys are near
5 0
3 years ago
Read 2 more answers
After a customer buys a computer or receives service from Top Computers and Service, a service representative contacts each cust
AlladinOne [14]

Answer: False

Explanation:

 The given statement is false, as the survey information basically represent feedback in which the service representative contact each and every customers to collect the feedback.

Feedback is in the form of information in which it represent the reaction in the scenario to the output but it basically affects as an input. Therefore, the survey information is in the form of input not as output.

7 0
3 years ago
Have you seen this ProFlipperz Review? It is a course on how to flip every day household items for a profit.
Nadusha1986 [10]

Well if you have one I know it's cool but don't flip it all the time

Explanation:

6 0
2 years ago
Other questions:
  • Which computer port transmits audio and video without the need for compression?
    6·1 answer
  • How might writing an online journal be different than writing in a paper one ​
    15·2 answers
  • Write multiple if statements. if caryear is 1969 or earlier, print "probably has few safety features." if 1970 or higher, print
    6·1 answer
  • What is the purpose of ergonomics in the workplace? A.Keep workers safe and injury free
    5·2 answers
  • 2. Because technology is always changing, there are new applications being developed constantly. (1 point)
    9·2 answers
  • True or False? Most operating systems allow the user to specify a set of paths that are searched in a specific order to help res
    5·1 answer
  • Identify the layout in which you will be able to view and edit the header and footer
    12·1 answer
  • Based on your research and understanding, write a 3- to 4-page Microsoft Word document that:
    11·1 answer
  • Most hard drives are divided into sectors of 512 bytes each. Our disk has a size of 16 GB. Fill in the blank to calculate how ma
    9·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!