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
WARRIOR [948]
2 years ago
6

Suppose you have coins of denominations 1, 3 and 4. You use a greedy algorithm, in which you choose the largest denomination coi

n which is not greater than the remaining sum. For which of the following sums, will the algorithm NOT produce an optimal answer?
a) 20
b) 12
c) 6
d) 5
Computers and Technology
2 answers:
timurjin [86]2 years ago
8 0

Answer:

The correct option is C

Explanation:

A greedy algorithm is any algorithm that follows the problem-solving heuristic of making the locally optimal choice at each stage with the intent of finding a global optimum.

In this, three coins {4,1,1} will be selected to make a sum of 6. But, the optimal answer is two coins {3,3}.

aalyn [17]2 years ago
6 0

Answer:

C) 6

Explanation:

You might be interested in
In the design phase of the systems development life cycle (SDLC), the _____ indicates hardware and software, such as specifying
Genrish500 [490]

Answer:

Option A

Explanation:

6 0
2 years ago
If the contents of encrypted file1.nc and encrypted file3.nc are different, but the original file1 and file3 are the same, and y
Over [174]

Answer:

The Difference is because of the salt added to the password before hashing or encrypting it.

Explanation:

The Difference is because of the salt added to the password before hashing or encrypting it.

Salts are random data used to mention uniqueness. Suppose if two users have same password for the same system. By adding Salt to the password makes it unique in the crypto system. Its a added security layer which can safeguard the passwords or hashed data in the keystore or storage.

Salt can be prepended to the password or appended to the password.

Suppose the password is “stuti” then its SHA256 HASH value is <u><em>“4beb1eb6f438495eede7b14ac0d2b955636a49412cd4eb5714341f5716144954”</em></u>

So, if we add a salt with random string <em>brainlysalttest</em> then its SHA256 HASH value is <u><em>“5429e85778f1b9f493da637848f253dedf3edbfbb72782d43eb7337cee45ab0c”</em></u>

If we append the salt <em>brainlytestsalt</em> to the same password and hash it using SHA256 then its hash value is : <u><em>“3919b677d80ae0da2b58f70b464f6492670ccffee78cf52972c6983995ed8f52”</em></u>

So clearly Salting to the password and Hashing the salted password will make the difference and also unique.

3 0
3 years ago
Q4. What is one of the benefits of using a library in a program?
Grace [21]

Answer:

Simplifies creating a complex program

Explanation:

5 0
3 years ago
Output a brief description of the game of hangman and how to play.
musickatia [10]

Answer:

Hangman is game which can be played with a pencil or pen and a paper. It is a multiplayer game which requires minimum two players. It is a guessing game, in which a player thinks of a word or a phrase and other player or players tries to guess it correctly, letter by letter or whole word or phrase at once, in a certain number of guesses.

In this game, the word to be guessed is represented by dashes. If the guessed word or letter is correct, the player fills the blank spaces. But if the guessed word or letter is wrong, the player draws an element of a hanged man stick figure one by one as a tally mark.

This game ends if the player who is guessing guesses the word or the phrase correctly and the guesser wins; or if the player guesses enough wrong letters of phrases that the other player finishes the drawing of the hangman and the guesser loses.

3 0
3 years ago
Jason is working on a video image. He wants to add a small blur effect in a part of the video, but does not want to damage the v
romanna [79]
<span> Jason can use the filter tool to edit while maintaining the original content of the file.</span>
6 0
3 years ago
Other questions:
  • A small company has a web server in the office that is accessible from the internet. the ip address 192.168.10.15 is assigned to
    5·1 answer
  • The issue with discovering a perfect solution to a problem is that ________.
    10·2 answers
  • Write a function chat accepts a pointer to a C-string as its argument. The function should count the number of vowels appearing
    5·1 answer
  • A highly agitated client paces the unit and states, "I could buy and sell this place." The client’s mood fluctuates from fits of
    15·1 answer
  • What are the two most popular applications of theInternet?
    7·1 answer
  • Mac or PC (need opinions please)<br><br> Why did you choose Mac/PC?
    10·2 answers
  • Write a program that prompts the user for the name of two files each containing a single line that represents a decimal integerc
    11·1 answer
  • Which of the following would not be considered a polymer?
    14·2 answers
  • Where do animators work?
    8·1 answer
  • How will understanding IT help me achieve my goals in life?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!