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
Trong ửod muốn trình bày dạng cột càn thực hiện lệnh nào
velikii [3]

Answer:

Tác dụng của phím tắt trong Word thì đã quá rõ ràng rồi, nó giúp bạn soạn thảo văn bản, căn chỉnh lề, kích thước, cắt, dán…. nhanh hơn rất nhiều, bạn càng nhớ nhiều phím tắt bao nhiêu thì càng tiện lợi bấy nhiêu.

Explanation:

3 0
2 years ago
1. What runs horizontally and is identified with numbers?
-BARSIC- [3]
Columns runs horizontally and is identified with numbers
4 0
3 years ago
Read 2 more answers
In a word-processing program, what are the easily accessible icons that allow you to print, save and change fonts with a click o
Elan Coil [88]

The answer is A. tool bar

7 0
2 years ago
Note oj cyber security​
dybincka [34]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

                               "cyber security"

cyber security refers to the body of technologies,Processes and practices designed to protect networks,devices,programs and data from attack,damage or unauthorized  access.Cyber security may also be referred to as information technology security.

Importance:

                         Cyber security is important because government financial and medical organization collect process and store unprecedented amounts of data on computer and other devices.A significant portion of that data can be sensitive information,whether that be intellectual property financial data personal information or other type of data for which unauthorized access or exposure could have negative consequences.organizations transmit sensitive data across network and to other devices in the course of doing business,and cyber security describes the discipline dedicated to protecting that information and the systems  use to process or store it.

Challenges of cyber security:

                  For an effective cyber security an organization needs to coordinates its effort throughout its entire information systems.Elements of cyber components all the following:

  • Network security
  • Application security
  • Endpoint security
  • Data security
  • Identity management
  • Database and infrastructure security
  • cloud security
  • Mobile security

Managing cyber security:

            The national cyber security alliance,through recommends a top down  approach to cyber security in which corporate management leads the change in prioritizing cyber security management across all business practices. NCSA advises that companies must be prepaid to response to the inevitable cyber incident restore normal operations,and ensure that company assets and the company reputation are protected.

7 0
3 years ago
While inspecting an element in the DOM on my website using the Chrome Devtools I accidentally deleted the DIV that had all my au
Kobotan [32]

Answer:

Refresh the page, it will reset all the underlying code.

Explanation:

Inspecting an element is essential for web developers in building websites faster and better. The Chrome DevTools is a powerful tool that is integrated into the Chrome browser to assist developers in on-the-go website troubleshooting.

Editing codes in the Chrome DevTools console does not affect the source code of the website hosted on a server, it just provides instant editing functions for troubleshooting or website enhancement.

Therefore, refreshing the page, re-loads the website again from its database which will show the unedited website. In our scenario, after refreshing the page, all the deleted DIV that contains all the authentication will reappear again.

4 0
3 years ago
Other questions:
  • Which connector is most commonly used to connect printers to desktop pc systems?
    10·1 answer
  • Write a program that allows a user to input words at the command line. Your program should stop accepting words when the user en
    10·1 answer
  • A computer is made of up 6 main components: a) CPU (central processing unit)
    7·1 answer
  • How has science fiction influenced technology
    7·2 answers
  • PowerPoint allows you to input files from variety of sources, such as Microsoft access.
    6·1 answer
  • Question 16 of 20
    12·2 answers
  • A firm can survive and succeed in the long run if it successfully develops strategies to confront the _______________ that shape
    9·1 answer
  • I need help picture above
    14·2 answers
  • Which of the following is a key aspect of any IT position? installation of fiber optic cables
    14·2 answers
  • Pls need this asap
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!