Question: Define the function majorityn : {0,1}n {0,1} as Thus, the majorityn function returns the majority vote of the inputs. Show that majorityn can be

Define the function majorityn : {0,1}n → {0,1} as

 Jo Eai < n/2; 1 ri 2 n/2. majority , (σι, . . , αn)


Thus, the majorityn function returns the majority vote of the inputs. Show that majorityn can be computed with:

a. O(n2) size circuits.

b. O(n log n) size circuits. Recursively divide the number of inputs in half and use the result of Problem 9.23.


Problem 9.23.

Recall that you may consider circuits that output strings over {0,1} by designating several output gates. Let addn : {0,1}2n → {0,1}n+1 take two n bit binary integers and produce the n+1 bit sum. Show that you can compute the addn function with O(n) size circuits.

Jo Eai < n/2; 1 ri 2 n/2. majority , (, . . , n)

Step by Step Solution

3.24 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution a To compute the majorityn function with On2 size circuits we can simply comp... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction theory computation Questions!