Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [probability-theory]

Questions about the branch of mathematics concerned with modelling and analysing random phenomena.

1
vote
1answer
12 views

Confusion About Min-Cut Probabilities

Currently going through a video on Counting Minimum Cuts by Tim Roughgarden. $(A_{i},B_{i}) = \big((A_{1},B_{1}), ..., (A_{t},B_{t})\big) \forall i \in \Bbb{R}$ $P\big((A_{i},B_{i})\big) \geq \frac{1}{...
0
votes
0answers
67 views

squared euclidean distance high probability bound

I guys, i wish show squared euclidean distance between x and y (they are 2 point uniformly at random in $[-1,1]^d$ ) is at least $(1-\epsilon)cd $ with probability $e^{\Theta \epsilon^2d}$ with $c&...
3
votes
1answer
90 views

expected pairwise square euclidean distance between points

How can I show that the expected pairwise square euclidean distance between points in $X$ is $Θ(d)$? Where $X$ is a $(x_1,...x_n)$ of points generated uniformly at random in the unit, d is d-...
0
votes
0answers
10 views

Is there any formula to find the exact number of optimal codes for a distribution of probability, where 2 signals or more have the same probability?

for example, An alphabet whose 4 letters appear with these probabilities: p1 = p2 = 0.3, p4 = p3 = 0.2. Is there a way to compute the number of optimal codes?
1
vote
1answer
12 views

How many prefix code we can find for a given distribution of probability?

A source emits 5 signals s1, s2, s3, s4 and s5 whose probabilities are as follows: 1/3, 1/3, 1/9, 1/9, 1/9, 1/9. How many prefix codes we can construct on A={a, b, c}? And how many are there with the ...
1
vote
1answer
22 views

Is the bitwise-xor of a Uniform bit string and a non_uniform bit string Uniform?

Having two bit strings $x,y \in \left\{0,1\right\}^n$, where $x$ is selected following a uniform distribution but $y$ is not. Is $z = x \oplus y$ uniform?
3
votes
1answer
13 views

Variance of MAXSAT clause satisfiability

For a given MAXSAT problem, it is trivially easy to compute the mean number of clauses satisfied for all assignments, or equivalently the expected number of clauses satisfied by a random assignment. ...
0
votes
1answer
19 views

What is the relation between the quantity of information of $A_i$ and $A$, where $A=\bigcup_iA_i$?

Let $A$ be an event divided into 4 events $A_i$ with the same probability. Why does the quantity of information of $A_i$ satisfy $$ I(A_i) = I(A) + \log (4)?$$
3
votes
2answers
78 views

Uniform sampling over non-standard simplex

Uniform sampling over a $n$-dimensional standard simplex is described here: Uniform sampling from a simplex I want to sample one point from a non-standard simplex with vertices at: $s_{i}\vec{e_{i}}$...
1
vote
1answer
97 views

Given a rng that outputs 0 or 1 with an equal probability, make a rng that generates 1 with a probability p

So this was an interview question I had a few weeks back that I just haven't been able to think of how to solve... Given a random number generator that returns 0 or 1 with a 50% chance of either, ...
1
vote
1answer
39 views

Maximizing entropy under constraint

How do I prove that entropy is maximal for $P(A_2) = \cdots = P(A_n) = (1-a) /(n-1)$ while $P(A_1) = a$ (a fixed number) and $A_1,…, A_n$ is a partition of the sample space?
4
votes
1answer
40 views

Probability of randomly designated subsets cover the universe

Let $U=\{1,2,\ldots,n\}$ and $S \subseteq \mathscr{P}(U)$. Let $T$ be a subset of $S$, randomly constructed selecting independently each element of $S$ with probability $p$. Is there a polynomial ...
0
votes
0answers
26 views

Correcting symbols using variable RaptorQ correction symbols

If I got k symbols and m correction symbols I can only recover the k symbols when I received a total of k number of m+k symbols. I want to create a system that always generate m = k/2 correction ...
1
vote
2answers
82 views

challenge: Closing hash, linear probing, probe length 1

The challenge says that there is a hash algorithm with a bug, the bug is given if it reaches the end of the array and did not find space to save the element, it discards it directly (that is, it does ...
5
votes
1answer
104 views

Is it possible to simulate a fair coin with a finite number of tossing of a biased one?

It is a classic problem to simulate a fair coin with a biased one. According to Fair Coin (wiki), John von Neumann gave the following procedure: Toss the coin twice. If the results ...
1
vote
2answers
76 views

How to determine seed collision probability in a PRNG?

I want to use a PRNG to generate random patterns. I would provide the PRNG with a hash value as a seed. Ideally, the seed size would be 64-bit or 128-bit and I would expect no collisions if the seeds ...
1
vote
2answers
37 views

Probability that a random graph will remain planar after adding an edge

According to this answer, a random graph on $n$ vertices is a graph which has each of the $n\choose2$ edges independently with probability $1/2$ each. The probability of at most $3n-6$ edges (which is ...
4
votes
2answers
55 views

Fast sampling from discrete space

Assume we are given a set $X = \{x_1,...,x_n \}$ of size $n$, and a probability distribution $P$ over $X$. I am interested in an algorithm $A$ which can sample from $X$ according to $P$, i.e. $\Pr(A=...
1
vote
1answer
41 views

number of random sets needed to generate subset

Let $A\subseteq \{1\ldots n\}$ with $|A|=\alpha n, 0<\alpha\leq1$. Now we start generating random sets $B_i \subseteq \{1\ldots n\}$ with $|B_i|=\beta n$ where $0<\beta\leq\alpha$. How many $...
1
vote
0answers
32 views

distinguishing two biased coins

I had a simple probability question: suppose we have two coins, coin 1 is heads with probability $= 10\epsilon$ and coin 2 is heads with probability $=\epsilon/10$. Given an unknown coin, how many ...
2
votes
1answer
28 views

What is the average size of a jump in a binary tree?

Assume that a full binary tree is layed out in memory recursively in the following way. First the Root followed by Tree representation of left subtree followed by tree representation of right subtree. ...
1
vote
1answer
32 views

Question on word probability for hierarchical softmax used in natural language processing

I am reading the following paper: https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf On page 4 of the paper they describe the ...
1
vote
1answer
47 views

Connection between probabilistic algorithm and distributional algorithm

A basic question about the connection between two notions. I am sure these are known notions in CS but I struggle with the basics: First Definition: A probabilistic algorithm $A(n)$ decides $L$ if for ...
1
vote
1answer
22 views

Probabilisitc timed automaton

I am kind of new to timed automaton domain. I am trying to understand in which way they are different to Markov Decision Process. First I know there objectives is to solve the non-determinism of a MDP....
0
votes
0answers
16 views

Conditional probability in Bayesian network

I have the following Bayesian network: I want to state that P(S|B) = 1 - P(!S|B) In the solution they use "P(S|B) = P(S|B,F) + P(S|B,!F)", which I understand but I don't understand why can't I use ...
0
votes
0answers
24 views

Optimality of Bayes Classifier

I know this question has been asked a few times but I find it hard to understand the solutions. Say, here (For example, I don't understand why the true error is defined in that answer the way it is.) ...
1
vote
1answer
38 views

Uniform sampling with constraints

Suppose one wants to uniformly sample a string $w$ of a given length over a finite alphabet, such $w$ satisfies a set of structural constraints (such as - "the third character has to be equal to the ...
0
votes
0answers
12 views

Relevance of Pure ALOHA for small network load G?

The theoretic performance of Pure ALOHA networks is a vastly studied topic and references can easily be found , e.g. on https://en.wikipedia.org/wiki/ALOHAnet#cite_note-tann-14 Using a Poisson ...
2
votes
1answer
22 views

Random award question

I'm assisting with the design of an algorithm over the next week to fit the following use case: A person walking in a store has a tablet and approaches possible customers to notify them of a ...
0
votes
0answers
83 views

Proving a hash function family is weakly universal

$H$ is a family of weakly universal hash functions if for two elements $x,y$: $$ P(h(x) = h(y)) \le \frac1m, $$ where $m$ is the size of the domain, and $h$ is chosen at random from $H$. ...
1
vote
1answer
18 views

Upper bound derivation of expected time for finding a large cut

Given an undirected graph $G$ with $n$ vertices and $m$ edges, we build a cut as following. Initially sets (of vertices) $A$ and $B$ are empty. For each vertex $v$ we flip a fair coin and according to ...
2
votes
1answer
70 views

Average-case analysis of linear search given that the desired element appears $k$ times

The problem below is adapted from CLRS Problem 5-2 "Searching an unsorted array": Consider a deterministic linear search algorithm which searches an array $A$ for $x$ in order, say $A[1], A[2], \...
0
votes
1answer
26 views

Markov Model to compute the probaility on the $n^{th}$ day

This is a question about Markov Models. Let's say we have the following situation Let's say that we want to find the probability that $2$ rainy days follow a nice day. You'd simply have $0.25 \cdot ...
2
votes
1answer
51 views

Avoiding correlated values and reduced collision resistance in multiple hash states

I need to design a hash function that fits this criteria: Limited to 32-bit integer operations (for compatibility with JavaScript bitwise operations, my target system) Produces an n-bit hash digest, ...
0
votes
1answer
17 views

Relation between size of hashtable and number of values to keep expected number of collisions below/equal to 1

This is an exam question from my algorithms and data structures course. You imagine an hash function with h: U->{0,..m} (this is from the original question, but i think m-1 would be correct) and n ...
2
votes
2answers
52 views

Why does the distribution of pseudorandom numbers change when operating like this?

We were introduced to the standard C rand() function, and how to use it. At some point during the class we were asked how to roll a die. The simple answer was to ...
0
votes
0answers
14 views

Presentation topic for computational solutions to problems involving probability

I'm looking for interesting applications of computing science for finding the probability of otherwise difficult problems. This is for an undergraduate level presentation in a probability course of ...
-1
votes
1answer
95 views

Applying a Chernoff bound with Only an Upper Bound of the Expectation

First, I am aware at least one or two similar questions have already been asked on stack exchange, but I've gone through the answers they got and didn't find one that was satisfactory for my case. The ...
0
votes
1answer
162 views

ALOHA - Throughput and probabilities

I have a few questions regarding slotted-ALOHA. Assume a network have 25 users and transmission request probability = 0.25. 1) What is the throughput and what is the probability that a user will ...
5
votes
1answer
434 views

Reservoir sampling algorithm probability

I'm reading about the reservoir sampling technique called Algorithm R. The idea is we can take a sample of size $n$ from a population of size $N$ even when $N$ is unknown/too expensive to retrieve in ...
0
votes
1answer
89 views

Trying to understand CLRS bucket sort analysis

I'm trying to understand the analysis of bucket sort in CLRS. Specifically, equation 8.2 that states: $$ E[{n_i^2}] = 2 - \frac{1}{n} $$ To prove, CLRS: Random variable denoting number of elements ...
0
votes
1answer
93 views

Expected number of vertices with degree 2

A simple graph with $n$ vertices is constructed by randomly and independently placing an edge between every two vertices with probability $p$. What is the expected number of nodes with degree two? I ...
2
votes
1answer
79 views

Viterbi Algorithm: initial state with ONE probability

The Viterbi Algorithm can be used to calculate the most likely path, based on observations in a Hidden Markov Model. Using the same notations as Wikipedia, "each element ...
1
vote
1answer
192 views

Probability of k-clique in a random graph

I need to find the order of the minimum k = k(n) such that the probability of having at least 1 k-clique in a random graph $G(n, \frac{1}{2}$) is $\mathcal{O}(\frac{1}{n})$. $X_k$ is the random ...
2
votes
2answers
272 views

how to bound the probability that quicksort takes greater than n lg n time?

I am working on exercise 12.4-5 of CLRS (Cormen et al, Intro to Algorithms 3rd ed) Consider RANDOMIZED-QUICKSORT operating on a sequence of n distinct input numbers. Prove that for any constant k > ...
2
votes
1answer
133 views

How to estimate how many assignments satisfy a given DNF formula using Monte Carlo?

Admittedly, homework. For the purpose of this question: $\phi$ is a DNF formula similar to this one: $(x_1 \wedge \neg x_3 \wedge x_4) \vee (\neg x_1 \wedge x_2)$ Also $C_i$ is a clause in this ...
6
votes
1answer
2k views

Why are forks in the Blockchain eventually resolved?

I'm reading Wattenhofer's The Science of the Blockchain. On page 87, he states the following thoerem: Theorem 7.22. Forks are eventually resolved and all nodes eventually agree on which is the ...
3
votes
1answer
27 views

Polynomial Computation of the probability of a number of independent events

Suppose to have $n$ independent events $E_1, E_2,..., E_n$, where the probability of occurrence of event $E_i$ is $p_i$ (i.e., each event has its own probability of occurrence). We can easily define ...
2
votes
0answers
133 views

How do I do a biased shuffling of a deck of cards?

I currently have a deck of cards (in fact this deck is an array of sorted elements in descending order as indicated by the picture above), that I want to shuffle. However, the caveat is that I want ...
0
votes
0answers
35 views

Pathological input for a completely random hash function

I have a hash function $h$ (assume it's completely random, an element of a Universal family) which maps integers into one of $k=10$ groups. Now I'm looking for an input sequence of length $m$ for $h$ ...