Define the function majorityn : {0,1}n {0,1} as Thus, the majorityn function returns the majority vote

Question:

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: