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
1. Write a python code that uses the Runge Kutta Method method to approximate the solutions...
1. Write a python code that uses the Runge Kutta Method method to approximate the solutions to each of the following initial-value problems and compare/plot the results to the actual values. a) y′=te^(3t) − 2y, 0 < t < 1, y(0) = 0 with h = 0.5; actual solution y(t)=1/5te^(3t) − 1/25e^(3t) + 1/25e^(−2t). - Use the Runge Kutta method to approximate/plot the solutions to each of the following initial-value b) ?′=1+(?−?)2,2<?<3,?(2)=1y′=1+(t−y)2,2 c) ?′=1+??,1<?<1,?(1)=2y′=1+yt,1
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.
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...
write a code in python for evolutionary search method for multivarible
write a code in python for evolutionary search method for multivarible
PLEASE USE PYTHON CODE 7. determine the two roots of sinx+3cosx-2 =0 that lie in the...
PLEASE USE PYTHON CODE 7. determine the two roots of sinx+3cosx-2 =0 that lie in the interval (-2,2). use the Newton- Raphson method and solve by the secant formula
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...
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,...
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”...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT