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
Julli [10]
3 years ago
15

Suppose that instead of swapping element A[i] with a random element from the subarray A[i..n], we swapped it with a random eleme

nt from anywhere in the array: PERMUTE-WITH-ALL (A) 1, n = A.length 2, for i = 1 to n 3, swap A[i] with A[RANDOM(1, n)] Does this code produce a uniform random permutation? Why or why not?
Computers and Technology
1 answer:
Anastaziya [24]3 years ago
7 0

Answer:

The answer to this question can be defined as follows:

Explanation:

Its Permute-with-all method, which doesn't result in a consistent randomized permutation. It takes into account this same permutation, which occurs while n=3. There's many 3 of each other, when the random calls, with each one of three different values returned and so, the value is=  27. Allow-with-all trying to call possible outcomes as of 3! = 6  

Permutations, when a random initial permutation has been made, there will now be any possible combination 1/6 times, that is an integer number m times, where each permutation will have to occur m/27= 1/6. this condition is not fulfilled by the Integer m.

Yes, if you've got the permutation of < 1,2,3 > as well as how to find out design, in which often get the following with permute-with-all  chances, which can be defined as follows:

\bold{PERMUTATION \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \                           PROBABILITY}

\bold{  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 4/27= 0.14 }\\\bold{ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5/27=0.18}\\

\bold{            \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  \ \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \               5/27=0.18}\\\bold{\ \ \ \ \  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \                       5/27=0.18}

\bold{    \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \                                                  4/27=0.14}

Although these ADD to 1 none are equal to 1/6.

You might be interested in
If an ______ is caught dumping hazardous materials, that person can be prosecuted. Answer choices A) Employee B) Employer C) Bot
Citrus2011 [14]

Answer:

Both A and B

Explanation:

I think it is right

hope this helps :)

5 0
2 years ago
IF ANYONE ANSWERS YOUR QUESTION WITH SOMETHING LIKE THIS:
vova2212 [387]

Answer:Thank you very much! A user names SShalomeea has been hacking today. Anyone with that photo is a spammer.

4 0
3 years ago
Read 2 more answers
QUICKLY PLEASE!!!
Elza [17]

Answer: As the conventional etiquette, which lays out rules of ethics in social contexts, the purpose of netiquette is to help create and sustain a friendly, relaxed and productive atmosphere for online contact, as well as to avoid putting pressure on the system and creating tension between users.

Explanation:

7 0
3 years ago
Is the address 7b invalid regarding cell references?
Lubov Fominskaja [6]

Answer:

It is not valid

Explanation:

I'll assume the question relates to cell referencing in Microsoft Excel.

To reference a cell in Excel, we make use of the following steps:

  • Write out the cell column name first
  • Followed by the row number

7b implies that, the row number first, followed by the column name; this doesn't follow the naming convention of cells.

Hence, 7b is invalid.

3 0
3 years ago
Which command suppresses the visibility of a particular row or column in a worksheet?
Gwar [14]

Answer:

Hide command suppresses the visibility of a particular row or column in a worksheet

Explanation:

Hide command is used to hide the row or column in an excel worksheet. To suppress the visibility of a particular row or column in a worksheet, you have to select that particular row or column and then right-click on column or row header. A popup screen will appear as like when you refresh the computer. Then on this screen, at the bottom, you will find the hide command, click the hide command. And, as you click the hide command that particular row or column will become invisible. if you want to show it again, click the Unhide command. Therefore, hide command suppresses the visibility of a particular row or column.

Why other options are not correct

Autofit

Autofit command is used when you want that a particular cell of row or column to automatically adjust / or accommodate the content. Autofit command does not affect the visibility of a row or column.

Insert

Insert command is used to insert contents in a particular worksheet. Insert command is based on groups of various commands such as inserting tables, charts, graphs, text, symbols, add-ins, sparklines, and links.

Replace

Replace command is used in excel to replace the text with some other text. If you want to replace some text with some other text, then you have to use the replace command.

8 0
3 years ago
Other questions:
  • The code int *p; declares p to be a(n) ____ variable. new
    8·1 answer
  • Prove each statement using a proof by exhaustion. For every integer n such that 0 lessthanorequalto n &lt; 3, (n + 1)^2 &gt; n^3
    9·1 answer
  • Describe and compare imperative (C), functional (SML) and logic (Prolog) programming paradigms.
    9·1 answer
  • Which rotation speed is not a typical spindle rotation speed for magnetic hard drives?3100; 5400; 7200; 10000
    8·1 answer
  • How many points do I need to be able to message people
    9·2 answers
  • Computer privacy typically occurs when which of the following is violated?
    6·1 answer
  • The words that follow a code number in the cpt manual are called the
    12·1 answer
  • SNMP is a protocol used to query hosts, servers, and devices about performance or health status data. This protocol has long bee
    7·1 answer
  • Answer this question for points lol
    7·2 answers
  • Fill in the Blank
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!