Hey jgonzalf.
Can you show us the simulation code as well as the probabilities that you have worked out?
Hello,
This problem has arosen in my work and I need help to solve it, because my calculations do not match with the simulation I made in Matlab.
Imagine a generator A of blocks of numbers {0,1,2} separated by spaces {-} with block lenght between m and M. These blocks are received by a box B that process them in this way:
- If the blocks start by 0 and end by 1, the block remains as it was.
- Else, the blocks are trimmed in both ways until it starts by 0 and ends by 1. The trimmed part are substituted by spaces.
- If after the trimming the block is shorter than m, or it's not possible to achieve the structure 0..1, B only sends spaces.
Example: (m=3)
A generates: ----00101011200-, and B transforms into: ----00101011----
A generates: --1112100020102-, and B transforms into: -------000201---
A generates: --1111210122111-, and B transforms into: ---------------- (-01- can be achieved but its length is 2<m)
Question:
P= P(B generates '1' | A generates '1'), (Probability of B generates a '1' conditioned to A has generated a '1')
I think it's better to work with Q = 1-P = 1-P(B generates a space | A generates '1')
Hi Chiro,
I am afraid is too long and I reduced part of the problem to be easy to analyze here. My previous analysis is:
- I think there are different probabilities to produce different types of blocks. Let's say:
-> P1: probability of block is sent as it was. Ex: ---0201- -> ---0201-
-> P2: probability of block is trimmed by left: Ex: -11102001-- -> ----02001--
-> P3: probability of block is trimmed by right: Ex: -0002210000- -> -000221-----
-> P4: probability of block is trimmed by both sides. Ex: -111202221222-- -> -----02221-----
-> P5: probability of block can't be transformed and B sends spaces: ---11112--- -> -----------
P1+P2+P3+P4+P5=1
So, P= P(B generates '1' | A generates '1') = sum_{i} P(B generates '1' | A generates '1' and B in block type i)*P(Block type i | A generates '1')
but it's not easy to calculate.