Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:58:06+00:00 2026-06-15T14:58:06+00:00

This problem concerns a straightforward generalization of the Deutsch problem discussed for functions with

  • 0

This problem concerns a straightforward generalization of the Deutsch problem discussed for functions with more than one bit as input. This time, we have a Boolean function f that takes a 4-bit number as input and outputs 0 or 1, i.e., f:{0,1}4→{0,1}. Thus, an input to f is one of 16 possible 4 bit binary numbers:

0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111.

We are also told that f is one of the following two types:

either f is a constant function, i.e., f(x) is the same for all 16 possible values of the input x, or
f is a balanced function, i.e., f(x) is 0 for exactly 8 of the possible 16 inputs and f(x) is 1 for the remaining 8 of the possible 16 inputs.

we are allowed to do is to use the circuit for f as a “black box” by giving an input x to the circuit for f and observing the output f(x). This is called a “query” operation.

Show that a classical probabilistic algorithm can determine if f is balanced or constant with probability at least 2/3 by using 2 queries.

Hint: (Obviously, we cannot do this using a deterministic algorithm. Unless the deterministic algorithm sees the output for at least 9 input values, there is no way for it to find out if the function is balanced or constant).

Think about picking the two inputs uniformly and randomly from the set of 16 possible inputs. Your final result could depend probabilistically on the result of these two queries.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:58:08+00:00Added an answer on June 15, 2026 at 2:58 pm

    EDIT: I had calculated some of my probabilities wrongly. Also I’ve now mentioned that we need to randomly pick 2 distinct inputs for the function f in order to guarantee that, if f is balanced, then we know the probabilities of seeing the various possible outcomes.

    The fact that the prior probability of the function being constant is not known makes this question harder, because it means we can’t directly calculate the probability of success for any algorithm. We will, however, be able to calculate bounds on this probability.

    I propose the following probabilistic algorithm:

    • Pick two distinct 4-bit values at random, and supply each to the function f.
    • If 0,0 or 1,1 is seen, output “constant” with probability 2/3 and “balanced” with probability 1/3.
    • Otherwise (if 0,1 or 1,0 is seen), always report “balanced”.

    Let’s start by looking at something we can actually calculate: conditional probabilities.

    1. “What is P(correct|constant), namely the probability that our algorithm gives the correct answer given that f is constant?” When f is constant, our algorithm reports the right answer 2/3 of the time.
    2. “What is P(correct|balanced), namely the probability that our algorithm gives the correct answer given that f is balanced?” When f is balanced, the probability of seeing 0,1 or 1,0 is 2*(8/16 * 8/15) = 8/15, in which case the correct answer will definitely be output. In the remaining 7/15 of cases — i.e. those in which 0,0 or 1,1 is seen — the correct answer will be output 1/3 of the time, so the total proportion of correct outputs will be 8/15 * 1 + 7/15 * 1/3 = 31/45 = 2/3 + 1/45 ≈ 0.6889.

    Now suppose that the prior probability of the function being constant is p. Then the probability that the algorithm gives the correct answer is

    pCorrect(p) = p*P(correct|constant) + (1-p)*P(correct|balanced).

    Given that 0 <= p <= 1, pCorrect(p) must be at least min(P(correct|constant), P(correct|balanced)), and at most max(P(correct|constant), P(correct|balanced)). The minimum of 2/3 and 31/45 is 2/3, thus pCorrect is bounded from below at 2/3, for any prior probability of the function being constant. (It might help to think of p as a “mixing lever” that controls how much of each term to include. If p = 0 or p = 1, then we effectively just have P(correct|balanced) or P(correct|constant), respectively, and for any in-between value of p, we will have an in-between total.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem concerns me for a long time. I admit that it is probably
This problem has been bugging me for a long time. For example, the code
This problem has bugged me so many times and i have now decided to
My problem concerns validating/normalising a user's input for the combination of Country and 'City'
it concerns following: I have two projects which should exists more or less independently
I'd like to render a symfony form this way: My problem concerns the radio
This question concerns Oracle Forms 10g. I have a form with two windows. The
So I have a problem...I am separating concerns in my web app: HTML in
This problem also concerns my question regarding the multiple grouping inside the JQGrid using
I have this problem with UISearchDisplayController . I want to use it in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.