[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 60 KB, 934x625, 1428415469043.jpg [View same] [iqdb] [saucenao] [google]
7433878 No.7433878 [Reply] [Original]

I've managed to extract this information from 4chan:
> newest reply
> thread in which is newest reply
> oldest thread

I want to calculate how many dubs, trips, quads and so on there are.

How do I do that without iterating through each number from oldest thread to newest reply individually?

>> No.7434144

>How do I do that without iterating through each number from oldest thread to newest reply individually?
By writing an expression describing the frequency of those events between any two given numbers.

Iterating over all extant posts is the dumb and slow way to do it. The only time I can think of why you would want to do that is if you wanted to find all dubs present at any point in time, so you got the oldest and most recent posts and looked at hte range between them.

>> No.7434154

>>7433878
you can't because every board has their own post counter.

>> No.7434161

for dubs, trips, quads, and quints:

(2!/10(10)^2)(!)+2!/10(10(10))^2)(!)+2!/10(10(10(10)))^2)(!)+2!/10(10(10(10(10))))^2)(!)+2!/10(10(10(10(10(10)))))^2)(!))(2!)

wew lad

>> No.7434164

# of dubs = posts/10
# of trips = posts/100
# of quads = posts/1000
# of x-repeating digits = posts/10^(x-1)

>> No.7434192

>>7434164
Not quite, you are counting trips also as dubs, quads as trips and dubs, etc.

>> No.7434211

Not enough information.
The oldest OP can be bumped while an unknown number of threads with an unknown number of posts has be been pruned.

>> No.7434277

>>7434211
So iterate to find the missing post numbers. Or just iterate and tally the dubs, etc

>> No.7434616

>>7434277
Is this really the only way?

>> No.7434725

>>7434192
It's pretty trivial to figure out the degree of overlap.

Any given dubs has only a 1/10 chance of being part of trips, so subtract 10% of the dubs to account for double-counted trips. Same goes for quads.