def prob_zipf_distrib(q, t, m, alpha):
    """
    Probability that a block pattern of q + t blocks contains another block
    pattern of q blocks, assuming that all blocks are i.i.d. according to a
    zipf distribution with decay parameter alpha. Parameter m represents the
    total number of blocks.
    """
    #prob_same_block = (harmonic_number(m, 2*alpha)
    #                   / (harmonic_number(m, alpha) ** 2))
    # The following would be the distribution if the distribution were uniform
    # rather than the zipf distribution.
    #prob_same_block = float(1)/m
    prob_same_block = float(1)/m
    prob_single_block_no_match = (1 - prob_same_block) ** (q + t)
    prob_block_pattern_match = (1 - prob_single_block_no_match) ** q
    return prob_block_pattern_match