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

  • SEARCH
  • Home
  • 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 6344829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:42:58+00:00 2026-05-24T20:42:58+00:00

So I have the following homework, but I don’t understand exactly what the process

  • 0

So I have the following homework, but I don’t understand exactly what the process is. Has anyone seen this question before or actually understands what the logic should be? I don’t want code, I know how to program, but I don’t exactly know what to do here.

Consider a wire across which data is transmitted bit-by-bit. Occasionally, a bit or a group of
consecutive bits is transmitted incorrectly. If the previous bit was transmitted correctly, the
probability that the current bit is transmitted incorrectly is 0.1. If the previous bit was
transmitted incorrectly, the probability that the current bit is also transmitted incorrectly
is 0.3. Write a program called BitError.java that simulates the transmission of one million
bits and prints out the percentage of bits transmitted incorrectly.
(Hint: According to theory, the expected answer is 12.5%.)

  • 1 1 Answer
  • 3 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-05-24T20:42:59+00:00Added an answer on May 24, 2026 at 8:42 pm

    You test for the probability of an event happening as follows

    1. Generate a uniform random number between 0 and 1
    2. If the number generated is less than the prob an event happening then the event happend

    Your code should look something like this

    // Generate random bit either a 0 or a 1
    int bit = RandInt(0,1)
    
    // Assume first bit was correct
    bool bPreviousWasCorrect = false;
    
    Loop 1 million times
        double probBitIsCorrect = RandUnif(0,1) // get a random number between 0 and 1
        if bPreviousWasWrong then
            // if an error has occured then a 2nd error occurs with prob 0.3
            if (probBitIsCorrect < 0.3)  then
               Set bPreviousWasWrong to true
               increment number of wrong bits
            else
               Set bPreviousWasWrong to false
               increment number of correct bits
            end if
        else
            if (probBitIsCorrect < 0.1)  then
               Set bPreviousWasWrong to true
               increment number of wrong bits
            else
               Set bPreviousWasWrong to false
               increment number of correct bits
            end if
    
    Display results when done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following homework question: Consider the following declarations and answer the question.
Questions similar to this have been asked before on SO, but they're not quite
I have a linked list question that stems from this homework prompt I am
Okay - yes, this is homework, but it isn't mine. I have a friend
I have following question on adobe omniture How we can register an iPhone app
I would like to solve the following problem using constraints but i actually don't
I have this homework problem where I need to use regex to remove every
I have homework i cant figure out. I know c++ but i am not
For a homework assignment in linear algebra, I have solved the following equation using
This is a homework, and we don't learn the structs in C# (and I

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.