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
mamaluj [8]
3 years ago
12

You are hired by a game design company and one of their most popular games is The Journey. The game has a ton of quests, and for

a player to win, the player must finish all the quests. There are a total of N quests in the game. Here is how the game works: the player can arbitrarily pick one of the N quests to start from. Once the player completes a quest, they unlock some other quests. The player can then choose one of the unlocked quests and complete it, and so on.
For instance, let's say that this game had only 4 quests: A, B, C, and D. Let's say that after you complete
• quest A, you unlock quests [B, D). .
• quest B, you unlock quests [C, D).
• quest C, you unlock nothing [ ].
• quest D, you unlock quest [C].
Is this game winnable?
Yes, because of the following scenario:
The player picks quest A to start with. At the end of the quest A, the unlocked list contains [B, D). Say that player chooses to do quest B, then the unlocked list will contain [C, D). Say that player chooses to complete quest C, then the unlocked list will contain quest [D]. Finally, player finishes quest D.
Note that if the player had started with quest C instead of quest A, they would have lost this game, because they wouldn't have unlocked any quest and would be stuck. But the game is still winnable, because there is at least one starting quest which makes the player win. The Journey has N quests, enumerated as {nj, N2, . ng}. We construct a directed graph G for the game, where each node in G represents a quest. If completing quest n; will unlock quest n; then there is a directed edge from n; to n; in the graph. Suppose the total number of edges in the graph is M. (1) We call a quest as a lucky quest if starting from this quest will allow the player to win the game. In the example above, quest A is a lucky quest. Show that (a) All lucky quests are in the same strongly connected component of G, and that (b) Every quest in that component is a lucky quest. [We are expecting a short but rigorous proof for both claims] (2) Suppose there is at least one lucky quest. Give an algorithm that runs in time O(N+M) and finds a lucky quest. You may use any algorithm we have seen in class as subroutine. [We are expecting pseudocode or a description of your algorithm, and a short justification of the runtime]
Computers and Technology
2 answers:
zalisa [80]3 years ago
4 0

Answer:

okay cool brainlest plzzz

Explanation:

Kamila [148]3 years ago
3 0

Answer:

Explanation:

Let's describe the connected part for the very first time.

Component with good connections:-

A semi in any graph 'G' is defined by a way to align element if this can be crossed from the beginning of any link in that pixel or if this can be stated that there is a path across each organized node pair within this subgram.

Consecrated pair means (ni, nj) and (nj, ni) that 2 different pairs would be regarded.

In point a:

We're going to be using contradictions for this segment. They start with the assumption that two lucky journeys are not even in the same strongly interconnected component.

For instance, qi and qj are providing special quests that were not in the very strongly linked element and which implies that, if we start to cross from qi or qi, then qj cannot be approached if we begin to move through qj and as we established if qi or qj is fortunate contests, we may reach any other hunts. Which implies qj from qi or conversely should be reachable. Or we might claim that qi is part of the strongly linked portion of qj or vice versa with this situation.

Consequently, we would not be capable of forming part of a different and strongly linked element for two successful scientists; they must have the same strongly related to the element.

In point b:

Its definition of its strong, line segment indicates that all other searches within such a strongly coordinate system can be made possible from any quest. Because if all quests are accessible from any quest then a lucky search is named, and all other quests can be accessed from any quest in a very coordinated system. So, all contests are fortunate contests in a strongly connected element.

Algorithm:

Build 'n' size range named 'visited' wherein 'n' is the number of graphic nodes that keep records of nodes already frequented.  Running DFS out of every unknown vertex or mark all edges as seen.  The lucky search will be the last unexplored peak.

Psuedo-Code:

Requires this functionality to also be called Solution, it requires 2 reasons as an input, V is a set of objects in graph 'G' and 'G' is a chart itself.

Solution(V, G):

visited[V] = {false}//assign value

for v: 0 to 'V'-1:  //using for loop

if not visited[v]:  //use if block

DFS(v, visited, V, G)  //use DFS method

ans = v //holding value

return ans //return value

You might be interested in
A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
Allisa [31]

Answer:

any of the above

Explanation:

A collection of facts can be copyrighted, but only if the collection is <u>any if the above  </u>in a way that causes the resulting work to rise to the level of an original work.

3 0
3 years ago
Identify a stressor in your life. Conduct an internet search to locate at least two reliable sources of information on effective
Gre4nikov [31]

Answer:

The biggest stressor in my life is certainly accountancy. I need to divide my earning among my family members, however, I had to work as well. and hence, I wanted to cover this automatically. I decided to surf the internet. I realized I need to first find the keyword. And I found it as budgeting and the monthly income. I got all my answers. The source explained to be how I can transfer a part of my income to each of my family members, and also to grocery sites like Amazon, the daily service provider who provide various home servants, for electricity bills, yearly water tax, house tax, and all my expenses. And now I can relax and work, as with one click, I can now pay all my bills, as well as I can order for instant food deliveries, call plumbers, electricians, etc any time and everything I can think of. I have no headache now, and I can devote all of my hours to work. And that has also increased my income since I went automatic.

Explanation:

Thus, we need to first find the keyword, and then find the best site from the list that appears. And then we need to research through that site and find the solution.We can make use of the search engine commands as well.

4 0
3 years ago
A standard for compressing music into computer files that can be easily exchanged on the Internet is called a(n) ______. A. musi
Sophie [7]

Answer:

The correct answer is E. MP3

Explanation:

MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio. MP3 as a file format commonly designates files containing an elementary stream of MPEG-1 audio and video encoded data, without other complexities of the MP3 standard. The MP3 format makes it possible to compress a song into a file small enough to be uploaded, downloaded, emailed, and stored on a hard drive.

4 0
3 years ago
When you are almost done with your soup and want to get at the last little bit, how should you do this 2
pav-90 [236]

Answer:

<u>B. Tip the bowl slightly, then spoon up the last bit</u>

Explanation:

Generally speaking none of the other answers made much of sense.. "tip the bowl from side to side" doesn't help you at all, neither does "Keep spooning as much as you can, then stop eating". Neither of these will help you spoon up the last little bit, <u>the most logical answer is B. "Tip the bowl slightly, then spoon up the last bit"</u>. If this is not the correct answer then it'd be D, but I don't believe/feel that it's "poor etiquette" to "leave the last little bit".

7 0
2 years ago
How many times is the body of the loop executed?
Flura [38]

Answer:

The loop will run 5 times.

3 0
2 years ago
Other questions:
  • Motorcycles have two or three wheels, a seat for the rider and at least a ____ horse-powered engine.
    15·1 answer
  • What tasks do most operating systems perform?
    15·1 answer
  • Is USA TestPrep a test-taking site that won't let you access other windows without kicking you off?
    13·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • What is required to contain warnings, after several studies that have shown that they are a suffocation risk?
    15·2 answers
  • You wouldn't think a simple shop like Dippy Donuts would be an interesting target for hackers. But look beyond the donuts and yo
    7·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • Write a program that outputs a subtraction practice problem for a student, outputting the larger random number
    12·1 answer
  • Give an example where traditional laws and modern media have created "grey areas".
    6·1 answer
  • Software is in -----language​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!