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
Grace [21]
3 years ago
9

Letm1, m2,···mnbe distinct numbers on the number line, in the increasing order. Your goalis to color all of them blue. You have

magical blue pens with the following property: Whenyou place the pen at co-ordinate x, all the points in the range [x - 5, x + 5] turn blue. Apen can be used only once. Give an algorithm to color all the points using as few pens aspossible. Prove the correctness of the algorithm and derive the runtime.
Computers and Technology
1 answer:
siniylev [52]3 years ago
7 0

Answer:

Following are the algorithm to this question:

y = 0 //  initialize variable y that assigns the value  0

p = 1 // initialize value 1 in the variable p which also known as starting position

init num = 1//define variable num that assign value 1

for j = 1 to n: //defining loop

y = m[j] - m[p]

if (y > 10) //defining if block

num++;  //increment num variable

p=i; //holding loop value in p variable

y= 0//assign value 0 in y variable

Explanation:

Following are the runtime analysis of the above-given algorithm:

The above-provided algorithm is greedy, but if it doesn't exceed the scope, it operates by greedily choosing its next object. Therefore the algorithm selects the fewest number of pens.

Running time:

This algorithm merely iterates once over all the points. The run-time is therefore O(n).

You might be interested in
Windows stores information from the Credential Manager application in secure folders called
Delicious77 [7]

Windows stores information from the Credential Manager application in secure folders called<u> VAULTS.</u>

<u></u>

Explanation:

  • A credential vault is a database used to store passwords and similar cryptographic key material.
  • The most common data stored in a credential vault are current and historical passwords to privileged accounts.
  • All credentials are saved in special folders on the computer, a place called Vaults. Moreover, you can back up all credentials to a file and restore them on to different computer.
  • Vault is a shareware program that acts as a bank vault, or safe, where you can keep you private information or files hidden and secure.
  • Everything in the vault is protected with an advanced encryption, and requires a password (your password) to open the vault to access the information.
8 0
2 years ago
4. The Internet may best be compared to a/an A. series of colored lights. B. loud truck motor. C. enormous skyscraper. D. large
Triss [41]
D. Large network of roads.

A resembles a modem/router and C a webserver.
6 0
3 years ago
Encoding a video format and then decoding it during playback is one of the functions of MPEG-4 and H.264 file players. MPEG-4 an
Sergio [31]

Answer:

video codecs

Explanation:

A video converter can be defined as a software application or program designed to avail end users the ability to convert video files from one digital format to another. After the conversion of the video is complete, the components of the video format such as aspect ratio (e.g 16:9, 4:3 etc), resolution (e.g 1028×760, 640×320), audio and video codecs (e.g mp3, mp4, H.264 etc), the bit rate are also converted depending on the choice of the user.

Encoding a video format and then decoding it during playback is one of the functions of MPEG-4 and H.264 file players. MPEG-4 and H.264 are known as video codecs.

7 0
2 years ago
Read 2 more answers
Many commercial encryption programs use a technology called ____, which is designed to recover encrypted data if users forget th
never [62]

Answer: key escrow

Explanation:

Using key escrow we are able to recover data if passphrase is forgotten. this technique uses a bypass link to get all the keys to the system only if it is an authorized entry.

7 0
3 years ago
_____ is a predefined format used for text the can include multiple font formatting features
seraphim [82]
The correct answer is



style
8 0
3 years ago
Other questions:
  • A communications system connecting two or more computers is called a(n) ________.
    7·1 answer
  • what is the primary way to access applications in windows 8? a. control panel b. start menu c. desktop tiles d. context menu
    7·1 answer
  • What are the first two lines of defense a company should take when addressing security risks?
    10·1 answer
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • Powerful IT security systems are needed to defend against what appears to be authorized access to a network or application. Sele
    6·1 answer
  • Where does the turtle belong in the cladogram shown below?<br> I’LL GIVE YOU BRAINLYEST
    6·2 answers
  • What are the advantages of using digital signals over analog signals? Scientist have found advantages when they convert digital
    5·2 answers
  • Most cell phones and tablets have solid-state storage drives. internal hard disk drives. internal cloud storage. external hard d
    7·1 answer
  • What is the correct format to use when<br> inserting a date in Excel?
    15·1 answer
  • Hey there! What would be the best way for me to learn Lua script? As well as learn Data Store, and other stuff. Thanks! Brainly
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!