## co.combinatorics – Concentration results for the number of non-empty bins throwing balls \$ n \$ into bins \$ n \$

We throw $$n$$ balls evenly at random in $$n$$ bins. What is the easiest way to calculate the probability that at least $$year$$ the bins are not empty, where $$a in left (0, left (1- frac {1} {e} right) n right)$$? Is it possible to avoid the use of any concentration inequality limit (for example, Chernoff limits, Hoeffding inequality, Bernstein inequalities, etc.)?

## Question of probability of single balls in bins

I found the question I ask here (balls in the bins, probability that exactly two bins are empty) and here (probability that exactly k bins are empty, given m balls and n bins?), However I do not not really understand the answers (especially the Sterling number), so I'm asking too. What is the probability that after throwing m balls in n squares, where the throws are independent, exactly 2 (or k) squares are empty?

I thought it would be

(n choose k) * (n-k / n) ^ m

If it is wrong, why? And what would be the solution?

## pci dss – Is it allowed to store 8-digit BINs outside of CDE

If i store 8-digit BIN and PAN truncated (6/4) separately apart from my CDE, do I remain PCI compliant?

Truncated PANs are no more than the first 6 and last 4 digits of PAN, in accordance with section 3.4 of the standard, but it only says:

The intention of truncation is to permanently delete a segment of PAN data so that only part of the PAN is stored.

from which i don't know if it is still ok to have the first 8 digits separately, for other purposes, say, to maintain a mapping of the BIN to the bank name.

Current standard: https://www.pcisecuritystandards.org/documents/PCI_DSS_v3-2-1.pdf

I checked the related questions and answers, none of which mention 8 digits:

## sharepoint online – PowerShell empty OneDrive business recycling bins

The. I was only after researching several methods, none of which worked because apparently the `tenant-my.sharepoint.com/personal` is not a managed location of SPO Management Shell. Is there another way to delete bulk files from a OneDrive? The online interface can only process 200 files at a time, and there are around 30 processing periods per request. I'm sure there must be a better way, maybe from PowerShell. All ideas are appreciated! Thanks in advance!

## Backpack Problems – N Placement Algorithms Weighted Balls in M ​​Uniform Bins While Looking for a Balanced Weight?

Suppose that there is $$N$$ weighted balls and $$M$$ equal weight, it is guaranteed that at least one placement exists for all balls to be placed in lockers.

What is the right algorithm for getting a well-balanced investment where each trap has almost equal ball weights?

I know that if the bins have different weights, the problem is NP-hard; Not sure that a simplified question can be resolved in linear time.

I would appreciate any references where I could find papers dealing with complexity and related solutions. Thank you!

## probability or statistics – How to optimize the number of bins with weighted data using multiple lists

I try to sort items from multiple lists into buckets containing weighted data. I can do the single list case based on a previous question. Specifically, the code under Update in the first response.

``````data = {1, 2, 3, 4, 5, 6, 7, 10};
trays = {0, 2, 4, 6, 8, 10};
weight = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 1.0};

With[{ranges = Partition[bins, 2, 1]}
Total @ Pick[weights,
BitXor[UnitStep[Subtract[data, #1]],
UnitStep[Subtract[data, #2]]], 1]& @@@ ranges]
``````

which gives the following output:
{0,1, 0,5, 0.9, 1.3, 0}

Now I'm trying to generalize at the next entry:

``````data = {{1, 2, 3, 4, 5, 6, 7, 10}, {3, 5, 6}};
trays = {0, 2, 4, 6, 8, 10};
weight = {{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 1.0}, {0.4, 0.6, 0.5} };
``````

I can not use the same code because Pick does not process each list sequentially. However, I can get the desired result using this code (where I have the first and second list separately:

``````With[{ranges = Partition[bins, 2, 1]}
Total @ Pick[weights[[1]],
BITXOR[UnitStep[Subtract[data, #1]],
UnitStep[Subtract[data, #2]]][[1]], 1]& @@@ ranges]With[{ranges = Partition[bins, 2, 1]}
Total @ Pick[weights[[2]],
BITXOR[UnitStep[Subtract[data, #1]],
UnitStep[Subtract[data, #2]]][[2]], 1]& @@@ ranges]
``````

{0,1, 0,5, 0.9, 1.3, 0}
{0, 0.4, 0.6, 0.5, 0}

But I want to generalize to a lot of lists now.
I've tried a loop but when I generalize it loops it does not work:

``````For[i = 1, 2, i ++,
With[{ranges = Partition[bins, 2, 1]}
Total @ Pick[weights[[i]],
BITXOR[UnitStep[Subtract[data, #1]],
UnitStep[Subtract[data, #2]]][[i]], 1]& @@@ ranges]]
``````

How can I generalize properly?

## co.combinatorics – Combinatorics: Distribution of red, blue and green bullets in separate bins

Suppose there are three types of balls: red R balls, blue B balls and green G balls. How many ways are there to distribute the bales in N different bins so that no bin is empty and that a bin can hold no more than one balloon of the same color?
Right here,

1) R, B, G <= N (no color should have more than N balls, because we have the condition that at most one ball of the same color is in a tray and that all balls must be placed )

and

2) R + B + G> = N (this is due to the fact that no basket is empty).

## python – Divide by bins with pandas

I have a database in pandas that looks like below. The index is a date-time object, categorized by day, divided into 5-minute slices. I have a column called "col1". So if I do it

``````df['col1']
``````

``````Date and hour
2008-04-28 09:40:00 300.0
2008-04-28 09:45:00 -800.0
2008-04-28 09:50:00 0.0
2008-04-28 09:55:00 -100.0
2008-04-28 10:00:00 0.0
2008-04-29 09:40:00 500.0
2008-04-29 09:45:00 800.0
2008-04-29 09:50:00 100.0
2008-04-29 09:55:00 -100.0
2008-04-29 10:00:00 0.0
``````

I have another database in pandas obtained using groupby 5 minutes in the original database that generates:

``````                                            col2
09:40:00 4603.585657
09:45:00 5547.011952
09:50:00 8532.007952
09:55:00 6175.298805
10:00:00 4236.055777
``````

What I would like to do is split col1 by col2 for each of the 5-minute bins without using a for loop. To better explain, for every day, for each bin, divide col1 by col2. For example, divide all values ​​9:40:00 in col1 by 9:40:00 in col2.

I do not know how to start doing this without a loop, but I have the impression that it should be doable with pandas.

## ACT NW 2018 5, 1: find the least amount of bins needed to hold all items

This is a problem of computer programming competition from last year. The problems were sent home with the competitors, so I would consider them "released."

The problem is: "You want to choose the minimum number of shelves for all your book collections, so that each book collection is not divided between each shelf." Each shelf is at the same price, and the collections and the shelves can have different sizes. "To emphasize, the books can not be divided on separate shelves if they are in the same collection. There may be several collections on the same shelf.

Input example (first line: size of each book shelf, second line: size of each book collection):

150 150 300 150 150

70 76 99 75 105

Expected results (number of shelves needed):

2

This was given at a beginner level competition. So I suppose that they want the competitors to make some sort of brute-force solution to that, like recursing through all the different possible selections (and then another recursion to understand how to put the books on the shelves properly) up to a minimal solution is found. Is there another algorithm that can be used for that which is not brute force?

## links bins of different languages

Hello. I manage a site in English, but I also have some link links that come from sites in Russian (Russian) but with a relevant niche. Is it good or bad?