Question

In: Computer Science

Updated! Python Code 4. Enhanced transmission method Use the same probabilities ?0 ; ?0; and ?1...

Updated! Python Code

4. Enhanced transmission method

Use the same probabilities ?0 ; ?0; and ?1 as before and consider the following experiment: p0=0.6 ; e0=0.05; e1=0.03

• You create and transmit a one-bit message S as before. In order to improve reliability, the same bit “S” is transmitted three times (S S S) as shown in Figure 2.

• The received bits “R” are not necessarily the same as the transmitted bits “S” due to transmission errors. The three received bits, shown as (R1 R2 R3) in Figure 2 will be equal to one of the following eight triplets: (R1 R2 R3) ={ (000), (001), (010), (100), (011), (101), (110), (111) } When you look at the received triplet (R1 R2 R3) you must decide what was the bit “S” originally transmitted by using voting and the majority rule. Here are some examples of the majority rule.

• For example, if the three received bits are (R1 R2 R3)=(001), then the majority rule will decide that the bit must be a “0”. We denote this as the decoded bit D=0.

• As another example if the three received bits are (R1 R2 R3)=(101), then the majority rule will decode the bit as D=1.

• Another example: If you send S=0 three times, i.e. (S S S) = ( 0 0 0 ) and the received string is (R1 R2 R3) = (000), (001), (010), or (100) then the symbol will be decoded as D=0 and the experiment is a success, otherwise it is a failure.

• Another example: If you transmit S=1 three times, i.e. (S S S) = ( 1 1 1 ) and the received string is (011), (101), (110), or (111) the symbol will be decoded as D=1 and the experiment is a success, otherwise it is a failure.

• This procedure as described above is considered one experiment.

• Repeat the experiment N=100,000 times and count the number of successes.

• Find the probability that the transmitted bit "S" will be received and decoded incorrectly.

• Comment on whether the voting method used in this problem provides any improvement as compared to the method of Problem 1.

• SUBMIT your report in a Word or PDF file. Use the table below for your answer. Note: You will need to replicate the table in your Word file, in order to provide the answer in your report. Points will be taken off if you do not use the table. Probability of error with enhanced transmission Ans. p = ?

Solutions

Expert Solution

Solution ::

We assume independence of bit errors.If I have swapped sucess rate and failure rate just swap return in find_received function.

import random as rd

def find_received(prob, sent):
    random_val = rd.uniform(0, 1)
    if sent == 0:
        return random_val > prob
    else:
        return random_val < prob
    

probability_0 = 0.4
probability_1 = 0.02
probability_2 = 0.03

probabilities = [probability_0, probability_1, probability_2]

count = []
for prob in probabilities:
    counter = 0
    for x in range(100000):
        sent = rd.randint(0, 1)        #Get a value 0 and 1
        received = find_received(prob, sent)      #Get received
        if sent == received:
            counter = counter + 1
            
    count.append(counter)
    
for i in range(len(probabilities)):
    print("For probability %f number of failed transmission are : %d" %(probabilities[i], count[i]))
    print("Estimated probability of failure for %d'th value is: " %i, (count[i] / 100000))
    print("\n")
     Thank you:::

Related Solutions

PLEASE USE PYTHON CODE 7. Use Newton's method to find the polynomial that fits the following...
PLEASE USE PYTHON CODE 7. Use Newton's method to find the polynomial that fits the following points: x = -3, 2, -1, 3, 1 y = 0, 5, -4, 12, 0
making a python code for this: A palindrome is a sequence that reads the same backwards...
making a python code for this: A palindrome is a sequence that reads the same backwards as forwards. Numbers can also be palindromes if we consider their digits as a sequence, for example 12121 and 8228 are palindromes. We can find palindromes from an initial seed number using the reverse and add method: choose a number, reverse its digits and add it to the original. If the sum is not a palindrome (which means, it is not the same number...
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use...
1. Use the Laplace transform to solve the initial value problem. ?"+4?′+3?=1−?(?−2)−?(?−4)+?(?−6), ?(0)=0, ?′(0)=0 2. Use the Laplace transform to solve the initial value problem. ?"+4?=?(?), ?(0)=1, ?′(0)=−1     = { 1, ? < 1 where ?(?) =   {0, ? > 1.
Python 3 Fix the code so if the user enter the same bar code more than...
Python 3 Fix the code so if the user enter the same bar code more than three times, it shows a warning message indicating that the product was already tested 3 times and it reached the limits Code: import tkinter as tk from tkcalendar import DateEntry from openpyxl import load_workbook from tkinter import messagebox from datetime import datetime window = tk.Tk() window.title("daily logs") window.grid_columnconfigure(1, weight=1) window.grid_rowconfigure(1, weight=1) # labels tk.Label(window, text="Bar code").grid(row=0, sticky="W", pady=20, padx=20) tk.Label(window, text="Products failed").grid(row=1, sticky="W", pady=20,...
Python 3 Fix the code so if the user enter the same bar code more than...
Python 3 Fix the code so if the user enter the same bar code more than three times, it shows a warning message indicating that the product was already tested 3 times and it reached the limits Code: import tkinter as tk from tkcalendar import DateEntry from openpyxl import load_workbook from tkinter import messagebox from datetime import datetime window = tk.Tk() window.title("daily logs") window.grid_columnconfigure(1,weight=1) window.grid_rowconfigure(1,weight=1) # labels tk.Label(window, text="Bar code").grid(row=0, sticky="W", pady=20, padx=20) tk.Label(window, text="Products failed").grid(row=1, sticky="W", pady=20, padx=20) tk.Label(window,...
1. Find the probabilities f(0), f(1), f(2), f(3), and f(4) of a binomial distribution. Keep 4...
1. Find the probabilities f(0), f(1), f(2), f(3), and f(4) of a binomial distribution. Keep 4 decimal places in your answer. Use n=4 and p=0.15. 2. Keep 4 decimal places in your answer. About 75% of dog owners buy holiday presents for their dogs. Suppose n=4 dog owners are randomly selected. 2. Find the probability that a. at least one buys their dog holiday presents b. three or more buy their dog holiday presents c. at most three buy their...
Problem 4 ..... you can use Matlab Using the same initial code fragment as in Problem...
Problem 4 ..... you can use Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandstop filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce the below is the Problem 1 initail code .. you can use it Matlab The following cilab code generates a 10-second “chirp”...
Use python programming to write this code and provide a screen short for the code. 2....
Use python programming to write this code and provide a screen short for the code. 2. Write a function that takes one argument (a string) and returns a string consisting of the single character from that string with the largest value. Your function should contain a for loop. You can assume that the input to your function will always be a valid string consisting of at least one character. You can assume that the string will consist only of lower-case...
Python programming 1. Use 0 and 1 only to complete the function that outputs how many...
Python programming 1. Use 0 and 1 only to complete the function that outputs how many N-long sequence are in total. Condition 1) Starts with zero and ends with zero 2) Zero does not exist twice in a row. 3) 1 does not exist three times in a row. 4) N is a natural number. - A sequence that satisfies the conditions. ex) 010, 0110, 01010 - A sequence that does not meet the conditions. ex) 0100, 01110, 01100110 Need...
Write a Python program for the following: A given author will use roughly use the same...
Write a Python program for the following: A given author will use roughly use the same proportion of, say, four-letter words in something she writes this year as she did in whatever she wrote last year. The same holds true for words of any length. BUT, the proportion of four-letter words that Author A consistently uses will very likely be different than the proportion of four-letter words that Author B uses. Theoretically, then, authorship controversies can sometimes be resolved by...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT