subject

The size of a comparison network is the number of comparators, and the depth is the number of levels of comparators. For example, in the Wikipedia article, the initial sorting network for four inputs has size five and depth three. Notice that the first two comparators can execute simultaneously, so they are actually at the same level. The parallel bubble sort network for six inputs has size fifteen and depth nine. In general, a parallel bubble sort network for n inputs has size n(n − 1)/2 and depth 2n − 3. A minmax network inputs a list of size n and outputs a list of size n with the smallest value at the beginning of the list the largest value at the end of the list. For example if the input is the list of size n = 8

(40,80, 30, 60, 10, 70,20,50).

The output would be (10, ?, ?, ?, ?, ?, ?,80).

1. Let n be a power of 2.

a. Show how to construct an efficient minmax network with n inputs. Primarily minimize the depth and secondarily minimize the size. Just describe the network; do not justify.
b. What is the (exact) size of your network?
c. What is the (exact) depth of your network?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
You know the right answer?
The size of a comparison network is the number of comparators, and the depth is the number of levels...
Questions
question
Social Studies, 07.10.2021 07:30
question
Computers and Technology, 07.10.2021 07:40
question
Mathematics, 07.10.2021 07:40