Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Show that the majority function with n inputs can be computed by a branching program that hasO(n2)nodes.

Short Answer

Expert verified

To solve the above problem, we need to understand the definition of Branching program i.e., “ a directed acyclic graph where labels of all the nodes are maintained by the variables, except for two output nodes labelled 1 or 0.

Step by step solution

01

Definition of Majority function

In Boolean logic, the majority function is the Boolean function that evaluates to false when half or more argument are false &true otherwise. i.e., the value of the function equals the value of the majority of inputs

The function majority majorityn:0,1n0,1, that is defined as:

MAJx1,x2,z,xn=1,ifi=1nxin2=0,otherwise

02

Looking into the definition of Branching Program

A finite directed acyclic graph with one source node & sink nodes partitioned into two sets, Accept & Reject is called as a Branching Program on the variable set X=x1xn. Each non-sink node is labelled by a variablexi & has 2 outgoing edges labelled 0 & 1 respectively.

An inputx0,1n is accepted if & only if it induces a chain of transitions that lead the start node to a node in Accept.

03

Solving the problem using the above explanations

Let us take the number of inputs as n. A circuit can be used to implement a bubble sort.

The inputs can be called as x1,x2and the outputs can be called as y1,y2. This circuit contains a size of two.

Now, the action of Bubble-sort algorithm can be mimicked on an array.

A pass can be implemented as the serial concatenation of steps for each of k=1,2,,n-1, which has a size n-1*2.

A bubble sort can be Proceeded to implement as the serial concatenation of n passes.

Therefore, this gives a sizenn-1*2=On2.

Here, AND gates and OR gates are used to construct Branching Program.

Hence, it can be said that the majority function with n inputs can be computed by a branching program that hasOn2 nodes.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free